fastmcp

Create FastMCP-based MCP servers exposing tools, resources, and prompts from Python.

1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/eddielueng/hermes-agent-zh --skill fastmcp-eddielueng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fastmcp
Source: https://github.com/eddielueng/hermes-agent-zh/tree/main/optional-skills/mcp/fastmcp
Command: npx skills add https://github.com/eddielueng/hermes-agent-zh --skill fastmcp-eddielueng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

FastMCP turns Python code into MCP servers so you can reliably expose tools, resources, and prompts that other MCP clients can inspect, call, and deploy.

Core Features & Use Cases

  • MCP server scaffolding and templates: Generate starter servers for common shapes like API wrappers, SQLite read-only query servers, and file processors.
  • Local validation and contract checking: Use FastMCP CLI to inspect what will be exposed, list tools/resources, and run real calls before integrating anywhere.
  • Client installation and HTTP deployment prep: Register the server in popular MCP clients (Claude Code, Claude Desktop, Cursor) or validate an HTTP transport for deployment.

Use case example: Wrap a REST API endpoint set as MCP tools (health check, get-by-id, and search), verify each tool via CLI calls, then install the server into an MCP-aware client so the agent can use those tools immediately.

Quick Start

Ask the AI to scaffold an API wrapper FastMCP server named "Acme API", then run an inspect and at least one tool call to confirm the MCP contract works locally.

Frequently Asked Questions about fastmcp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose Python functions as MCP tools for Claude Desktop?

You can expose Python functions as MCP tools by defining a FastMCP server object and using explicit @mcp.tool decorators with typed JSON-safe interfaces, allowing MCP clients like Claude Desktop to inspect and call them directly.

What is the best way to wrap a REST API as an MCP server in Python?

The best way to wrap a REST API is to scaffold a FastMCP server template, define your API endpoints as @mcp.tool functions, and verify each tool call locally using the FastMCP CLI before deploying to an MCP-aware client.

Can I validate MCP server tools locally before installing them into a client?

Yes, you can validate MCP server tools locally by using the FastMCP CLI to inspect exposed resources, list tools, and run real test calls to confirm the MCP contract works before any client integration.

Does FastMCP support HTTP transport for deploying Python MCP servers?

FastMCP supports HTTP transport deployment by allowing you to verify the HTTP transport configuration prior to hosting, ensuring downstream MCP clients can access your exposed Python tools and resources reliably.

How do I expose database queries as discoverable MCP resources from Python?

You can expose database queries as discoverable MCP resources by building a FastMCP server, such as a SQLite read-only query template, and validating the exposed resources through the FastMCP CLI before client installation.

What are the limitations when defining typed interfaces for MCP tools?

When defining typed interfaces for MCP tools, you must ensure all function parameters are typed and JSON-safe to maintain deterministic tool exposure, as non-compliant types may fail local validation or client integration.