kabirrgrover/mcp-server
If you are the rightful owner of mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server designed for seamless integration with LLMs like Claude through Poke.
MCP Server
A Model Context Protocol (MCP) server for integrating with LLMs like Claude through Poke.
Features
- MCP Protocol Support - Full implementation of the Model Context Protocol
- Tool Registration - Easy-to-use tool registration system
- FastAPI Integration - HTTP server for MCP communication
- Environment-based Configuration - Secure credential management
Quick Start
- Install dependencies:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e .
Or using uv:
uv sync
- Create a
.envfile:
cp .env.example .env
# Edit .env with your configuration
- Run the server:
Option A: Using the quick start script (recommended):
python run_server.py
Option B: Using uvicorn directly:
uvicorn src.server:app --host 0.0.0.0 --port 3000
Option C: Using uv:
uv run uvicorn src.server:app --host 0.0.0.0 --port 3000
The server will run on http://localhost:3000/mcp by default.
Configuration
Create a .env file with the following variables:
# Server Configuration
PORT=3000
MCP_AUTH_TOKEN=your-secret-token-here # Optional, for securing the endpoint
# Add your API credentials here
# API_KEY=your-api-key
# API_SECRET=your-api-secret
Using with Poke
To connect your MCP server with Poke, configure Poke to point to your server endpoint:
{
"mcpServers": {
"my-mcp-server": {
"url": "http://localhost:3000/mcp",
"authToken": "your-secret-token-here"
}
}
}
Project Structure
mcp-server/
├── src/
│ ├── __init__.py
│ ├── server.py # Main server implementation
│ ├── tools/ # Tool implementations
│ │ ├── __init__.py
│ │ └── example.py # Example tool
│ └── config.py # Configuration management
├── pyproject.toml # Project dependencies
├── .env.example # Example environment variables
└── README.md # This file
Adding New Tools
To add a new tool, create a file in src/tools/ and register it in src/server.py:
from mcp.server.models import Tool
async def my_tool_handler(arguments: dict) -> dict:
# Your tool logic here
return {"result": "success"}
# Register in server.py:
server.register_tool(
Tool(
name="my_tool",
description="Description of what the tool does",
inputSchema={
"type": "object",
"properties": {
"param": {"type": "string", "description": "Parameter description"}
}
}
),
my_tool_handler
)
Development
- Install development dependencies:
uv sync --extra dev
- Run tests:
pytest
- Format code:
black src/
ruff check src/
License
MIT