Best for
- create a new MCP server in Python
- wrap an API, database, CLI, or file-processing workflow as MCP tools
- expose resources or prompts in addition to tools
NousResearch/hermes-agent/optional-skills/mcp/fastmcp/SKILL.md
Build, test, and deploy Python MCP servers.
Decision brief
Build MCP servers in Python with FastMCP, validate them locally, install them into MCP clients, and deploy them as HTTP endpoints.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/NousResearch/hermes-agent --skill "optional-skills/mcp/fastmcp"Inspect the Agent Skill "fastmcp" from https://github.com/NousResearch/hermes-agent/blob/aec331899e4748739927fddf02a54327e64419a0/optional-skills/mcp/fastmcp/SKILL.md at commit aec331899e4748739927fddf02a54327e64419a0. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Choose the narrowest useful surface area first:
Use this skill when the task is to:
Install FastMCP in the working environment first:
templates/apiwrapper.py - REST API wrapper with auth header support
templates/apiwrapper.py - REST API wrapper with auth header support
Permission review
The documentation asks the agent to run terminal commands or scripts.
python ~/.hermes/skills/mcp/fastmcp/scripts/scaffold_fastmcp.py \The documentation asks the agent to run terminal commands or scripts.
python ~/.hermes/skills/mcp/fastmcp/scripts/scaffold_fastmcp.py --listThe documentation includes network, browsing, or remote request actions.
fastmcp list http://127.0.0.1:8000/mcp --jsonThe documentation includes network, browsing, or remote request actions.
fastmcp call http://127.0.0.1:8000/mcp search_resources query=router --jsonThe documentation asks the agent to read local files, directories, or repositories.
`fastmcp inspect <file.py:mcp>` succeedsEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 89/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 225,643 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Build MCP servers in Python with FastMCP, validate them locally, install them into MCP clients, and deploy them as HTTP endpoints.
Use this skill when the task is to:
Use native-mcp when the server already exists and only needs to be connected to Hermes. Use mcporter when the goal is ad-hoc CLI access to an existing MCP server instead of building one.
Install FastMCP in the working environment first:
pip install fastmcp
fastmcp version
For the API template, install httpx if it is not already present:
pip install httpx
templates/api_wrapper.py - REST API wrapper with auth header supporttemplates/database_server.py - read-only SQLite query servertemplates/file_processor.py - text-file inspection and search serverscripts/scaffold_fastmcp.py - copy a starter template and replace the server name placeholderreferences/fastmcp-cli.md - FastMCP CLI workflow, installation targets, and deployment checksChoose the narrowest useful surface area first:
Prefer a thin server with good names, docstrings, and schemas over a large server with vague tools.
Copy a template directly or use the scaffold helper:
python ~/.hermes/skills/mcp/fastmcp/scripts/scaffold_fastmcp.py \
--template api_wrapper \
--name "Acme API" \
--output ./acme_server.py
Available templates:
python ~/.hermes/skills/mcp/fastmcp/scripts/scaffold_fastmcp.py --list
If copying manually, replace __SERVER_NAME__ with a real server name.
Start with @mcp.tool functions before adding resources or prompts.
Rules for tool design:
Good tool examples:
get_customersearch_ticketsdescribe_tablesummarize_text_fileWeak tool examples:
runprocessdo_thingAdd @mcp.resource when the client benefits from fetching stable read-only content such as schemas, policy docs, or generated reports.
Add @mcp.prompt when the server should provide a reusable prompt template for a known workflow.
Do not turn every document into a prompt. Prefer:
Use the FastMCP CLI for local validation:
fastmcp inspect acme_server.py:mcp
fastmcp list acme_server.py --json
fastmcp call acme_server.py search_resources query=router limit=5 --json
For fast iterative debugging, run the server locally:
fastmcp run acme_server.py:mcp
To test HTTP transport locally:
fastmcp run acme_server.py:mcp --transport http --host 127.0.0.1 --port 8000
fastmcp list http://127.0.0.1:8000/mcp --json
fastmcp call http://127.0.0.1:8000/mcp search_resources query=router --json
Always run at least one real fastmcp call against each new tool before claiming the server works.
FastMCP can register the server with supported MCP clients:
fastmcp install claude-code acme_server.py
fastmcp install claude-desktop acme_server.py
fastmcp install cursor acme_server.py -e .
Use fastmcp discover to inspect named MCP servers already configured on the machine.
When the goal is Hermes integration, either:
~/.hermes/config.yaml using the native-mcp skill, orFor managed hosting, Prefect Horizon is the path FastMCP documents most directly. Before deployment:
fastmcp inspect acme_server.py:mcp
Make sure the repo contains:
requirements.txt or pyproject.tomlFor generic HTTP hosting, validate the HTTP transport locally first, then deploy on any Python-compatible platform that can expose the server port.
Use when exposing a REST or HTTP API as MCP tools.
Recommended first slice:
Implementation notes:
Start from templates/api_wrapper.py.
Use when exposing safe query and inspection capabilities.
Recommended first slice:
list_tablesdescribe_tableImplementation notes:
SELECT SQL in early versionsStart from templates/database_server.py.
Use when the server needs to inspect or transform files on demand.
Recommended first slice:
Implementation notes:
Start from templates/file_processor.py.
Before handing off a FastMCP server, verify all of the following:
fastmcp inspect <file.py:mcp> succeedsfastmcp list <server spec> --json succeedsfastmcp callInstall the package in the active environment:
pip install fastmcp
fastmcp version
fastmcp inspect failsCheck that:
<file.py:object>Run:
fastmcp list server.py --json
fastmcp call server.py your_tool_name --json
This usually exposes naming mismatches, missing required arguments, or non-serializable return values.
The server-building part may be correct while the Hermes config is not. Load the native-mcp skill and configure the server in ~/.hermes/config.yaml, then restart Hermes.
For CLI details, install targets, and deployment checks, read references/fastmcp-cli.md.
Alternatives
K-Dense-AI/scientific-agent-skills
Build, inspect, test, and analyze bounded process-based discrete-event simulations with SimPy, including events, resources, interrupts, monitoring, replications, warm-up, and reproducible output analysis.
github/awesome-copilot
Build, scaffold, and deploy Power Automate cloud flows using the FlowStudio MCP server. Your agent constructs flow definitions, wires connections, deploys, and tests — all via MCP without opening the portal. Load this skill when asked to: create a flow, build a new flow, deploy a flow definition, scaffold a Power Automate workflow, construct a flow JSON, update an existing flow's actions, patch a flow definition, add actions to a flow, wire up connections, or generate a workflow definition from
mgiovani/cc-arsenal
Run the checks a GitHub Actions workflow would run, locally, when Actions is unavailable or out of quota. Parses .github/workflows/*.yml, extracts the jobs/steps that gate merges (lint, typecheck, test, build), translates them to local commands respecting the workflow's pinned node/python versions and env, executes them sequentially, and reports a parity table of what passed locally vs. what can't be replicated (service containers, secrets, matrix dimensions) and why. Activates on "CI quota", "A
einverne/dotfiles
Comprehensive guide for building serverless applications with Cloudflare Workers. Use when developing Workers, configuring bindings, implementing runtime APIs, testing Workers, using Wrangler CLI, deploying to production, or building edge functions with JavaScript/TypeScript/Python/Rust.