Sandbox
@KryptosAI/mcp-observatory

CLI for MCP server testing and security checks

MCP Observatory checks MCP servers for broken tools, schema drift, unsafe schemas, and regression changes. It can scan local configs, test a specific server, record and replay sessions, generate health scores, and publish findings to GitHub Code Scanning or CI reports.

146 stars13 forksHTMLUpdated 7d ago
Who it's for

Builders who run Claude Code, Cursor, or other agents against MCP servers they maintain.

What it delivers

You can catch MCP breakage and security issues in CI before agents depend on them.

What it does

Attack simulation

Runs safe attack-readiness checks against MCP servers and can go deeper by invoking safe tools.

Schema drift detection

Compares runs and lock files to surface added, removed, and changed fields or parameters.

Record, replay, and verify

Captures a working session, replays it offline, and verifies later runs still match.

CI setup

Generates GitHub Action and other CI workflows with `setup-ci` or `init-ci`.

SARIF and reports

Outputs SARIF for Code Scanning plus Markdown and HTML reports for review and sharing.

MCP server mode

Runs as an MCP server so agents can inspect, score, and test other MCP servers.

How to get it

  1. 1Run a first check. No arguments starts demo (your servers, or the packaged local demo)
    npx @kryptosai/mcp-observatory
  2. 2Go deeper — also invoke safe tools to verify they actually run
    npx @kryptosai/mcp-observatory scan deep
  3. 3Test a specific server
    npx @kryptosai/mcp-observatory test npx -y @modelcontextprotocol/server-everything
  4. 4Add it to Claude Code as an MCP server
    claude mcp add mcp-observatory -- npx -y @kryptosai/mcp-observatory serve

README

MCP Observatory

MCP Observatory

CI CodeQL Coverage Workflow npm GitHub stars License: MIT

More badges

OpenSSF Scorecard Dependabot npm provenance workflow npm weekly downloads Node >= 20 Smithery mcp-observatory MCP server All Contributors Gitee Stars Gitee Forks MCP Registry MCP Market MCP Hub China OpenTools Gitee

Secure the MCP servers you're building. MCP Observatory is the CI-native security tool for teams shipping custom MCP servers. Test during development, catch schema drift, simulate attacks, and generate compliance evidence — before agents depend on your servers.

Also available in Simplified Chinese.

Runtime enforcement: Use mcp-seatbelt to block dangerous MCP tool calls at runtime based on observatory scan results.

Get Started

Step-by-step setup guide · macOS, Windows, Linux · Node.js 20+ and npm (install Node.js LTS).

1. Run your first scan

Open Terminal or PowerShell in your project folder and paste:

npx -y @kryptosai/mcp-observatory@latest

This downloads Observatory and checks your first configured MCP server. With no configured server, it uses an included example. To try only that example, run npx -y @kryptosai/mcp-observatory@latest demo --example.

2. Read the result

The terminal shows the target, grade, findings, and saved receipt path. Failed checks are findings to review, not a request to pay. If connection failed, fix the startup command or credentials and rerun. A demo grade describes the example, not your own server.

3. Save one hosted snapshot free (optional)

In the same project folder, run:

npx -y @kryptosai/mcp-observatory@latest cloud upload

Open the verification link printed in the terminal, confirm the code, connect with GitHub, then return to the terminal. Wait for Upload complete and open the dashboard link. No separate account setup or payment method is needed. Free includes one target, the latest snapshot, seven-day retention, and ten uploads per month.

Local scans and local CI stay free. Individual Pro is $29/month when you need 10 targets, 90-day history, hosted CI ingestion, or hosted HTTP scans.

MCP Observatory uses jurisdiction-aware product telemetry after showing the collection notice. Review the exact fields with telemetry preview, check the current policy with telemetry status, or stop collection at any time with telemetry disable, MCP_OBSERVATORY_TELEMETRY=0, or DO_NOT_TRACK=1. See the complete privacy and telemetry notice.

npx -y @kryptosai/mcp-observatory@latest test npx -y @modelcontextprotocol/server-everything
- uses: KryptosAI/mcp-observatory/action@v1

If this repo is an MCP package, that tests npx -y <package.json name>. Otherwise set command:.

