Skip to main content

Audit tool for MCP servers — test protocol compliance, schema quality, and robustness

Project description

MCP Lighthouse

Audit tool for MCP servers. Run 21 automated checks across 5 dimensions and get a compliance score — like Lighthouse, but for your MCP server.

MCP Lighthouse — my-server v1.0

  Protocol    ████████████████████  100
  Schema      ██████████████░░░░░░   70
  Robustness  ████████████████░░░░   75
  Practices   ██████████░░░░░░░░░░   50
  Performance ████████████████████  100

  Overall Score: 83/100

  21 checks: 17 passed, 2 warnings, 2 failed

Why

You built an MCP server. It works in Claude Code. But does it:

  • Return proper JSON-RPC 2.0 responses?
  • Include inputSchema on every tool?
  • Handle invalid tool names without crashing?
  • Respond to initialize within a reasonable time?

MCP Lighthouse tests all of this automatically.

Install

pip install mcp-lighthouse

Or from source:

git clone https://github.com/MakiDevelop/mcp-lighthouse.git
cd mcp-lighthouse
pip install -e .

Quick Start

# Audit an MCP server via stdio
mcp-lighthouse scan --stdio "python my_server.py"
mcp-lighthouse scan --stdio "npx @modelcontextprotocol/server-filesystem /"

# Only run specific category
mcp-lighthouse scan --stdio "python my_server.py" --category protocol

# Export markdown report
mcp-lighthouse scan --stdio "python my_server.py" --report audit.md

# List all checks
mcp-lighthouse list

Checks (21 total)

Protocol Compliance (5 checks, 40% weight) — critical

Check What it tests
proto-init Server responds to initialize with valid protocolVersion + capabilities + serverInfo
proto-init-version protocolVersion is a known version (2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25)
proto-jsonrpc-version All responses include "jsonrpc": "2.0"
proto-id-match Response id matches request id
proto-error-format Error responses have code (int) + message (string)

Schema Quality (6 checks, 25% weight) — warning

Check What it tests
schema-tools-list tools/list returns non-empty tools array
schema-tool-name Every tool has a non-empty name
schema-tool-description Every tool has a description (>10 chars)
schema-tool-input-schema Every tool has inputSchema with type: "object"
schema-required-fields inputSchema with properties has a required array
schema-no-duplicate-tools No duplicate tool names

Robustness (4 checks, 20% weight) — warning

Check What it tests
robust-unknown-method Server returns -32601 for unknown method
robust-invalid-tool tools/call with non-existent tool returns error (not crash)
robust-missing-args tools/call with missing required args returns error
robust-malformed-json Server handles malformed JSON without crashing

Best Practices (4 checks, 10% weight) — info

Check What it tests
bp-tool-name-format Tool names use snake_case or kebab-case
bp-description-length Tool descriptions are 20-500 chars
bp-server-info serverInfo includes both name and version
bp-capabilities-declared Server declares at least one capability

Performance (2 checks, 5% weight) — info

Check What it tests
perf-init-time initialize completes in < 5 seconds
perf-tools-list-time tools/list responds in < 3 seconds

Scoring

  • Overall: Weighted average of category scores (protocol 40%, schema 25%, robustness 20%, practices 10%, performance 5%)
  • Per category: (passed checks / total checks) * 100
  • A single critical failure in Protocol drops that category to 0

CLI Reference

mcp-lighthouse scan [OPTIONS]
  --stdio COMMAND       Server command to spawn (required for now)
  --category CATEGORY   Only run checks in this category
  --timeout SECONDS     Per-check timeout (default: 10)
  --verbose             Show detailed output
  --report PATH         Write markdown report

mcp-lighthouse list
  Lists all available checks

License

MIT

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

mcp_lighthouse-0.2.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

mcp_lighthouse-0.2.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_lighthouse-0.2.0.tar.gz.

File metadata

  • Download URL: mcp_lighthouse-0.2.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for mcp_lighthouse-0.2.0.tar.gz
Algorithm Hash digest
SHA256 143ef140a1eefd6eb41883ad17514ac6baf23c63430c82eb4c204ae569519a6c
MD5 848b8e51a7abe06e413b63752ab902c5
BLAKE2b-256 0199fe5d1884ff198296e88e7796fd302e8fdb275802835288221a4041561d81

See more details on using hashes here.

File details

Details for the file mcp_lighthouse-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_lighthouse-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for mcp_lighthouse-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 027b8aa277559e1d09b4b20505ddbff7ae8ff3c44bdcda9fad90348011aae452
MD5 2fb5b722ef0714c5ca74d71d48869107
BLAKE2b-256 9301f5aa113687fe9b649d75afe7404107bd3dd1d25ff103577f600540fc5619

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