fastmcp

Build, test, and deploy MCP servers in Python using FastMCP templates and CLI.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fastmcp, httpx, and includes scripts (resource) and references (resource) components.

What problem does it solve? Creating a Model Context Protocol server from scratch involves boilerplate, unclear tool design, and uncertain testing steps. This Skill provides ready-made FastMCP templates, a scaffolding script, and a validated CLI workflow so you can go from idea to a working, deployable MCP server without guesswork. ## Core Features & Use Cases - Starter Templates: Three production-shaped templates covering the most common server types: REST API wrapper with auth headers, read-only SQLite database server, and text file processor with resources. - Scaffolding Script: Generate a new server file from any template with a single command, automatically replacing the server name placeholder. - CLI Validation Workflow: Step-by-step guidance for inspecting, listing, and calling tools with the FastMCP CLI before integrating with Claude Code, Cursor, or Hermes. - Use Case: You need to expose your company's internal REST API to an AI assistant. Scaffold the api_wrapper template, implement two or three typed tools, verify them with fastmcp call, then install the server into Claude Code or deploy it over HTTP. ## Quick Start Ask the AI to scaffold a new FastMCP server from the api_wrapper template named after your API and verify it with fastmcp inspect.

Frequently Asked Questions about fastmcp

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

FAQPage Schema
How do I build an MCP server in Python with FastMCP?

Install fastmcp with pip, scaffold a server from a template such as api_wrapper or database_server, then define tools with the @mcp.tool decorator using typed parameters and docstrings. Validate the server with fastmcp inspect and fastmcp call before integrating it anywhere.

How do I test a FastMCP server before deploying it?

Run fastmcp inspect server.py:mcp to verify the server loads, then fastmcp list to enumerate tools, and fastmcp call with real arguments to exercise each tool. For HTTP transport, start the server with fastmcp run --transport http and call it against the local /mcp URL.

Can I install a FastMCP server into Claude Code or Cursor?

Yes. FastMCP supports direct installation with commands like fastmcp install claude-code server.py, fastmcp install claude-desktop server.py, and fastmcp install cursor server.py. Declare dependencies explicitly with flags such as --with or editable installs since client installs run in isolated environments.

Why does fastmcp inspect fail on my server file?

Inspection usually fails when the file has import-time side effects that crash, the FastMCP object name does not match the <file.py:object> reference, or optional template dependencies like httpx are missing. Fix imports and install dependencies, then rerun fastmcp version and inspect.

When should I use FastMCP instead of connecting an existing MCP server?

Use FastMCP when you are creating a new server or wrapping an API, database, or file workflow as MCP tools. If the server already exists and only needs to be connected to Hermes, configure it directly in the Hermes config rather than building anything new.