← Back to Build Resources

MCP Server Starter Template

Reference servers demonstrating the patterns that score well. Clone it, modify it, ship it.

Quick Start

# Install
uv pip install mcp-server-template

# Run via stdio (default)
python -m mcp_server_template

# Run via HTTP
python -m mcp_server_template --http --port 8080

Included Tools

Six example tools that demonstrate the right patterns. Replace them with your own.

echo Echo a message back — useful for testing connectivity
calculate Arithmetic operations (add, subtract, multiply, divide)
list_files List files in a directory with optional glob pattern filtering
get_weather Get simulated weather data for a city
search_notes Search stored notes by keyword
create_note Create a new note with title, content, and optional tags

Best Practices Demonstrated

✓
Clear Tool Descriptions
Explains what each tool does and when to use it — so agents can discover the right tool
✓
Typed Input Schemas
Pydantic models with property descriptions, format hints, required vs. optional — reduces agent errors
✓
Proper Error Handling
Returns isError=true with clear messages instead of crashing
✓
Fuzz Resilience
Handles empty strings, huge numbers, null values, and wrong types gracefully
✓
Both Transports
Stdio for local use, HTTP (Streamable HTTP) for remote connections — same code, two entry points

Usage

With Claude Desktop

{
  "mcpServers": {
    "template": {
      "command": "python",
      "args": ["-m", "mcp_server_template"]
    }
  }
}

Score This Server

# Score via HTTP
uvx mcp-score http://localhost:8080/mcp

# Score via stdio
uvx mcp-score stdio -- python -m mcp_server_template