npm package: @meshailabs/mcp-server
Description: MeshAI MCP Server — governance & observability for any MCP-compatible AI tool
Author: MeshAI Labs
Latest version: 0.1.0

# MeshAI MCP Server

Governance and observability for any MCP-compatible AI tool — Claude Desktop, Cursor, Windsurf, Cline, Roo Code, AWS Kiro, VS Code, JetBrains, Zed, Warp, and more.

## What It Does

Adds MeshAI Agent Control Plane capabilities to any AI tool that supports MCP:

- **Register** the tool as a governed agent
- **Track usage** (tokens, cost per model)
- **Check policies** before executing actions
- **Query compliance** (EU AI Act readiness score)
- **Report incidents** (Article 73 serious incident reporting)
- **View audit trail** of governance events

## Supported Tools

| Tool | MCP Support | Proxy Support | MCP Server Fills Gap? |
|------|------------|---------------|----------------------|
| Claude Desktop | Yes | No | **Yes** |
| Claude Code | Yes | Yes | Optional |
| Cursor | Yes | Yes | Optional |
| Windsurf | Yes | Partial | **Yes** |
| Cline | Yes | Yes | Optional |
| Roo Code | Yes | Yes | Optional |
| Kilo Code | Yes | Yes | Optional |
| AWS Kiro | Yes | TBD | **Yes** |
| VS Code Copilot | Yes | No | **Yes** |
| JetBrains IDEs | Yes | No | **Yes** |
| Zed | Yes | No | **Yes** |
| Warp | Yes | No | **Yes** |
| Continue.dev | Yes | Yes | Optional |
| Sourcegraph Cody | Yes | Yes | Optional |
| Tabnine | Yes | No | **Yes** |
| Amazon Q Developer | Yes | No | **Yes** |
| Gemini CLI | Yes | No | **Yes** |
| Goose | Yes | No | **Yes** |
| Codex | Yes | Yes | Optional |

## Setup

### 1. Get your MeshAI API key

Sign up at [meshai.dev](https://meshai.dev) or get a key from your admin.

### 2. Configure in your tool

No global install needed — each tool config uses `npx` to fetch and run the server automatically.

#### Claude Desktop

Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (Mac) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json
{
  "mcpServers": {
    "meshai": {
      "command": "npx",
      "args": ["-y", "github:meshailabs-org/meshai-mcp-server"],
      "env": {
        "MESHAI_API_KEY": "msh_your_key_here",
        "MESHAI_AGENT_NAME": "claude-desktop"
      }
    }
  }
}
```

#### Cursor

Add to `.cursor/mcp.json` or Settings > MCP Servers:

```json
{
  "meshai": {
    "command": "npx",
    "args": ["-y", "github:meshailabs-org/meshai-mcp-server"],
    "env": {
      "MESHAI_API_KEY": "msh_your_key_here",
      "MESHAI_AGENT_NAME": "cursor"
    }
  }
}
```

#### Windsurf

Edit `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "meshai": {
      "command": "npx",
      "args": ["-y", "github:meshailabs-org/meshai-mcp-server"],
      "env": {
        "MESHAI_API_KEY": "msh_your_key_here",
        "MESHAI_AGENT_NAME": "windsurf"
      }
    }
  }
}
```

#### Cline / Roo Code / Kilo Code

Settings > MCP Servers > Add Server:
- Command: `npx`
- Args: `-y github:meshailabs-org/meshai-mcp-server`
- Environment: `MESHAI_API_KEY=msh_...`, `MESHAI_AGENT_NAME=cline`

#### AWS Kiro

Add to `.kiro/mcp.json`:

```json
{
  "mcpServers": {
    "meshai": {
      "command": "npx",
      "args": ["-y", "github:meshailabs-org/meshai-mcp-server"],
      "env": {
        "MESHAI_API_KEY": "msh_your_key_here",
        "MESHAI_AGENT_NAME": "kiro"
      }
    }
  }
}
```

#### VS Code (GitHub Copilot)

Add to `.vscode/mcp.json`:

```json
{
  "servers": {
    "meshai": {
      "command": "npx",
      "args": ["-y", "github:meshailabs-org/meshai-mcp-server"],
      "env": {
        "MESHAI_API_KEY": "msh_your_key_here",
        "MESHAI_AGENT_NAME": "vscode"
      }
    }
  }
}
```

#### JetBrains IDEs (IntelliJ, PyCharm, WebStorm, GoLand, etc.)

Settings > Tools > AI Assistant > Model Context Protocol (MCP) > Add Server:
- Command: `npx`
- Args: `-y github:meshailabs-org/meshai-mcp-server`
- Environment: `MESHAI_API_KEY=msh_...`, `MESHAI_AGENT_NAME=jetbrains`

#### Zed

Add to `~/.config/zed/settings.json`:

```json
{
  "context_servers": {
    "meshai": {
      "source": "custom",
      "command": {
        "path": "npx",
        "args": ["-y", "github:meshailabs-org/meshai-mcp-server"]
      },
      "env": {
        "MESHAI_API_KEY": "msh_your_key_here",
        "MESHAI_AGENT_NAME": "zed"
      }
    }
  }
}
```

#### Warp

Settings > Agent > MCP > Add Server:
- Command: `npx`
- Args: `-y github:meshailabs-org/meshai-mcp-server`
- Environment: `MESHAI_API_KEY=msh_...`, `MESHAI_AGENT_NAME=warp`

#### Continue.dev

Add to `~/.continue/config.yaml`:

```yaml
mcpServers:
  - name: meshai
    command: npx
    args:
      - "-y"
      - "github:meshailabs-org/meshai-mcp-server"
    env:
      MESHAI_API_KEY: msh_your_key_here
      MESHAI_AGENT_NAME: continue