Or generate a full workflow: npx -y @kryptosai/mcp-observatory@latest setup-ci --all --command "npx -y my-mcp-server" --sarif

Install: npx -y @kryptosai/mcp-observatory@latest · brew tap kryptosai/mcp-observatory https://github.com/KryptosAI/mcp-observatory && brew install mcp-observatory · docker pull ghcr.io/kryptosai/mcp-observatory:latest · curl -fsSL https://raw.githubusercontent.com/KryptosAI/mcp-observatory/main/scripts/install.sh | sh

docker run --rm ghcr.io/kryptosai/mcp-observatory:latest demo
docker run --rm ghcr.io/kryptosai/mcp-observatory:latest test npx -y @modelcontextprotocol/server-everything

Scanning a server on the host needs network and, for local files, a volume mount (-v "$PWD:$PWD" -w "$PWD").

Agents: npx -y @kryptosai/mcp-observatory@latest serve

Default-deny connect: npx -y @kryptosai/mcp-observatory@latest protect rewrites every discovered client config (Cursor, Claude, VS Code, .mcp.json, …). Undo: protect --undo. HTTP/SSE servers are left alone.

Runtime deny-default: npx -y @kryptosai/mcp-observatory@latest enforce --start-proxy writes a Seatbelt policy from the scan and starts the proxy. Local scan stays free.

Proof: Safety Index. Upload one hosted snapshot free with cloud upload; Individual Pro is $29/month when you need retained history and hosted CI ingestion.

Why MCP Observatory

MCP servers are becoming production dependencies. If agents rely on them, teams need a way to catch broken tools, unsafe schemas, schema drift, slow responses, and security footguns before those failures reach users.

Observatory gives maintainers and teams:

  • One-command CI setup with setup-ci --all
  • Profile-mapped audits with audit --profile nsa-mcp
  • MCP receipts that package target, evidence, verdict, action, and reproduction commands
  • MCP risk graphs that group servers by capability boundary, receipt state, CI posture, and recommended action
  • Action receipts that say allow, gate, rerun, quarantine, or escalate
  • GitHub PR comments for compatibility, drift, and security findings
  • GitHub Code Scanning SARIF for normalized MCP findings
  • Health score badges for public trust signals
  • Record/replay/verify workflows for regression testing
  • MCP server mode so agents can inspect other MCP servers directly
  • Production support path for one-user hosted history, CI ingestion, and owner-ready Release Gate remediation

See GitHub Code Scanning for MCP servers, MCP Receipts, Troubleshooting, Safety Methodology, MCP Server Safety Index, MCP Observatory Contributors, hosted client contract, repository boundary, open core boundary, and commercial support.

Self-Assessment

We scan ourselves with mcp-observatory on every release. See results →

For Security And Platform Teams

MCP servers are becoming part of the AI software supply chain. Agents need reliable, testable, auditable tools before those tools become dependencies in mission-critical workflows.

Whether you're shipping one MCP server or running a fleet, MCP Observatory gives you CI-native security scoring, attack simulation, schema drift detection, SARIF/HTML/Markdown reports, and GitHub Code Scanning — from your first npx command to production deployment. Local development stays free; teams with a near-term production approval decision can use the fixed-scope MCP Release Gate Pilot.

Production Support

Local OSS use stays free under MIT. Teams running MCP in production can use the MCP Release Gate Pilot for safe-mode evidence, SARIF/Code Scanning setup, CI rollout, private reporting, and owner-ready remediation notes. The fixed public entry offer is $15,000 for 1-3 critical MCP servers over ten business days; broader work is scoped after the release decision.

The open source repo is the portable evidence engine. Hosted authentication, retention, organization workflows, fleet coordination, and private intelligence stay outside the OSS package; see the repository boundary.

Run npx @kryptosai/mcp-observatory cloud, open a pilot request from the issue chooser, or see COMMERCIAL.md. Also see privacy, campaign attribution, and terms for production use.

How It Compares

Featuremcp-observatorySnyk agent-scanCisco mcp-scanneragent-shield
MCP-native
Attack simulation
Schema drift detection
Record/replay/verify
Health scoring (0-100)
SARIF output
CI/CD native (setup-ci)
Public Safety Index
Runtime enforcement via mcp-seatbelt

Quick Start

Run a first check. No arguments starts demo (your servers, or the packaged local demo):

npx @kryptosai/mcp-observatory

Go deeper — also invoke safe tools to verify they actually run:

npx @kryptosai/mcp-observatory scan deep

Test a specific server:

npx @kryptosai/mcp-observatory test npx -y @modelcontextprotocol/server-everything

Add it to Claude Code as an MCP server:

claude mcp add mcp-observatory -- npx -y @kryptosai/mcp-observatory serve

Or add it manually to your config:

{
  "mcpServers": {
    "mcp-observatory": {
      "command": "npx",
      "args": ["-y", "@kryptosai/mcp-observatory", "serve"]
    }
  }
}

Commands

CommandWhat it does
scanAuto-discover servers, check them, and run safe attack-readiness simulation by default
scan deepScan, run safe attack simulation, and also invoke safe tools to verify they execute
test <cmd> / test --target <file>Test one server and emit an action receipt by command or target config
record <cmd>Record a server session to a cassette file for offline replay
replay <cassette>Replay a cassette offline — no live server needed
verify <cassette> <cmd>Verify a live server still matches a recorded cassette
diff <base> <head>Compare two run artifacts for regressions and schema drift
watch <config>Watch a server for changes, alert on regressions
suggestDetect your stack and recommend MCP servers from the registry
serveStart as an MCP server for AI agents
lockSnapshot MCP server schemas into a lock file
lock verifyVerify live servers match the lock file
historyShow health score trends for your MCP servers
setup-ci / init-ciCreate a GitHub Action and badge snippet for MCP compatibility/security checks
setup-ci --sarifGenerate a workflow that uploads normalized findings to GitHub Code Scanning
setup-ci --doctorInspect whether the repository has a complete CI adoption kit
telemetry status|enable|disable|identify|previewInspect or control product telemetry and deliberately provide a contact email
risk-graph --input <path>Merge receipts and run artifacts into JSON, Markdown, and HTML MCP risk graphs
--no-attack-simOpt out of the default safe attack simulation on scan or test
ci-reportGenerate CI report for GitHub issue creation
enterprise-reportGenerate a static production/security report from run artifacts
score <cmd>Score an MCP server's health (0-100)
badge <cmd>Generate an SVG health score badge for README
cloudShow the free hosted snapshot, Individual Pro, and Release Gate Pilot options

Run with no arguments to start demo. Use --menu for the interactive catalog.

What It Does

Check capabilities — connects to a server and verifies tools, prompts, and resources respond correctly.

Invoke tools — goes beyond listing. Actually calls safe tools (no required params / readOnlyHint) and reports which ones work and which ones crash.

npx @kryptosai/mcp-observatory scan deep

Detect schema drift — diffs two runs and surfaces added/removed fields, type changes, and breaking parameter changes.

npx @kryptosai/mcp-observatory diff run-a.json run-b.json

Recommend servers — scans your project for languages, frameworks, databases, and cloud providers, then cross-references the MCP registry to suggest servers you're missing.

npx @kryptosai/mcp-observatory suggest

Or ask your agent "what MCP servers should I add?" when running in MCP server mode.

Security scanning — analyzes tool schemas for dangerous patterns: shell injection surfaces, broad filesystem access, missing auth, and credential leakage in responses.

npx @kryptosai/mcp-observatory test --security npx -y my-mcp-server

Record / replay / verify — capture a live session, replay it offline in CI, and verify nothing changed. Like VCR for MCP.

# Record a session
npx @kryptosai/mcp-observatory record npx -y @modelcontextprotocol/server-everything

# Replay offline (no server needed)
npx @kryptosai/mcp-observatory replay .mcp-observatory/cassettes/latest.cassette.json

# Verify the live server still matches
npx @kryptosai/mcp-observatory verify cassette.json npx -y @modelcontextprotocol/server-everything

Watch for regressions — re-runs checks on an interval and alerts when something changes.

npx @kryptosai/mcp-observatory watch target.json

Scan locations

