MCP Server
Model Context Protocol server for Meshes. Gives AI coding agents like Claude Code, Cursor, and Windsurf direct tool access to emit events, manage workspaces, create rules, and debug deliveries.
The Meshes MCP server implements the Model Context Protocol to give AI coding agents direct access to the Meshes API. Instead of your agent guessing at endpoints, it gets 25 typed tools that cover every Meshes operation.
This works with any MCP-compatible client: Claude Code, Claude Desktop, Cursor, Windsurf, and others.
Installation
The MCP server is available as a standalone repository: mesheshq/meshes-mcp-server.
Quick start (recommended)
Run directly with npx:
npx -y @mesheshq/mcp-server
Run from source
git clone https://github.com/mesheshq/meshes-mcp-server.git cd meshes-mcp-server npm install npm run build
Configuration
The server needs your Meshes machine key credentials to authenticate. It automatically mints short-lived JWTs for each API request — you never need to generate tokens manually.
See Authentication for details on how Meshes auth works and where to find your credentials.
You'll need three values from your Meshes dashboard (Settings > Machine Keys):
export MESHES_ACCESS_KEY=your_access_key export MESHES_SECRET_KEY=your_secret_key export MESHES_ORG_ID=your_organization_uuid
Cursor
Security note: These config files contain your secret key. They live in your home directory (not your project repo), so they won't be accidentally committed. Never commit access keys or secret keys to version control. Publishable keys are safe to commit.
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"meshes": {
"command": "npx",
"args": ["-y", "@mesheshq/mcp-server"],
"env": {
"MESHES_ACCESS_KEY": "your_access_key",
"MESHES_SECRET_KEY": "your_secret_key",
"MESHES_ORG_ID": "your_organization_uuid"
}
}
}
}
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"meshes": {
"command": "npx",
"args": ["-y", "@mesheshq/mcp-server"],
"env": {
"MESHES_ACCESS_KEY": "your_access_key",
"MESHES_SECRET_KEY": "your_secret_key",
"MESHES_ORG_ID": "your_organization_uuid"
}
}
}
}
Claude Code
claude mcp add meshes npx -y @mesheshq/mcp-server \ -e MESHES_ACCESS_KEY=your_access_key \ -e MESHES_SECRET_KEY=your_secret_key \ -e MESHES_ORG_ID=your_organization_uuid
Available tools
The MCP server exposes 25 tools organized by resource type.
Workspaces
| Tool | Method | Description |
|---|---|---|
meshes_list_workspaces | GET /workspaces | List all workspaces |
meshes_get_workspace | GET /workspaces/{id} | Get workspace details + publishable key |
meshes_create_workspace | POST /workspaces | Create a new workspace |
meshes_update_workspace | PUT /workspaces/{id} | Update workspace name/description |
meshes_get_workspace_connections | GET /workspaces/{id}/connections | List connections in workspace |
meshes_get_workspace_rules | GET /workspaces/{id}/rules | List rules in workspace |
meshes_get_workspace_events | GET /workspaces/{id}/events | List events with filters |
Connections
| Tool | Method | Description |
|---|---|---|
meshes_list_connections | GET /connections | List all connections org-wide |
meshes_get_connection | GET /connections/{id} | Get connection details |
meshes_create_connection | POST /connections | Create a new connection |
meshes_update_connection | PUT /connections/{id} | Update connection name/metadata |
meshes_delete_connection | DELETE /connections/{id} | Delete (supports force_delete) |
meshes_get_connection_actions | GET /connections/{id}/actions | Discover available actions |
meshes_get_connection_fields | GET /connections/{id}/fields | Get field catalog |
meshes_get_connection_default_mappings | GET /connections/{id}/mappings/default | Get field mappings |
Rules
| Tool | Method | Description |
|---|---|---|
meshes_list_rules | GET /rules | List rules with optional filters |
meshes_get_rule | GET /rules/{id} | Get rule details |
meshes_create_rule | POST /rules | Create a routing rule |
meshes_delete_rule | DELETE /rules/{id} | Delete a rule |
Events
| Tool | Method | Description |
|---|---|---|
meshes_emit_event | POST /events | Emit a single event |
meshes_emit_bulk_events | POST /events/bulk | Emit up to 100 events |
meshes_list_events | GET /events | List events with pagination |
meshes_get_event | GET /events/{id} | Get event + delivery status |
meshes_get_event_payload | GET /events/{id}/payload | Get event + full payload |
meshes_retry_event_rule | POST /events/{id}/rules/{rule_id}/retry | Retry a failed delivery |
Integrations
| Tool | Method | Description |
|---|---|---|
meshes_list_integrations | GET /integrations | Discover all integration types |
Example workflows
"Set up a signup event that goes to HubSpot"
The agent will:
- Call
meshes_list_workspacesto find the right workspace - Call
meshes_get_workspace_connectionsto find the HubSpot connection - Call
meshes_get_connection_actionsto discover available actions (e.g.,create_or_update_contact) - Call
meshes_create_ruleto binduser.signup→ HubSpot →create_or_update_contact
"Why didn't my payment.failed event reach Salesforce?"
The agent will:
- Call
meshes_get_workspace_eventswithevent=payment.failedandstatus=failed - Call
meshes_get_eventto inspectrule_eventsfor error details - Call
meshes_get_event_payloadto verify the payload was correct - Call
meshes_retry_event_ruleafter you fix the underlying issue
"Emit a test event to verify my setup"
The agent will call meshes_emit_event with a test payload and confirm the event was accepted.
Testing
You can test the MCP server locally with the MCP Inspector:
npx @modelcontextprotocol/inspector npx -y @mesheshq/mcp-server
Also available
- Cursor Rules: For editors that support project-level rules files — teaches the agent the Meshes API without needing MCP.