Skip to content

Repository files navigation

mcp-scorecard

License: MIT GitHub Sponsors Ko-fi

⚠️ Status: v0.1 alpha — under active development. Rules, thresholds, and scoring are being calibrated against real-world MCP servers.

Pre-flight checks for MCP (Model Context Protocol) servers.

mcp-scorecard answers one question: "Is this MCP server safe and efficient enough for LLMs to actually use?" — before you publish it, install it, or let it into your agent config.

Existing MCP tools cover runtime security (MCP-Scan) and protocol compliance (MCP Inspector). This one covers the missing layer: how expensive is the server just to keep registered, and are its tools scoped well enough for an LLM to pick the right one?

Companion tool to the book 『MCP実践セキュリティ』 (Impress NextPublishing).

The four layers

Layer What it measures Status
A. Passive Footprint Tokens the server steals from every LLM turn just by being listed. tools/list initial load, per-tool cost, bloat ratio, schema verbosity v0.1
B. Use-Case Scoping Whether each tool is narrow enough that the LLM knows when to use it. When-to-use present, vague verb scan, overlap detection, naming consistency, AI Slop v0.1
C. Security Own rules (prompt injection in description, tool shadowing, hardcoded secrets, transport hygiene) + optional MCP-Scan wrap v0.1 own rules; wrap in v0.2
D. Name Safety Case collision, brand similarity, separator variants, namespace hygiene v0.1

Design details: docs/design.md.

Install

pip install mcp-scorecard              # CLI + library
pip install "mcp-scorecard[mcp]"       # + MCP server (stdio)

Use as a CLI

# Full scan
mcp-scorecard scan ./path/to/server.py
mcp-scorecard scan http://localhost:8000/
mcp-scorecard scan pypi:some-mcp

# Layer-only
mcp-scorecard footprint ./server.py
mcp-scorecard scoping ./server.py
mcp-scorecard security ./server.py
mcp-scorecard name my-new-mcp

# CI-friendly
mcp-scorecard scan ./server.py --json
mcp-scorecard scan ./server.py --format sarif
# exit codes: 0=GREEN/YELLOW, 1=ORANGE, 2=RED

Use as an MCP server (self-hosting)

Register mcp-scorecard itself as an MCP tool in Claude Code / Cursor / Windsurf, then ask the LLM to audit another MCP:

{
  "mcpServers": {
    "mcp-scorecard": {
      "command": "mcp-scorecard-mcp"
    }
  }
}

Then in chat: "score the MCP server at ./my-server.py".

Why passive footprint matters

Every tool description and inputSchema in a registered MCP server is sent to the LLM on every turn — because the model needs to see them to decide which tool to call. A single verbose server can silently burn 5,000+ tokens per turn before anyone touches it.

mcp-scorecard footprint measures exactly that, so you can trim before you publish.

Roadmap

  • v0.1 — Layers A + B + D full, Layer C own rules, CLI + MCP server
  • v0.2 — MCP-Scan wrap, SARIF, real MCP client negotiation
  • v0.3 — Book『MCP実践セキュリティ』章別ルール取り込み
  • v0.4 — Registry-source targets (github: / npm:)

Support this project

License

MIT.

About

Pre-flight checks for MCP servers: passive token footprint, use-case scoping, security, and name safety. LLM-facing quality scorecard.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Contributors

Languages