HE

haohao-end/mcp-agent

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

74 stars 16 forks 品質 51 トレンド 18

haohao-end/mcp-agentは[https://github.com/haohao-end/mcp-agent.からインポートされたMCPサーバー候補です

概要

haohao-end/mcp-agentは[https://github.com/haohao-end/mcp-agent.からインポートされたMCPサーバー候補です

概要(AI 翻訳)

MCP Agent Orchestrator は、Model Context Protocol (MCP) のプロレベルの Python 実装です。 外部ツールやナレッジベースと標準通信レイヤーを組み合わせて、大型ランゲージモデル(LLM)用の構造化された環境を提供します。 このプロジェクトは、サーバー側のツール定義と非同期のクライアント・サイド・ブリッジでOpenAI互換インターフェイスに FastMCP を利用しています。

システムアーキテクチャ

このプロジェクトは、デコープされたクライアントサーバアーキテクチャに従います。

1。 MCPクライアント:オーケストラとしての行動。 MCP サーバーのライフサイクルを管理し、ツールディスカバリーを実行し、LMM 完了を処理し、モデルによって返されたツールコールを実行します。 2.MCP Servers:モデルコンテキストプロトコルを介してクライアントに特定の機能を公開する独立したサービス(Weather、RAG)。 3。トランスポートレイヤー:高性能、ローカルインタープロセス通信用の標準入力/出力(StdIO)を使用します。

コアコンポーネント

##1.インテリジェントなクライアントブリッジ

クライアントの実装 (rag_agent.py), [client.py]) は、次のようにします。

※AsyncExitStackを用いた非同期ライフサイクル管理。

  • OpenAI対応機能コールの自動ツールスキーマ変換.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP Agent Orchestrator

The MCP Agent Orchestrator is a professional-grade Python implementation of the Model Context Protocol (MCP). It provides a structured environment for Large Language Models (LLMs) to interact with external tools and knowledge bases through a standardized communication layer. The project utilizes FastMCP for server-side tool definitions and an asynchronous client-side bridge to OpenAI-compatible interfaces.

System Architecture

The project follows a decoupled client-server architecture:

  1. MCP Client: Acts as the orchestrator. It manages the lifecycle of the MCP server, performs tool discovery, handles LLM completions, and executes tool calls returned by the model.
  2. MCP Servers: Independent services (Weather, RAG) that expose specific functions to the client via the Model Context Protocol.
  3. Transport Layer: Uses Standard Input/Output (StdIO) for high-performance, local inter-process communication.

Core Components

1. Intelligent Client Bridge

The client implementation (rag_agent.py, client.py) facilitates:

  • Asynchronous lifecycle management using AsyncExitStack.
  • Automatic tool schema conversion for OpenAI-compatible function calling.
  • Persistent conversation state and multi-turn reasoning loops.

2. Weather Service Server

The weather server (server.py) demonstrates real-time API integration:

  • Integration with external REST APIs (WeatherAPI).
  • Data normalization and formatting for LLM consumption.
  • Asynchronous request handling using httpx.

3. RAG Knowledge Server

The RAG server (rag_server.py) provides advanced document intelligence:

  • Data Ingestion: Support for PDF and TXT formats using LangChain.
  • Vector Database: Persistent storage via ChromaDB.
  • Search Optimization: Implements Maximal Marginal Relevance (MMR) for diverse information retrieval.
  • Embeddings: Integration with HuggingFace transformer models.

Project Structure

├── client.py             # Standard MCP client implementation
├── rag_agent.py          # Specialized agent for RAG operations
├── server.py             # Weather service MCP server
├── rag_server.py         # RAG knowledge base MCP server
├── test.py               # Connectivity test for LLM API
├── .env                  # Environment configuration
└── data/
    ├── rag_db/           # Vector store persistence directory
    └── text.txt # Sample knowledge base source

Technical Stack

  • Protocol: Model Context Protocol (MCP)
  • LLM Interface: OpenAI SDK (Compatible with Qwen/DashScope)
  • RAG Framework: LangChain
  • Vector Store: ChromaDB
  • Communication: Asynchronous I/O (asyncio)

Installation

Prerequisites

  • Python 3.10+
  • Virtual environment (recommended)

Environment Setup

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →