MCP Lighthouse
Audit tool for MCP servers. Run 25 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
25 checks: 21 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
inputSchemaon every tool? - Handle invalid tool names without crashing?
- Respond to
initializewithin 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 /"
# Audit a Streamable HTTP endpoint (JSON or SSE responses)
mcp-lighthouse scan --http "http://127.0.0.1:8000/mcp"
mcp-lighthouse scan --http "https://example.com/mcp" --http-header "Authorization=Bearer token"
# 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
# Use in CI: fail below 80 (critical failures fail by default)
mcp-lighthouse scan --stdio "python my_server.py" --fail-under 80
# List all checks
mcp-lighthouse list
Checks (25 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 (10 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 |
schema-tool-title |
Optional tool title values are non-empty strings |
schema-tool-output-schema |
Optional outputSchema values describe objects |
schema-tool-annotations |
Optional annotation titles and behavior hints use valid types |
schema-tool-execution |
Optional execution.taskSupport uses a defined value |
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
- Categories excluded with
--categoryare omitted from the report and score - The CLI exits with status 1 on critical failures by default;
--fail-underadds a score threshold
CLI Reference
mcp-lighthouse scan [OPTIONS]
--stdio COMMAND Server command to spawn (mutually exclusive with --http)
--http URL Streamable HTTP endpoint (mutually exclusive with --stdio)
--http-header NAME=VALUE
HTTP request header; repeat for multiple headers
--category CATEGORY Only run checks in this category
--timeout SECONDS Per-check timeout (default: 10)
--verbose Show detailed output
--report PATH Write markdown report
--fail-under SCORE Exit 1 when the overall score is below SCORE
--no-fail-on-critical Keep exit 0 for critical failures unless --fail-under fails
mcp-lighthouse list
Lists all available checks
License
MIT
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.4.0.tar.gz
(16.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_lighthouse-0.4.0.tar.gz.
File metadata
- Download URL: mcp_lighthouse-0.4.0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5295fe4e5f2c896c6b87e44ad2ed2d4d2bdd9512ca70ab1a93ad26a8f6ac4ad3
|
|
| MD5 |
672fc2376135127994c874c5d027fc2f
|
|
| BLAKE2b-256 |
f7640de0ab8307d3a17f15b6989790a3b0590183ae19acb147ece5127998836a
|
File details
Details for the file mcp_lighthouse-0.4.0-py3-none-any.whl.
File metadata
- Download URL: mcp_lighthouse-0.4.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48bce130aeefc6730969770c22f708093b0239d7d4e5659cf63bbeff51f05e6b
|
|
| MD5 |
0bf45bed1cf208283f0e7d1ac4f6fbef
|
|
| BLAKE2b-256 |
dfac5a07b19900c4db775035aff09c576e99c98faf5235cbf518941cb9edb38c
|