Sandbox
@syrin-labs/cli

CLI for MCP server analysis and test runs

Syrin checks MCP servers for contract problems before production. It can list exposed tools, analyse schemas and descriptions without running them, test tools in a sandbox, and watch live agent interactions through its `dev` mode.

48 stars3 forksTypeScriptUpdated 7mo ago
Who it's for

Builders who want their MCP servers to be easier for agents to use safely and consistently.

What it delivers

You can catch tool mismatches, side effects, and output problems before an agent runs into them.

What it does

Static analysis

`syrin analyse` finds missing descriptions, ambiguous tools, underspecified inputs, circular dependencies, and output explosions without executing tools.

Sandboxed testing

`syrin test` runs tools against defined contracts and checks expected outputs, validation errors, and behavior.

Interactive dev mode

`syrin dev` lets you watch an LLM interact with your MCP server in real time.

Server inspection

`syrin list` shows the tools, resources, and prompts a server exposes.

Project setup and validation

`syrin init` creates `syrin.yaml` and a `tools/` directory, and `syrin doctor` checks config, environment, and connections.

CI support

The README shows a GitHub Actions workflow that runs `syrin analyse --ci` and `syrin test --ci --strict`.

How to get it

  1. 1One command. No install, no config, no API keys
    npx @syrin/cli analyse --transport http --url https://docs.syrin.dev/mcp
  2. 2Have your own MCP server running? Point Syrin at it
    npx @syrin/cli analyse --transport http --url http://localhost:8000/mcp
  3. 3If your server uses stdio instead of HTTP
    npx @syrin/cli analyse --transport stdio --script "python server.py"
  4. 4Want to try more commands against a local example server?
    git clone https://github.com/Syrin-Labs/cli.git
    cd cli/examples/demo-mcp-py
    python3 -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt
    python server.py --mode http --port 8000 &
    
    npx @syrin/cli list tools --transport http --url http://localhost:8000/mcp
    npx @syrin/cli analyse --transport http --url http://localhost:8000/mcp
  5. 5Run
    # Run without installing
    npx @syrin/cli analyse --transport http --url http://localhost:8000/mcp
    
    # Or install globally
    npm install -g @syrin/cli
    syrin --version
  6. 6Run
    syrin init                 # Creates syrin.yaml + tools/ directory
    syrin doctor               # Validates config and connections
    syrin analyse              # Analyse your MCP server
    syrin test                 # Run contract tests
    syrin dev --exec           # Interactive LLM-MCP session

README

Syrin

Syrin Logo

npm version License: ISC Node.js Version

A linter + test runner for MCP servers.


The Problem

MCP (Model Context Protocol) is how AI agents call external tools — read files, query databases, hit APIs. If you are building or using an MCP server, your AI agent depends on those tool definitions being correct.

They usually are not.

  • Tool descriptions too vague for the LLM to pick the right one
  • Two tools look so similar the model picks one at random
  • Parameter schemas missing or wrong — LLM hallucinates values
  • A tool returns 12MB of JSON and blows the context window
  • Another tool silently writes to disk when it should not
  • Your logs look fine. The agent is broken.

Syrin catches all of this before production.

$ syrin analyse --transport http --url http://localhost:8000/mcp

 E110  Tool Ambiguity           get_user ↔ fetch_user
 E101  Missing Tool Description process_data has no description
 E102  Underspecified Input     user_id: no format, no example, no enum
 E105  Free Text Propagation    get_status → update_user (unconstrained string)
 W104  Generic Description      "Get data" — too vague for tool selection

 5 issues found (4 errors, 1 warning)

See It In Action

syrin analyse demo


Try It Right Now

One command. No install, no config, no API keys:

npx @syrin/cli analyse --transport http --url https://docs.syrin.dev/mcp

Have your own MCP server running? Point Syrin at it:

npx @syrin/cli analyse --transport http --url http://localhost:8000/mcp

If your server uses stdio instead of HTTP:

npx @syrin/cli analyse --transport stdio --script "python server.py"

Want to try more commands against a local example server?

