# MCP Agent Orchestrator

A modular Python client-server implementation of the Model Context Protocol, demonstrating an LLM client bridged to a weather API server and a document RAG server over stdio.

The MCP Agent Orchestrator is a Python implementation of the Model Context Protocol that lets large language models interact with external tools and knowledge bases through a standardized layer. It uses FastMCP for server-side tool definitions and an asynchronous client bridge to OpenAI-compatible interfaces, communicating over standard input and output for local inter-process calls.

An MCP client manages the server lifecycle, performs tool discovery, handles LLM completions and executes tool calls the model requests. Two example MCP servers are included: a weather server that integrates a real-time weather REST API, and a retrieval-augmented generation server that ingests PDF and text documents into a ChromaDB vector store and retrieves passages with Maximal Marginal Relevance for diverse results.

It requires Python 3.10 or newer, works with OpenAI-compatible endpoints including Qwen and DashScope, and configuration is provided through a .env file with API keys.

Website: https://github.com/Haohao-end/mcp-agent
