# litmus MCP server

> Grades MCP servers and agent skills from A to F using a reproducible behavioral harness to detect security vulnerabilities and injection risks.

- Repository: https://github.com/polygraphso/litmus
- Page: https://hostedmcp.org/servers/polygraphso/litmus
- Transport: stdio, remote
- Stars: 8
- License: Apache-2.0
- Latest version: 0.36.0

## Install

### Claude Code

```sh
claude mcp add litmus -- npx -y @polygraphso/litmus
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "litmus": {
      "command": "npx",
      "args": [
        "-y",
        "@polygraphso/litmus"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "litmus": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@polygraphso/litmus"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"litmus","type":"stdio","command":"npx","args":["-y","@polygraphso/litmus"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "litmus": {
      "command": "npx",
      "args": [
        "-y",
        "@polygraphso/litmus"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add litmus -- npx -y @polygraphso/litmus
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.litmus]
command = "npx"
args = ["-y", "@polygraphso/litmus"]
```

### Gemini CLI

```sh
gemini mcp add -s user litmus npx -- -y @polygraphso/litmus
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "litmus": {
      "command": "npx",
      "args": [
        "-y",
        "@polygraphso/litmus"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `NEXT_PUBLIC_POLYGRAPH_NETWORK` | no | no | Which network to read attestations from: 'base' (mainnet, default) or 'base-sepolia' (testnet). |
| `POLYGRAPH_API_URL` | no | no | Base URL for published-grade lookups (check_server, list_servers, request_grade) and attestation resolution. |

## FAQ

### How do I grade an MCP server?

You can grade a server in one command using npx by pointing the litmus tool at an npm, pypi, GitHub, or local entry file.

### What categories does the litmus harness test?

The harness runs four probe categories: tool-output injection, permission/egress, sensitive-data handling, and adversarial-input handling.

### Can I use litmus in my CI/CD pipeline?

Yes, you can use the polygraph-mcp-gate GitHub Action to fail builds when an MCP server or Agent Skill receives a D or F grade.

### Is the grading process secure?

The harness runs the target's code within a Docker-sandboxed environment to manage egress security.
