service-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., "@service-templatecheck the service health, uptime, and version"
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.
service-template
A minimal, reusable Python backend template: one FastAPI app exposing the same business logic through two front doors — a REST endpoint and an MCP tool.
Clone it, rename it, and build on the seams it leaves you.
The pattern
Service-layer architecture with a light ports-and-adapters seam. The HTTP route and the MCP tool are thin adapters; neither owns logic, and neither knows about the other.
HTTP request ──▶ api/health.py ──┐
├──▶ services/health_service.py (single source of truth)
MCP tool call ──▶ mcp/tools.py ───┘Adding auth, identity, or persistence later touches the service and identity layers — not the adapters.
Related MCP server: http-mcp-server
Layout
src/app/
├── main.py # app factory, lifespan, mounts the MCP sub-app
├── api/health.py # adapter #1 — HTTP
├── mcp/tools.py # adapter #2 — MCP
├── services/
│ └── health_service.py # shared business logic
├── core/
│ ├── config.py # pydantic-settings
│ └── logging.py # structured JSON logging
└── identity/provider.py # extension seam — SPIFFE/SPIRE goes here laterQuickstart
uv sync # create .venv and install everything
uv run uvicorn app.main:app --reload # serve on http://127.0.0.1:8000Surface | Address |
Health endpoint |
|
OpenAPI docs |
|
MCP endpoint |
|
curl http://127.0.0.1:8000/health
# {"status":"ok","uptime_seconds":3.14,"version":"0.1.0"}Development
uv run pytest # tests
uv run ruff check . # lint
uv run ruff format . # format
uv run mypy # type check (strict)Configuration
Settings live in src/app/core/config.py and are read from the environment or a
.env file using the APP_ prefix. Copy .env.example to .env to start.
Setting | Env var | Default |
|
|
|
|
|
|
|
|
|
Extending it
A new MCP tool — add a function to src/app/mcp/tools.py (or a new module
under src/app/mcp/ registered on the same mcp instance). Put the logic in
services/, and call it from the tool.
A new HTTP route — add a router under src/app/api/ and include it in
create_app(). Same rule: the logic belongs in services/.
Workload identity (SPIFFE/SPIRE) — src/app/identity/provider.py is a no-op
stub today. Replace NullIdentityProvider with an implementation backed by the
spiffe package and have callers depend on get_identity_provider(). Nothing in
api/ or services/ should need to change.
Renaming for a new project — rename the src/app/ package, update name in
pyproject.toml, the packages entry under [tool.hatch.build.targets.wheel],
and the app_name default in core/config.py. Nothing in the logic references
this template by name.
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
- FlicenseNot gradedqualityCmaintenanceMCP server for Loadingplay that exposes its tools via Streamable HTTP, supporting health check and standard MCP endpoint.
- AlicenseNot gradedqualityBmaintenanceMock HTTP server implementing MCP (Model Context Protocol) with streamable HTTP transport, health endpoint, and example tools like echo and time.225MIT
- FlicenseNot gradedqualityCmaintenanceMCP server providing time retrieval and echo tools, running as an independent network process over Streamable HTTP.
- FlicenseNot gradedqualityCmaintenanceA minimal MCP server over Streamable HTTP demonstrating the MCP protocol with tools for health checks, echo, and text reversal.
Related MCP Connectors
Streamable HTTP MCP server for Google Calendar and Sheets with OAuth login.
MCP server exposing the Backtest360 engine API as tools for AI agents.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
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/bobbylite/service-template'
If you have feedback or need assistance with the MCP directory API, please join our Discord server