git clone https://github.com/Syrin-Labs/cli.git
cd cli/examples/demo-mcp-py
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python server.py --mode http --port 8000 &

npx @syrin/cli list tools --transport http --url http://localhost:8000/mcp
npx @syrin/cli analyse --transport http --url http://localhost:8000/mcp

Requirements: Node.js >= 20.12, npm >= 9


What Syrin Catches

CodeIssueWhat Happens Without Syrin
E110Tool AmbiguityLLM picks the wrong tool at random
E101Missing DescriptionLLM has no idea what the tool does
E102Underspecified InputLLM hallucinates parameter values
E105Free Text PropagationLLM passes sentences where data is expected
E103Type MismatchTool chains break silently
E107Circular DependencyAgent loops forever, burns tokens
E301Output Explosion12MB response blows the context window
E500Side Effect DetectedTool writes to disk when it should not

See the full list: Error Reference · Warning Reference


Commands

CommandWhat It Does
syrin listShow tools, resources, and prompts a server exposes
syrin analyseStatic analysis — catch contract issues without executing tools
syrin testRun tools in a sandbox and validate behavior against contracts
syrin devInteractive session — watch an LLM interact with your tools in real time
syrin doctorValidate your config, environment, and connections

Zero-config commands: list, analyse, and test --connection work with just --url or --script. No config file needed.

Config required: dev mode needs LLM API keys. Run syrin init --global to set up once.


All Demos

syrin analyse
Catch contract issues
syrin dev
Interactive development
syrin test
Sandboxed tool testing
syrin analyse demosyrin dev demosyrin test demo
syrin init
Project setup
syrin list
Inspect tools
syrin test --connection
Connection test
syrin init demosyrin list demosyrin test --connection demo

Install

# Run without installing
npx @syrin/cli analyse --transport http --url http://localhost:8000/mcp

# Or install globally
npm install -g @syrin/cli
syrin --version

Set Up for a Project

syrin init                 # Creates syrin.yaml + tools/ directory
syrin doctor               # Validates config and connections
syrin analyse              # Analyse your MCP server
syrin test                 # Run contract tests
syrin dev --exec           # Interactive LLM-MCP session

Tool Contracts

Define behavioral guarantees for your tools in tools/<tool-name>.yaml:

version: 1
tool: fetch_user

contract:
  input_schema: FetchUserRequest
  output_schema: User

guarantees:
  side_effects: none
  max_output_size: 10kb

tests:
  - name: 'valid user'
    input:
      user_id: '123'
    expect:
      output_schema: User

  - name: 'invalid input'
    input:
      user_id: 123
    expect:
      error:
        type: input_validation

Run tests: syrin test or syrin test --tool fetch_user

Documentation: Writing Test Cases · Test Your MCP Tools


CI Integration

# .github/workflows/syrin.yml
name: MCP Validation
on: [push, pull_request]
jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npm install -g @syrin/cli
      - run: syrin analyse --ci
      - run: syrin test --ci --strict

See full CI docs: Add Syrin to CI


Documentation

Full docs at docs.syrin.dev

TopicLink
Getting Starteddocs.syrin.dev/getting-started
Setup Guidedocs.syrin.dev/setup
Configurationdocs.syrin.dev/configuration
All Commandsdocs.syrin.dev/commands
Error Referencedocs.syrin.dev/testing/error-reference

Community


Contributing

Contributions welcome. See Contributing Guide and Code of Conduct.

For security issues: Security Policy.

License

ISC License. See LICENSE.

Made by Syrin Labs.

Files in the repo

Repository payload24 top-level entries
  • .github
  • .husky
  • .syrin
  • assets
  • docs
  • examples
  • src
  • .gitignore
  • .npmignore
  • .prettierignore
  • .prettierrc.json
  • CHANGELOG.md
  • CLAUDE.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • eslint.config.cjs
  • LICENSE
  • package-lock.json
  • package.json
  • README.md
  • SECURITY.md
  • tsconfig.json
  • tsconfig.node.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
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
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

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k