```

#### Amazon Q Developer

Add to `~/.aws/amazonq/mcp.json` or `.amazonq/mcp.json`:

```json
{
  "mcpServers": {
    "meshai": {
      "command": "npx",
      "args": ["-y", "github:meshailabs-org/meshai-mcp-server"],
      "env": {
        "MESHAI_API_KEY": "msh_your_key_here",
        "MESHAI_AGENT_NAME": "amazon-q"
      }
    }
  }
}
```

#### Gemini CLI

Add to `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "meshai": {
      "command": "npx",
      "args": ["-y", "github:meshailabs-org/meshai-mcp-server"],
      "env": {
        "MESHAI_API_KEY": "msh_your_key_here",
        "MESHAI_AGENT_NAME": "gemini-cli"
      }
    }
  }
}
```

#### Sourcegraph Cody / Tabnine / Goose

These tools follow similar MCP configuration patterns. Set:
- Command: `npx`
- Args: `-y github:meshailabs-org/meshai-mcp-server`
- Environment: `MESHAI_API_KEY=msh_your_key_here`, `MESHAI_AGENT_NAME=<tool-name>`

Refer to each tool's MCP documentation for the exact config file location.

## Available Tools

| Tool | Description |
|------|-------------|
| `meshai_register` | Register this agent with MeshAI |
| `meshai_heartbeat` | Send health heartbeat |
| `meshai_track_usage` | Report token usage for cost tracking |
| `meshai_check_policy` | Check if a model/provider is allowed by governance policies |
| `meshai_get_risk` | Get this agent's EU AI Act risk classification |
| `meshai_get_compliance` | Get compliance readiness score (0-120) |
| `meshai_report_incident` | Report a security incident (Article 73) |
| `meshai_audit_log` | Query the governance audit trail |

## Available Resources

| URI | Description |
|-----|-------------|
| `meshai://agent/status` | Current agent status and metadata |
| `meshai://governance/policies` | Active governance policies |
| `meshai://compliance/score` | EU AI Act readiness score |

## Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| `MESHAI_API_KEY` | Yes | — | Your MeshAI API key (`msh_...`) |
| `MESHAI_API_URL` | No | `https://api.meshai.dev` | API endpoint |
| `MESHAI_AGENT_NAME` | No | `mcp-agent` | Name for this agent in the registry |

## How It Works

1. AI tool (e.g., Claude Desktop) starts the MeshAI MCP server via `npx`
2. The server connects to the MeshAI API using your key
3. The AI tool can call MeshAI tools to register, track usage, check policies
4. MeshAI dashboard shows this tool alongside all other agents
5. Governance policies, audit trails, and compliance features apply universally

## License

MIT