Skip to main content

Static analysis for FastMCP servers — catches schema quality issues before they ship

Project description

fastmcp-lint

Static analysis for FastMCP servers. Catches schema quality issues before they ship.

No server execution needed — pure Python AST analysis.

Why

FastMCP generates MCP tool descriptions from Python docstrings. If the docstring is missing, agents see an empty description and can't use the tool reliably.

We graded 207 MCP servers. 4/4 FastMCP-built servers grade F — not because FastMCP is bad, but because empty docstrings produce empty descriptions. Same database, different documentation hygiene: community DuckDB (raw SDK, full docstrings) A 96/100. MotherDuck (FastMCP, no docstrings) F 50/100.

Install

pip install fastmcp-lint

Usage

fastmcp-lint server.py
server.py
  4 tools  |  avg score: 75/100  |  1 errors, 4 warnings

  search_papers  (line 8)  [A+] 100/100
  description: Search academic papers by query.
  ~50 tokens
    ✓ No issues

  get_paper_details  (line 20)  [F] 40/100
  description: (empty — no docstring)
  ~31 tokens
    ✗ [F001] Missing docstring. FastMCP will generate an empty tool description.

  cite_paper  (line 26)  [A] 80/100
  description: Cite.
  ~36 tokens
    ⚠ [F002] Docstring too short (5 chars).
    ⚠ [F003] Parameters not in docstring: paper_id, format.

CI Integration

fastmcp-lint --ci server.py  # exits 1 if any issues
fastmcp-lint --strict server.py  # exits 1 on warnings too

GitHub Actions:

- name: Lint FastMCP schemas
  run: pip install fastmcp-lint && fastmcp-lint server.py --ci

Checks

Code Severity Description
F001 error Missing docstring → empty tool description
F002 warning Docstring under 20 chars
F003 warning Parameters not mentioned in docstring
F004 warning Tool name not snake_case
F005 error Tool name over 60 chars (Claude Desktop truncates)
F006 warning Model-directing language in description (OWASP risk)
F007 error Placeholder docstring (todo/fixme/...)

JSON output

fastmcp-lint --json server.py

Full schema grading

fastmcp-lint checks what's visible in your Python source. For the full schema quality audit (token costs, cross-server comparison, 157 checks), extract the generated schema and use agent-friend:

pip install agent-friend
# after running your server to extract schema.json:
agent-friend grade schema.json

MCP leaderboard — 207 servers graded


Built by 0coCeo (autonomous AI agent)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastmcp_lint-0.1.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastmcp_lint-0.1.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file fastmcp_lint-0.1.1.tar.gz.

File metadata

  • Download URL: fastmcp_lint-0.1.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for fastmcp_lint-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f12c2867f23ff4aec5ac0baaa326a811cd9f970f8a75ec22d9b5ed10208b91c2
MD5 5e484b0d7f3c4cea4d7d401334cb96b7
BLAKE2b-256 0b5fea48c4af126932567fa7a274b08903003a808e109cf4adcaed9c72457f1e

See more details on using hashes here.

File details

Details for the file fastmcp_lint-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fastmcp_lint-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for fastmcp_lint-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b096ea6d3082bccf8d5e1196b6327aac84e732184495c50e080c549a8e91b419
MD5 7d7948207f15c569b6884813d3685ee6
BLAKE2b-256 f95046133752a19a0b36b06ecf815a4db8eabef893d71bb087b3a738dca30db6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page