fastmcp

Build, test, and deploy Python MCP servers with FastMCP templates and CLI workflows.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/xu1713/openhorse --skill fastmcp-xu1713
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fastmcp
Source: https://github.com/xu1713/openhorse/tree/main/openhorse/openhorse/optional-skills/mcp/fastmcp
Command: npx skills add https://github.com/xu1713/openhorse --skill fastmcp-xu1713

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Building an MCP server from scratch involves boilerplate, unclear tool design, and manual validation before clients like Claude Code or Cursor can use it. This Skill provides ready-made FastMCP templates, a scaffolding script, and a CLI-driven test-and-deploy workflow so you can ship a working server quickly. ## Core Features & Use Cases - Starter Templates: Scaffold an API wrapper, read-only SQLite database server, or text file processor with a single command. - Local Validation Workflow: Inspect, list, and call tools with the FastMCP CLI before integrating with any client. - Client Installation & Deployment: Register servers with Claude Code, Claude Desktop, or Cursor, and prepare repos for HTTP or Prefect Horizon deployment. - Use Case: Wrap your company's REST API as MCP tools by scaffolding the api_wrapper template, adding endpoints, running fastmcp call to verify each tool, then installing it into Claude Code. ## Quick Start Ask the agent 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, create a FastMCP instance, and decorate functions with @mcp.tool to expose them as tools. You can scaffold from the included api_wrapper, database_server, or file_processor templates, then validate with fastmcp inspect and fastmcp call.

How do I test a FastMCP server before installing it?

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

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

Yes, FastMCP supports direct installation with fastmcp install claude-code, claude-desktop, or cursor. Client installs run in isolated environments, so declare dependencies explicitly using flags like --with or editable installs.

Why does fastmcp inspect fail on my server file?

Inspection 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 are missing. Fix imports and install required packages first.

When should I use tools versus resources or prompts in FastMCP?

Use tools for actions, resources for stable read-only content like schemas or documents, and prompts for reusable LLM instruction templates. Start with tools only and add resources or prompts only when the client genuinely needs them.