MCP is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications. Just as USB-C provides a standardized way to connect your devices to various peripherals and accessories, MCP provides a standardized way to connect AI models to different data sources and tools.
-
Python
3.10or higher installed. -
You must use the Python MCP SDK
1.2.0or higher. -
Install
uvpackage manager (Optional)
```bash
$ git clone <clone-url>
```
$ cd mcp-servers/<perticular-server-folder>
$ python3 -m venv .venv
$ source .venv/bin/activate # For Windows: .venv\Scripts\activate
$ pip install -r requirements.txt # or uv sync
$ python <python-file>.py- Setup
$ cd mcp-clients/simple-cient
$ python3 -m venv .venv
$ source .venv/bin/activate # For Windows: .venv\Scripts\activate
$ pip install -r requirements.txt # or uv sync-
Replace the MCP Server endpoint as
urlvalue in theclient.py. -
Run the Client (Currently, only listing the tools.)
$ python client.py$ cd mcp-gateway
$ python3 -m venv .venv
$ source .venv/bin/activate # For Windows: .venv\Scripts\activate
$ pip install -r requirements.txt
$ python gateway.py- Go to the MCP agent directory.
$ cd mcp-agent- Create a
.envfile
LLM_PROVIDER=gemini
GOOGLE_API_KEY=<gemini-api-key>- Create virtual environment and install dependencies.
$ python3 -m venv .venv
$ source .venv/bin/activate # For Windows: .venv\Scripts\activate
$ pip install -r requirements.txt- Run the agent.
$ python main.pyIf you want to add new MCP Servers to the gateway. Add it's endpoint to SERVER_REGISTRY dictonary in gateway.py.
MCP servers the repository contains are created using FastMCP package from MCP Python SDK.
- It uses
Streamable HTTPtransport. - Its
stateless.
An MCP Gateway is a crucial piece of infrastructure that sits between MCP clients (agents) and a multitude of MCP servers (tools). It acts as a centralized control plane, offering:
-
Unified Access: A single entry point to a wide range of tools.
-
Security: Centralized authentication, authorization, and secrets management.
-
Observability: Monitoring, logging, and tracing of all tool interactions.
-
Management: A central place to register, discover, and manage available tools.
Supported LLM provider