When you run scan, it looks for MCP configs in:

  • ~/.claude.json (Claude Code)
  • ~/Library/Application Support/Claude/claude_desktop_config.json (Claude Desktop, macOS)
  • %APPDATA%/Claude/claude_desktop_config.json (Claude Desktop, Windows)
  • .claude.json and .mcp.json (current directory)

Architecture

                    ┌─────────────────────────┐
                    │   MCP Observatory CLI    │
                    │  npx @kryptosai/mcp-     │
                    │     observatory scan     │
                    └───────────┬─────────────┘
                                │
                    ┌───────────▼─────────────┐
                    │   Config Discovery       │
                    │  (Claude, Cursor, etc.)  │
                    └───────────┬─────────────┘
                                │
              ┌─────────────────┼─────────────────┐
              ▼                 ▼                  ▼
    ┌─────────────────┐ ┌──────────────┐ ┌──────────────────┐
    │   Security Scan  │ │  Attack Sim  │ │  Schema Drift    │
    │  (shell, creds)  │ │ (tool poison)│ │  (version diff)  │
    └────────┬────────┘ └──────┬───────┘ └────────┬─────────┘
             │                 │                   │
             └─────────────────┼───────────────────┘
                               ▼
                    ┌─────────────────────┐
                    │   Health Score       │
                    │  (0-100 + verdict)   │
                    └──────────┬──────────┘
                               │
              ┌────────────────┼────────────────┐
              ▼                ▼                 ▼
    ┌──────────────┐  ┌──────────────┐  ┌──────────────┐
    │  SARIF       │  │  Markdown    │  │  CI Gateway  │
    │  (Code Scan) │  │  Report      │  │  (setup-ci)  │
    └──────────────┘  └──────────────┘  └──────────────┘

CI / GitHub Action

Add Observatory to your MCP server's CI pipeline:

npx @kryptosai/mcp-observatory setup-ci --all --command "npx -y my-mcp-server" --sarif --schedule weekly

Check the adoption kit:

npx @kryptosai/mcp-observatory setup-ci --doctor

Successful test, run, and single-target scan checks also offer to convert the passing result into a CI adoption kit. That automatic conversion enables SARIF/Code Scanning and weekly scheduled checks by default; pass --no-ci-sarif when you only want a conservative workflow without Code Scanning upload.

Or create the workflow manually:

# .github/workflows/observatory.yml
name: MCP Server Check
on: [pull_request]

permissions:
  contents: read

jobs:
  observatory:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: KryptosAI/mcp-observatory/action@v1
        with:
          command: npx -y my-mcp-server
          deep: true
          security: true
          comment-on-pr: false
          set-status: false

GitLab CI

Runs the same test scan on merge requests and on main, publishing the SARIF as a GitLab SAST report so findings appear in the merge request security widget. This matches what setup-ci --ci-provider gitlab-ci generates.

# .gitlab-ci.yml
mcp-observatory:
  image: node:22
  rules:
    - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
    - if: $CI_COMMIT_BRANCH == 'main'
  script:
    - npx @kryptosai/mcp-observatory test npx -y my-mcp-server --deep --security --sarif mcp-observatory.sarif
  artifacts:
    reports:
      sast: mcp-observatory.sarif

Or let the CLI write it for you:

npx @kryptosai/mcp-observatory setup-ci --ci-provider gitlab-ci --command "npx -y my-mcp-server"

Action inputs:

InputDescriptionDefault
commandServer command to test(optional; omit to scan discovered servers)
targetPath to target config JSON
targetsPath to MCP config file for multi-server matrix scan
deepAlso invoke safe toolsfalse
securityRun security analysisfalse
fail-on-regressionFail the action on issuestrue
fail-on-baseline-driftFail the action when baseline verification detects drifttrue
comment-on-prPost report as PR comment. Requires pull-requests: write.true
set-statusSet a commit status check (green/red) on the HEAD SHA. Requires statuses: write.true
github-tokenToken for PR comments and commit statuses${{ github.token }}

The action can comment on PRs and set commit statuses when the workflow grants write permissions. setup-ci generates read-only third-party-friendly workflows by default and lets maintainers opt into comments/statuses later. init-ci remains available as a backward-compatible alias. See action/README.md for all options.

