Skip to main content

CI-first conformance testing and benchmarking CLI for MCP servers. Lint your MCP server before your users do.

Project description

mcp-halflist

Lint your MCP server before your users do.

CI-first conformance testing CLI for Model Context Protocol servers. Point it at your server, get a scored health report.

Installation

pip install mcp-halflist

Quick Start

# Full audit of the official MCP reference server
halflist audit --stdio "npx -y @modelcontextprotocol/server-everything"

# JSON output for CI pipelines
halflist audit --stdio "npx -y @modelcontextprotocol/server-everything" --format json

Test your own server

halflist audit --stdio "python3 my_server.py"
halflist check --stdio "python3 my_server.py" --format json

More examples

# Time server
halflist check --stdio "npx -y @modelcontextprotocol/server-time"

# Fetch server
halflist check --stdio "npx -y @modelcontextprotocol/server-fetch"

# Filesystem server
halflist check --stdio "npx -y @modelcontextprotocol/server-filesystem /tmp"

Commands

halflist audit — Full Audit (Recommended)

Run conformance checks + benchmark every tool in a single shot.

# One command, full picture
halflist audit --stdio "npx -y @modelcontextprotocol/server-everything"

# JSON output for CI
halflist audit --stdio "python3 my_server.py" --format json

# Control benchmark iterations
halflist audit --stdio "python3 my_server.py" --iterations 50

halflist check — Conformance Testing

Run protocol conformance checks against an MCP server.

halflist check --stdio "npx -y @modelcontextprotocol/server-everything"
halflist check --stdio "python3 my_server.py" --format json
halflist check --stdio "python3 my_server.py" --suite handshake --verbose

halflist bench — Latency Benchmarking

Benchmark latency per tool with p50/p95/p99 percentiles.

# Benchmark first 5 tools (default)
halflist bench --stdio "npx -y @modelcontextprotocol/server-everything"

# Benchmark specific tools
halflist bench --stdio "python3 my_server.py" --tool search --tool get_topic

# Benchmark all tools with 50 iterations
halflist bench --stdio "python3 my_server.py" --all --iterations 50

# JSON output
halflist bench --stdio "python3 my_server.py" --format json

halflist watch — Health Monitoring

Continuously monitor an MCP server's health.

# Probe every 60 seconds (default)
halflist watch --stdio "npx -y @modelcontextprotocol/server-time"

# Custom interval, log to file
halflist watch --stdio "python3 my_server.py" --interval 30 --log health.jsonl

# Run 10 probes and exit
halflist watch --stdio "python3 my_server.py" --count 10

halflist report — Markdown & Badges

Generate markdown or SVG badge from a halflist JSON report.

# Generate markdown from audit results
halflist audit --stdio "python3 my_server.py" --format json > results.json
halflist report results.json

# Generate SVG badge
halflist report results.json --badge -o badge.svg

# Generate markdown from bench results
halflist bench --stdio "python3 my_server.py" --format json > bench.json
halflist report bench.json -o BENCH.md

What It Checks

Handshake Suite

  • Server responds to initialize with valid response
  • Protocol version returned
  • Capabilities object present
  • Server info has name and version
  • notifications/initialized accepted
  • Ping returns pong

Tools Suite

  • tools/list returns valid array
  • At least 1 tool exists
  • Every tool has a non-empty name
  • Every tool has a description
  • inputSchema contains "type": "object"
  • No duplicate tool names
  • Tool names follow recommended pattern
  • Tool call with generated args returns valid response
  • Tool call with empty args handles gracefully
  • Response content is a list
  • Each content item has a type field

Output Formats

Terminal (default)

Rich, colored output with a scored summary:

╭─ mcp-halflist v0.2.0 ──────────────────────────────────────╮
│                                                              │
│  Server:     my-server v1.0.0                               │
│  Transport:  stdio                                           │
│  Score:      94/100  ████████████████████░░  94%             │
│                                                              │
╰──────────────────────────────────────────────────────────────╯

JSON (--format json)

Full structured report suitable for CI integration. Returns a HalflistReport, BenchReport, or AuditReport object with score, suites, benchmarks, and timing data.

Markdown (halflist report)

Generate markdown tables from JSON output, suitable for embedding in README or PR comments.

SVG Badge (halflist report --badge)

Shields.io-style SVG badge showing score or benchmark summary.

Exit Codes

Code Meaning
0 All checks passed (warnings OK)
1 One or more failures
2 Connection/transport error
3 Configuration error (bad flags)

CLI Options

halflist audit --stdio <command>   Launch server via stdio (check + bench all tools)
               -n / --iterations   Benchmark iterations per tool (default: 10)
               -w / --warmup       Warmup iterations (default: 2)
               --verbose           Show all check details
               --format <fmt>      Output format: terminal or json
               --quiet / -q        Suppress server stderr
               --timeout <secs>    Timeout per operation (default: 30)

halflist check --stdio <command>   Launch server via stdio
               --format <fmt>      Output format: terminal (default) or json
               --suite <name>      Filter to specific suite(s), repeatable
               --verbose           Show all check details
               --quiet / -q        Suppress server stderr
               --timeout <secs>    Timeout per operation (default: 30)

halflist bench --stdio <command>   Launch server via stdio
               --tool <name>       Benchmark specific tool(s), repeatable
               --all               Benchmark all tools (default: first 5)
               -n / --iterations   Iterations per tool (default: 10)
               -w / --warmup       Warmup iterations (default: 2)
               --format <fmt>      Output format: terminal or json
               --quiet / -q        Suppress server stderr
               --timeout <secs>    Timeout per operation (default: 30)

halflist watch --stdio <command>   Launch server via stdio
               -i / --interval     Seconds between probes (default: 60)
               -c / --count        Number of probes (default: infinite)
               -l / --log <file>   Append JSONL probes to file
               --quiet / -q        Suppress server stderr
               --timeout <secs>    Timeout per operation (default: 30)

halflist report <file.json>        Path to halflist JSON report
               --format <fmt>      Output format: markdown (default)
               --badge             Generate SVG badge instead
               -o / --output       Write to file

halflist --version                 Print version and exit

How It Compares

mcp-halflist MCP Inspector mcp-probe
Approach Automated test suite Interactive GUI Request-level testing
CI-first Yes No Partial
Scored reports Yes No No
Benchmarking Yes No No
Zero config Yes Yes Yes

Think of it this way: MCP Inspector and mcp-probe are Postman. mcp-halflist is pytest.

Development

git clone https://github.com/abhishekhsingh/mcp-halflist.git
cd mcp-halflist
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

# Run tests
pytest

# Run against fixture servers
halflist check --stdio "python tests/servers/good_server.py"
halflist check --stdio "python tests/servers/bad_server.py"

# Lint
ruff check src/ tests/

License

MIT

Author

Abhishekh Singh

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_halflist-0.2.0.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

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

mcp_halflist-0.2.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mcp_halflist-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8ce95b41cd70816f4135fb5f22b96733317cb727f31b0a4f98d09dcc8d253910
MD5 8a1d4e067f6faca1111d01bda277d086
BLAKE2b-256 17860bef825d540b83bf3222ff37ebe861ebc092c529afe94ed268ad5e1ac881

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mcp_halflist-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49cd5b19a059456201e2361d991fd81ab2b1548c48ba8f02bf688c3051172628
MD5 5d34e9daf8a4457386e948d09098ba0e
BLAKE2b-256 bcd447ed0573b6226cad160af4d941665e3008736baa1215dbbbfd4e2667e0b6

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