IamBishal
AuthorDeveloper ToolsAI / LLM

MCP Touchstone

Conformance, robustness and security tests for MCP servers, safe by default and built for CI.

A black-box tester for Model Context Protocol servers: it checks the spec, how the server copes with bad input, and known security problems, without calling a tool it was not allowed to.

MCP Touchstone cover: the headline 'Test your MCP server before an agent does.' beside a terminal where a full test run flags a high-severity rug pull in a tool description.
Your role
Author
Language
Python
License
MIT
Status
Active

Overview

Why it exists

MCP servers are becoming the way AI agents reach real systems, and most of them have never been tested from the outside. MCP Touchstone points at any server, a local command or a URL, and reports whether it follows the specification (2026-07-28 and 2025-11-25, detected automatically), how it behaves when things go wrong, and whether it shows known security problems such as hidden instructions in tool descriptions, tools that change after approval, or errors that leak secrets.

It is safe by default. It only calls tools a server marks read-only unless you allow more, and the checks that attack (path traversal, shell injection, server-side request forgery) only ever run against a server locked inside a Docker sandbox with no network. Every report lists each call it made and each tool it called.

It proves itself on a proving ground of deliberately broken servers and clean ones, checked exactly in CI, and it fits into a pipeline: SARIF for GitHub code scanning with OWASP MCP Top 10 tags, JUnit for any CI, a config file where accepted findings need a written reason, baselines for adopting it on an existing server, and a GitHub Action. It can also run the official MCP conformance suite alongside its own checks.

Topics

  • AI agents
  • Security testing
  • Developer tools

Features

What it can do

  • 53 checks in seven suites: conformance, transport, deprecation, tool schemas, robustness, failure behaviour and security
  • Speaks MCP 2026-07-28 and 2025-11-25, with the spec version detected automatically
  • Robustness: malformed messages and schema-guided input fuzzing, with crashes, hangs and stack traces reported
  • Security: tool poisoning, rug pulls, injection canaries, leaky errors, HTTP Origin and authentication checks
  • Safe by default: read-only tools only, or a no-network Docker sandbox for servers you do not trust
  • Reports for people and pipelines: terminal, JSON, SARIF, JUnit and a self-contained HTML page
  • A GitHub Action, a config file with reasoned accepted findings, and baselines
  • Optional run of the official MCP conformance suite, and an optional capped Claude judge for weak signs

Quick start

Up and running

  1. Install

    Requires Python 3.12 and uv.

    Terminal
    git clone https://github.com/bishal-saha/mcp-touchstone.git && cd mcp-touchstone
    uv sync
  2. Test a local server

    Any MCP server you can start from a command (stdio).

    Terminal
    uv run mcp-touchstone run -- python server.py
  3. Test a server over HTTP

    Terminal
    uv run mcp-touchstone run --url http://127.0.0.1:8000/mcp
  4. Test a server you do not trust

    Runs it in Docker with no network and a read-only file system, and allows every tool.

    Terminal
    uv run mcp-touchstone run --mode sandbox -- python server.py
  5. Run it in CI

    Uploads SARIF to code scanning and fails the job at or above fail-on.

    YAML
    permissions:
      contents: read
      security-events: write
    
    steps:
      - uses: actions/checkout@v7
      - uses: bishal-saha/mcp-touchstone/action@v0.1.0
        with:
          command: python server.py
          args: --suite conformance --suite security
          fail-on: medium

Tech stack

Built with

Language
  • Python 3.12
Protocol
  • MCP stdio
  • Streamable HTTP
  • JSON-RPC
Sandbox
  • Docker (no network, read-only root)
Reports
  • SARIF
  • JUnit
  • JSON
  • HTML
CI
  • GitHub Action
  • pre-commit
Judge (optional)
  • Claude, capped

Screens

A look inside

01Catches a rug pull mid-session
02Self-contained HTML report
03Findings in GitHub code scanning

Bishal SahaLet's build together

Have a system to design, or an AI feature to get right?

Tell me about the problem. You'll get a clear, honest view of the best way forward.

  • Reply within 24 hoursOn business days, with my honest view and a next step.
  • Accepting select engagementsArchitecture, AI features and full builds.
  • Remote, worldwideWorking with startups, SMEs and enterprises.