fastmcp

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

1|Updated Jun 19, 2026
One-click install
npx skills add https://github.com/Lento47/arcana-community --skill fastmcp-lento47
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: fastmcp
Source: https://github.com/Lento47/arcana-community/tree/main/skills/mcp/fastmcp
Command: npx skills add https://github.com/Lento47/arcana-community --skill fastmcp-lento47

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Building a Model Context Protocol server from scratch involves boilerplate, unclear tool design, and manual client registration. This Skill provides ready-made FastMCP templates, a scaffolding script, and CLI workflows so you can go from an idea to a validated, installable MCP server without guesswork. ## Core Features & Use Cases - Starter Templates: Scaffold API wrappers, read-only SQLite database servers, and text-file processors with safe defaults like SELECT-only queries and input validation. - Local Validation Workflow: Inspect, list, and call tools with the FastMCP CLI before integrating with any client, catching naming and serialization issues early. - Client Installation & Deployment: Register servers with Claude Code, Claude Desktop, or Cursor, and prepare repos for HTTP or Prefect Horizon deployment. - Use Case: You need to expose a REST API as MCP tools for Claude Code. Scaffold the api_wrapper template, implement two endpoints, verify with fastmcp call, then run fastmcp install 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. Start from a template like an API wrapper or database server, then validate with fastmcp inspect and fastmcp call before installing into a client.

How do I test a FastMCP server locally before deployment?▼

Run fastmcp inspect server.py:mcp to verify the server loads, then fastmcp list to enumerate tools and fastmcp call to execute each tool with real arguments. 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 commands like fastmcp install claude-code server.py, fastmcp install claude-desktop server.py, and fastmcp install cursor server.py -e . Declare dependencies explicitly since client installs run in isolated environments.

How do I expose a SQLite database as MCP tools safely?▼

Use a read-only connection via SQLite URI mode, reject any SQL that does not start with SELECT, validate table names against a strict regex, and cap result rows. The database template implements list_tables, describe_table, and a constrained query tool with these safeguards.

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:object reference, or optional template dependencies like httpx are missing. Fix imports and install dependencies, then rerun fastmcp inspect.

When should I use FastMCP versus connecting an existing MCP server?▼

Use FastMCP when creating a new server or wrapping an API, database, or file workflow as MCP tools. If the server already exists and only needs client configuration, use a connection-focused approach instead of building one.