Files
hermes-agent/optional-skills/mcp/fastmcp/references/fastmcp-cli.md
T
红尘 d73ff9b0fb
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
Docker / shell lint / Lint Dockerfile (hadolint) (push) Has been cancelled
Docker / shell lint / Lint docker/ shell scripts (shellcheck) (push) Has been cancelled
Docker Build and Publish / build-amd64 (push) Has been cancelled
Docker Build and Publish / build-arm64 (push) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (push) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (push) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (push) Has been cancelled
Nix Lockfile Fix / auto-fix-main (push) Has been cancelled
Nix Lockfile Fix / fix (push) Has been cancelled
Nix / nix (macos-latest) (push) Has been cancelled
Nix / nix (ubuntu-latest) (push) Has been cancelled
OSV-Scanner / Scan lockfiles (push) Has been cancelled
Build Skills Index / build-index (push) Has been cancelled
Tests / test (1) (push) Has been cancelled
Tests / test (2) (push) Has been cancelled
Tests / test (3) (push) Has been cancelled
Tests / test (4) (push) Has been cancelled
Tests / test (5) (push) Has been cancelled
Tests / test (6) (push) Has been cancelled
Tests / e2e (push) Has been cancelled
uv.lock check / uv lock --check (push) Has been cancelled
Docker Build and Publish / merge (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
Tests / save-durations (push) Has been cancelled
Initial import of NousResearch/hermes-agent
2026-05-31 09:36:58 +08:00

2.3 KiB
Raw Blame History

FastMCP CLI Reference

Use this file when the task needs exact FastMCP CLI workflows rather than the higher-level guidance in SKILL.md.

Install and Verify

pip install fastmcp
fastmcp version

FastMCP documents pip install fastmcp and fastmcp version as the baseline installation and verification path.

Run a Server

Run a server object from a Python file:

fastmcp run server.py:mcp

Run the same server over HTTP:

fastmcp run server.py:mcp --transport http --host 127.0.0.1 --port 8000

Inspect a Server

Inspect what FastMCP will expose:

fastmcp inspect server.py:mcp

This is also the check FastMCP recommends before deploying to Prefect Horizon.

List and Call Tools

List tools from a Python file:

fastmcp list server.py --json

List tools from an HTTP endpoint:

fastmcp list http://127.0.0.1:8000/mcp --json

Call a tool with key-value arguments:

fastmcp call server.py search_resources query=router limit=5 --json

Call a tool with a full JSON input payload:

fastmcp call server.py create_item '{"name": "Widget", "tags": ["sale"]}' --json

Discover Named MCP Servers

Find named servers already configured in local MCP-aware tools:

fastmcp discover

FastMCP documents name-based resolution for Claude Desktop, Claude Code, Cursor, Gemini, Goose, and ./mcp.json.

Install into MCP Clients

Register a server with common clients:

fastmcp install claude-code server.py
fastmcp install claude-desktop server.py
fastmcp install cursor server.py -e .

FastMCP notes that client installs run in isolated environments, so declare dependencies explicitly when needed with flags such as --with, --env-file, or editable installs.

Deployment Checks

Prefect Horizon

Before pushing to Horizon:

fastmcp inspect server.py:mcp

FastMCPs Horizon docs expect:

  • a GitHub repo
  • a Python file containing the FastMCP server object
  • dependencies declared in requirements.txt or pyproject.toml
  • an entrypoint like main.py:mcp

Generic HTTP Hosting

Before shipping to any other host:

  1. Start the server locally with HTTP transport.
  2. Verify fastmcp list against the local /mcp URL.
  3. Verify at least one fastmcp call.
  4. Document required environment variables.