MCP Production
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP ProductionWhat is the weather in Tokyo and calculate 128 times 4?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Production — Model Context Protocol + OpenAI
Production-ready MCP server with FastAPI, Redis session memory, streaming, retries, rate limiting, and structured logging. Managed with uv.
Project Structure
mcp_production/
├── app/
│ ├── main.py # FastAPI app factory
│ ├── config.py # Centralised settings (pydantic-settings)
│ ├── logger.py # Structured JSON logging (structlog)
│ ├── api/
│ │ ├── routes.py # All route handlers
│ │ └── schemas.py # Pydantic request/response models
│ ├── core/
│ │ ├── mcp_loop.py # Agentic loop (blocking + streaming)
│ │ └── openai_client.py # OpenAI client with retry
│ ├── tools/
│ │ ├── base.py # BaseTool + ToolRegistry
│ │ ├── weather.py # get_weather tool
│ │ ├── calculator.py # calculate tool (sympy)
│ │ └── wiki.py # search_wiki tool
│ └── memory/
│ └── session.py # Redis-backed session memory
├── tests/
│ ├── test_tools.py # Tool unit tests
│ └── test_api.py # API integration tests
├── scripts/
│ ├── run_dev.sh # Dev server (hot reload)
│ ├── run_prod.sh # Production server (multi-worker)
│ └── test.sh # Run test suite
├── pyproject.toml # uv project + dependencies
├── .env.example # Environment variable template
├── docker-compose.yml # Local dev stack (app + Redis)
└── Dockerfile # Multi-stage Docker buildRelated MCP server: Production-Ready FastMCP Server
Quick Start
1. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh2. Clone and set up
git clone <repo>
cd mcp_production
# Install all dependencies
uv sync
# Copy and fill in env vars
cp .env.example .env
# Edit .env — add OPENAI_API_KEY at minimum3. Start Redis
# Option A: Docker Compose (recommended)
docker-compose up redis -d
# Option B: Local Redis
brew install redis && redis-server4. Run the server
# Development (hot reload)
bash scripts/run_dev.sh
# Or directly:
uv run uvicorn app.main:app --reloadServer starts at http://localhost:8000 API docs at http://localhost:8000/docs
API Endpoints
POST /api/v1/chat — Blocking
curl -X POST http://localhost:8000/api/v1/chat \
-H "Content-Type: application/json" \
-d '{
"message": "What is the weather in Tokyo and calculate 17 * 4?",
"session_id": "user-123"
}'Response:
{
"answer": "The weather in Tokyo is 22°C, sunny. And 17 * 4 = 68.",
"session_id": "user-123",
"turns": 2,
"tools_called": ["get_weather", "calculate"],
"total_tokens": 312
}POST /api/v1/chat/stream — Streaming SSE
curl -N -X POST http://localhost:8000/api/v1/chat/stream \
-H "Content-Type: application/json" \
-d '{"message": "Search Wikipedia for Python", "session_id": "user-123"}'Events:
data: {"type": "tool_call", "name": "search_wiki", "args": {"query": "Python"}}
data: {"type": "tool_result", "name": "search_wiki", "content": "Python is..."}
data: {"type": "token", "content": "Python "}
data: {"type": "token", "content": "is a..."}
data: {"type": "done", "turns": 2, "tools": ["search_wiki"]}DELETE /api/v1/session/{session_id} — Clear History
curl -X DELETE http://localhost:8000/api/v1/session/user-123GET /api/v1/tools — List Tools
curl http://localhost:8000/api/v1/toolsGET /api/v1/health — Health Check
curl http://localhost:8000/api/v1/healthAdding a New Tool
Create
app/tools/my_tool.py:
from app.tools.base import BaseTool
class MyTool(BaseTool):
name = "my_tool"
def schema(self) -> dict:
return {
"type": "function",
"function": {
"name": self.name,
"description": "Does something useful.",
"parameters": {
"type": "object",
"properties": {
"input": {"type": "string", "description": "Input value"}
},
"required": ["input"]
}
}
}
async def execute(self, input: str) -> str:
return f"Result for: {input}"Register in
app/tools/__init__.py:
from app.tools.my_tool import MyTool
registry.register(MyTool())That's it — the tool is automatically included in all API calls.
Running Tests
bash scripts/test.sh
# Or with uv directly:
uv run pytest tests/ -vDocker (Full Stack)
docker-compose up --buildEnvironment Variables
Variable | Default | Description |
| required | Your OpenAI API key |
|
| Model to use |
|
| Redis connection URL |
|
| Session memory TTL |
|
|
|
|
| Requests per minute per IP |
| (mock used) | Real weather API key |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA production-ready MCP server built with FastAPI, providing an enhanced tool registry for creating, managing, and documenting AI tools for Large Language Models (LLMs).Last updated34
- Alicense-qualityDmaintenanceA production-grade MCP server and client implementation with comprehensive features including structured logging, health checks, metrics, authentication, and RAG capabilities with PostgreSQL vector search. Supports both stdio and SSE transports with containerization and security features for enterprise deployment.Last updatedMIT
- FlicenseBqualityDmaintenanceProduction-ready MCP server that integrates OpenAI API with extensible tool support, enabling dynamic plugin loading and knowledge search capabilities through multiple interfaces including CLI and browser UI.Last updated2
- Flicense-qualityDmaintenanceA production-grade, LLM-agnostic MCP server that integrates AI models with tools for managing subscriptions, organizations, and payments via the Updation API. It features Redis-backed conversation memory, structured logging, and role-based access control for secure, scalable orchestration.Last updated
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Cloud-hosted MCP server for durable AI memory
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Riteshpcs1994/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server