Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Python Mcp Template

FreeNot checked

A minimal FastMCP server scaffold for building your own MCP tools and resources. It includes typed examples, stderr-only logging, and a clean project layout tha

GitHubEmbed

About

A minimal FastMCP server scaffold for building your own MCP tools and resources. It includes typed examples, stderr-only logging, and a clean project layout that works with uv.

README

A minimal FastMCP server scaffold for building your own MCP tools and resources. It includes typed examples, stderr-only logging, and a clean project layout that works with uv.

What's included

  • FastMCP wiring in src/mcp_server/main.py.
  • Typed models in src/mcp_server/models.py.
  • Example tools: analyze_metrics (typed Pydantic input/output) and echo.
  • A sample resource at template://config/defaults.
  • Logging configured to use stderr only (safe for stdio transports).

Prerequisites

  • Python 3.12+
  • uv for dependency management and execution.

Setup and run

uv sync
uv run src/mcp_server/main.py   # or: uv run mcp-template

Try it with the MCP Inspector

Inspect tools and resources without an LLM in the loop:

npx @modelcontextprotocol/inspector uv run --directory . src/mcp_server/main.py

Extending the template

  • Add new models to src/mcp_server/models.py (or a new module) with full type hints.
  • Implement tool logic under src/mcp_server/tools/.
  • Register tools/resources in src/mcp_server/main.py using the @mcp.tool() and @mcp.resource() decorators.
  • Keep logging directed to stderr (see src/mcp_server/utils/logger.py) so stdio transports stay clean.

Tests and linting

uv run pytest
uv run ruff check .

from github.com/mbeps/python-mcp-template

Installing Python Mcp Template

This server has no published package — it is built from source. Open the repository and follow its README.

▸ github.com/mbeps/python-mcp-template

FAQ

Is Python Mcp Template MCP free?

Yes, Python Mcp Template MCP is free — one-click install via Unyly at no cost.

Does Python Mcp Template need an API key?

No, Python Mcp Template runs without API keys or environment variables.

Is Python Mcp Template hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Python Mcp Template in Claude Desktop, Claude Code or Cursor?

Open Python Mcp Template on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Python Mcp Template with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All ai MCPs