MCP Server
MCP Server
A Python implementation of the Model Context Protocol (MCP) that connects client applications with AI models, primarily Anthropic's models, with setup instructions for local development and deployment.
0
GitHub Stars
8/23/2025
Last Updated
No Configuration
Please check the documentation below.
README Documentation
MCP Server
-
Create virtual environment and activate it
uv venv source .venv/bin/activate
-
Install dependencies
uv add mcp httpx arxiv
-
To launch it by running
uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/mcp run server.py
-
Create .env file
touch .env
-
Add your key to the .env file:
ANTHROPIC_API_KEY=<your_key_here>
-
To test your MCP Server you can use mcp inspector
npx @modelcontextprotocol/inspector uv run server.py
MCP Client
-
Install required packages
uv add mcp anthropic python-dotenv nest_asyncio
-
To run your client with any MCP server:
uv run client.py path/to/server.py # python server uv run client.py path/to/build/index.js # node server
Relative path
uv run client.py ./server/server.py
Absolute path
uv run client.py /Users/username/projects/mcp/server.py
Windows path (either format works)
uv run client.py C:/projects/mcp/server.py uv run client.py C:\\projects\\mcp\\server.py
Deployment
-
If the server using pip instead of uv
uv pip compile pyproject.toml > requirements.txt
-
Make sure the server use the right python version
echo "python-3.11.11" > runtime.txt
-
Input the required environment variables
-
Run the mcp server
python server.py
references :
Quick Actions
Key Features
Model Context Protocol
Secure Communication
Real-time Updates
Open Source