Production teams with a near-term MCP approval decision can use the fixed-scope MCP Release Gate Pilot: an approve, gate, or defer decision for 1–3 servers in ten business days. See COMMERCIAL.md or request a decision at mcp-observatory.com/release-gate-pilot.

Evidence badges for MCP Observatory

MCP server maintainers can add a public compatibility/security signal to their README:

[![MCP Observatory](https://img.shields.io/badge/MCP%20Observatory-enabled-2563eb)](https://github.com/KryptosAI/mcp-observatory)

Or generate a score badge from a live check:

npx @kryptosai/mcp-observatory badge npx -y my-mcp-server --output docs/mcp-health.svg

See the evidence distribution loop for the GitHub Action template, maintainer PR body, and badge rollout playbook. A badge is a public evidence signal, not a certification or endorsement.

Generate a pilot-ready production/security report from local run artifacts:

npx @kryptosai/mcp-observatory enterprise-report \
  --account "Your Company" \
  --format html \
  --output observatory-enterprise-report.html

For clearer internal account attribution in CI, set:

MCP_OBSERVATORY_ORG=your-company.com

To deliberately associate a contact email and optional contact-channel slug with private telemetry analytics, run mcp-observatory telemetry identify --email <address> [--channel <slug>]. Setting an organization or identifying a contact does not authorize outreach.

Testing Feishu/Lark integrations? See the Feishu/Lark MCP guide.

Lock Files

$ npx @kryptosai/mcp-observatory lock              # Snapshot all server schemas
$ npx @kryptosai/mcp-observatory lock verify        # Verify no drift since last lock

Lock files are the package-lock for AI tools: commit the MCP contract, then make every tool, schema, prompt, or resource drift visible in CI. See MCP lock files.

Trend Tracking

$ npx @kryptosai/mcp-observatory history            # Show health trends over time

Nightly Scans

$ npx @kryptosai/mcp-observatory ci-report          # Generate regression report for CI

MCP Server Mode

No other testing tool is itself an MCP server. Add Observatory as a server and your AI agent can autonomously test, diagnose, and monitor your other MCP servers.

claude mcp add mcp-observatory -- npx -y @kryptosai/mcp-observatory serve

Your agent gets 10 tools:

ToolWhen to use it
scanCheck if all your configured MCP servers are healthy
check_serverTest a specific server before installing or after updating
score_serverGet a quick health score and grade for a server
recordCapture a baseline of a working server for future comparison
replayTest against a recorded session — no live server needed
verifyConfirm a server update didn't break anything
watchCheck a server and see what changed since the last check
diff_runsFind regressions between two check results
get_last_runRetrieve previous check results for a server
suggest_serversDiscover MCP servers that match your project stack

An AI tool that checks other AI tools. It is a tool testing tools that serve tools.

Security

The MCP server runs inside AI hosts where an LLM chooses which tools t

Files in the repo

Repository payload40 top-level entries
  • .github
  • action
  • dashboard
  • docs
  • examples
  • Formula
  • github-app
  • schemas
  • scripts
  • src
  • tests
  • .all-contributorsrc
  • .dockerignore
  • .gitignore
  • .releaserc.json
  • AGENTS.md
  • CHANGELOG.md
  • CODE_OF_CONDUCT.md
  • COMMERCIAL.md
  • CONTRIBUTING.md
  • CONTRIBUTING.zh-CN.md
  • CONTRIBUTORS.md
  • design-qa.md
  • Dockerfile
  • eslint.config.js
  • glama.json
  • LICENSE
  • llms.txt
  • package-lock.json
  • package.json
  • PRIVACY.md
  • README-zh-CN.md
  • README.md
  • ROADMAP.md
  • SECURITY.md
  • server.json
  • smithery.yaml
  • TERMS.md
  • tsconfig.json
  • vitest.config.ts

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k
anthropics/
claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

145k

Fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in multi-language ruleset (NPE, thread-safety, XSS, SQL injection), OpenAI & Anthropic compatible.

22k

An open-source AI agent that brings the power of Gemini directly into your terminal.

107k
sickn33/
agentic-awesome-skills

AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,115+ agentic skills. Includes CLI, local MCP, catalog, plugins, and Workbench.

46k