my-mcp-template
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., "@my-mcp-templatefetch https://example.com"
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.
my-mcp-template
A generic template for building FastMCP servers for CLI coding agents (Claude Code and similar) -- not chat UIs. It ships with two working example tools (pure logic, and an external-call tool with tenacity retries), a unified error format, SSO/OIDC auth, Docker Compose deployment, and a two-axis test suite. Not RAG-specific: just as suited to DB-query or file-operation tools.
Using this as a template
This repo is a plain [GitHub template repository]("Use this template" button), not a cookiecutter project -- there's no templating variables to fill in. To start a new project from it:
Click "Use this template" on GitHub (or
git clone+ re-init).Rename the package path if you want something other than
src.main.python-- it's a literal directory structure (src/main/python/), so a plain find-replace across the repo handles it.Replace
example_tool.pywith your own tools (seedocs/TOOL_GUIDELINES.md).
Related MCP server: MCP Server Template
Local development
uv sync
cp .env.example .env # AUTH_ENABLED=false by default, fine for local dev
uv run python -m src.main.python.mainThe server listens on http://0.0.0.0:8000/mcp (streamable HTTP,
stateless). Point MCP Inspector
or any streamable-HTTP-capable client at that URL to try it out.
Running with Docker Compose
cp .env.example .env
docker compose up --buildHealth check: curl http://localhost:8000/health.
Tests
Two independent groups, plus a fast/slow cost axis that cuts across both:
tests/server/-- does the MCP server itself work correctly? Schema/description contract, golden-case functional correctness, auth verification logic, and a real container integration smoke test.tests/agent/-- can an agent actually use it? Feeds your tool descriptions to a real Claude model and checks it picks the right tool. This is the layer that actually tests description quality.
uv run pytest -m "not slow" # fast: no LLM calls, no docker. Run on every PR.
uv run pytest -m slow # slow: calls Anthropic + docker compose. Run on merge to main.
uv run pytest # everythingANTHROPIC_API_KEY is required for tests/agent/ (fixed to Claude on
purpose -- see below). LLM_JUDGE_BASE_URL/LLM_JUDGE_API_KEY/LLM_JUDGE_MODEL
are required for llm_judge golden cases -- bring your own OpenAI-compatible
provider (OpenAI, NVIDIA NIM, DeepSeek, Together, a local vLLM/Ollama, ...).
Without them, llm_judge cases skip with a clear reason rather than fail.
Golden cases
Add your own in tests/golden/*.yaml. Six assert_types:
exact_match, contains, regex_match, numeric_tolerance, llm_judge,
custom -- see tests/golden/schema.py for the shape and
tests/golden/example.yaml for one of each.
Faithfulness layer (optional, deepeval)
For RAG-style tools where you want to check answers stay grounded in
retrieved context, add deepeval
assertions in your own test module (the eval dependency group is already
set up: uv sync --group eval). Not wired into a specific test file here
since it only applies if your tools actually do retrieval.
Connecting a client
{
"mcpServers": {
"my-mcp-template": {
"url": "http://localhost:8000/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}The Authorization header is only required when AUTH_ENABLED=true. See
docs/DEPLOYMENT.md for how tokens get issued in production (SSO/OIDC).
Project structure
src/main/python/ server code (main.py, config.py, auth.py, errors.py, tools/)
tests/server/ does the server work correctly?
tests/agent/ can an agent actually use it?
tests/golden/ golden case schema + data
docs/ TOOL_GUIDELINES.md, DEPLOYMENT.mdChecklist: what you still need to fill in
Blocking (fail-fast if missing):
Real golden case content in
tests/golden/*.yamlfor your own tools.Production
OIDC_ISSUER/JWKS_URL/AUDIENCE/TENANT_CLAIM_NAME-- there's no universal default, every IdP is different.
Conditional (only if you add the matching feature):
A
volumes:entry indocker-compose.yml, if you add a real file-operation tool.LLM_JUDGE_BASE_URL/LLM_JUDGE_API_KEY/LLM_JUDGE_MODEL, only if you use thellm_judgeassert_type in a golden case -- no universal default, bring your own OpenAI-compatible provider. Cases skip (not fail) if unset.
Already have a reasonable default -- tune if needed:
LLM_JUDGE_THRESHOLDinconfig.py.ALLOWED_ORIGINS(empty = CORS off; only needed for browser clients).Whether to upgrade past resource-server-only auth to
OAuthProxy(seedocs/DEPLOYMENT.md) -- not needed unless your MCP client has no other way to obtain a token.
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
- -license-quality-maintenanceA basic MCP server template with example tools for echoing messages and retrieving server information. Built with FastMCP framework and supports both stdio and HTTP transports for integration with various clients.Last updated
- FlicenseBquality-maintenanceA production-ready FastMCP server template with modular architecture for building MCP servers with organized tools, resources, and prompts, featuring container support and AI agent documentation system.Last updated3
- FlicenseBqualityDmaintenanceA template and demonstration project for building, testing, and deploying remote MCP servers using FastMCP and uv. It provides a foundational structure for creating MCP-compliant tools that can be hosted publicly and integrated with LLM agents.Last updated2
- Flicense-qualityCmaintenanceA minimal, production-ready FastMCP server template with auto-discovery, YAML configuration, authentication, and a knowledgebase, enabling quick scaffolding of new MCP servers.Last updated
Related MCP Connectors
Primarily to be used as a template repository for developing MCP servers with FastMCP in Python, P…
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
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/Comet0322/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server