Skip to main content
Glama
vidyasagarr7

mcp-py-template

by vidyasagarr7

mcp-py-template

Production-ready Model Context Protocol (MCP) server template in Python, built on the official mcp SDK (FastMCP). Ships an example tool, resource, and prompt.

Use this template

gh repo create my-mcp --template vidyasagarr7/mcp-py-template

Related MCP server: MCP Template

Layout

src/mcp_py_template/
  server.py    # FastMCP registration + stdio entry point
  core.py      # pure domain logic (testable, no MCP concerns)
  __init__.py
tests/         # pytest specs (core + server)

Golden rule: registration in server.py, logic in core.py.

Develop

uv sync --extra dev            # create .venv + install deps
uv run mcp-py-template         # run server over stdio
uv run pytest                  # tests + coverage
uv run ruff check .            # lint
uv run mypy                    # strict type-check

Inspect

uv run mcp dev src/mcp_py_template/server.py   # MCP Inspector (dev UI)

Register a new tool

  1. Add pure logic to src/mcp_py_template/core.py.

  2. Add a unit test in tests/.

  3. Register it in server.py with @mcp.tool() (type hints become the schema).

Connect from a client

{
  "mcpServers": {
    "my-mcp": { "command": "uv", "args": ["run", "mcp-py-template"] }
  }
}

Make it yours (rename checklist)

  • pyproject.toml: name, description, [project.scripts], coverage target

  • Rename the package dir src/mcp_py_template/ and update imports

  • server.py: FastMCP("mcp-py-template") name

  • Replace the example add tool / greeting resource / summarize prompt with your own

License

MIT

Install Server
A
license - permissive license
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Tools

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    A foundational template for building MCP servers in Python using Streamable HTTP transport. Provides example implementations of tools, resources, and prompts to help developers create custom MCP integrations for AI assistants.
    Last updated
  • A
    license
    -
    quality
    D
    maintenance
    A production-ready Python template for building MCP servers with enterprise features including registry integration, configuration management, structured logging, and extensible patterns for tools, resources, and prompts.
    Last updated
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    A minimal template MCP server demonstrating basic tools, resources, and prompts functionality. Includes example implementations like a hello tool, history resource, and greet prompt for learning MCP development.
    Last updated
    18
    ISC

View all related MCP servers

Related MCP Connectors

  • MCP server for generating rough-draft project plans from natural-language prompts.

  • 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…

View all MCP Connectors

Latest Blog Posts

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/vidyasagarr7/mcp-py-template'

If you have feedback or need assistance with the MCP directory API, please join our Discord server