Production-ready template for building Model Context Protocol servers with FastMCP. Provides dual transport modes (stdio and HTTP/SSE) with clean architecture separation and Docker/Kubernetes deployment support.
This is a skeleton/template server with four example tools. All tools have names and descriptions, but the descriptions are minimal (marked '[EXAMPLE TOOL]') and lack actionable context. Input schemas are present with type information, but parameter descriptions are generic and do not follow LLM-optimized patterns. Output schemas are not documented in the visible code, the tool implementations return dicts but there is no formal schema specification visible to clients. No error handling guidance, no enum constraints, no validation messaging. The server uses fastmcp with HTTP+SSE transport, which is acceptable but the framework's tool registration mechanism is not fully visible in the provided source. Tool naming is clear but brief (verb_noun pattern is followed). Overall, this reads as a minimal working template rather than production-grade tooling.
[EXAMPLE TOOL] Analyze text and return various statistics.
[EXAMPLE TOOL] Perform mathematical operations.
[EXAMPLE TOOL] Get weather information for a specific city.
[EXAMPLE TOOL] Make HTTP requests to external APIs.
All tool descriptions are generic '[EXAMPLE TOOL]' placeholders lacking actionable context. Descriptions must state WHAT the tool does, WHEN to use it, and prerequisites. Current descriptions are <30 chars and violate the 10-1024 character guideline with insufficient signal for LLM tool selection.
No output schema documentation visible. Tools return dicts (e.g. calculator returns {operation, operand_a, operand_b, result}) but there is no formal response schema specification that clients can introspect. LLMs need documented return types to plan downstream calls.
Parameter descriptions are minimal. E.g. 'operation': 'Type of operation - add, subtract, multiply, or divide' lacks format specification and does not state that invalid operations will raise ValueError. Parameter descriptions should be 50-150 chars with constraint and failure details.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 47 | <=2025-11-25 | v2 |
No enum constraints on 'operation' parameter in calculator or 'method' parameter in http_request. Free-form strings invite hallucinated values. Should declare operation as enum: ['add', 'subtract', 'multiply', 'divide'] and method as enum: ['GET', 'POST'].
Error handling lacks actionable recovery guidance. calculator.py raises ValueError for division by zero and unsupported operations, but returns are not documented. http_tools.py returns error dicts with 'error' key but does not classify errors as retryable vs fatal or suggest next steps.
get_weather tool appears to be a stub, implementation is incomplete in the provided source ('This is a sample implementation that wou...' text is cut off). Cannot assess actual behavior, parameter handling, or error cases.
http_request tool accepts 'method' with default 'GET' but description does not explain default behavior or state that only GET and POST are supported. Parameter descriptions should be explicit about defaults and constraints.
analyze_text tool returns 'longest_word' and 'shortest_word' as strings but handles empty text by returning empty strings without documenting this edge case. Parameter description for 'text' does not specify minimum length or what happens with empty/whitespace-only input.