Skip to main content

What is MCP?

MCP (Model Context Protocol) is an open standard that defines how AI models connect to external tools and data sources. NimbleBrain uses MCP to provide a consistent, secure way to integrate with any service.
This is technical documentation for developers. If you’re building automations in Studio, you don’t need to understand MCP - just use Connections to add integrations.

Why MCP Matters

MCP provides several advantages for AI-powered integrations:

Standardized

One protocol for all integrations. Any MCP-compatible server works with NimbleBrain.

Secure

Credentials are managed separately from the AI model. Tools declare their capabilities upfront.

Extensible

New tools can be added without changing how playbooks work. The AI automatically discovers available tools.

Interoperable

MCP servers work with Claude Desktop, NimbleBrain Studio, and other MCP-compatible clients.

Architecture

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   NimbleBrain   │────▶│   MCP Server    │────▶│  External API   │
│     Studio      │◀────│   (Connection)  │◀────│   (Slack, etc)  │
└─────────────────┘     └─────────────────┘     └─────────────────┘
        │                       │
        │                       │
        ▼                       ▼
   Playbook asks          Server handles
   "post to Slack"        authentication &
                          API calls

MCP Server Components

Each MCP server (what Studio calls a “Connection”) provides:

Tools

Functions the AI can call. For example, the Slack server provides:
  • slack_send_message - Post a message to a channel
  • slack_list_channels - Get available channels
  • slack_get_history - Retrieve message history

Resources

Data the AI can access, like files or database schemas.

Prompts

Pre-configured prompt templates for common tasks.

Using MCP in Development

NimbleBrain SDK

The TypeScript SDK handles MCP communication automatically:
import { NimbleBrain } from '@nimblebrain/sdk';

const client = new NimbleBrain({ apiKey: 'your-api-key' });

// Run a playbook - MCP tools are available automatically
const result = await client.playbooks.run('playbook-id', {
  input: 'Post "Hello World" to #general on Slack'
});

Claude Desktop Integration

Connect Claude Desktop to NimbleBrain MCP servers:
  1. Go to Connections in Studio
  2. Click Connect on any installed connection
  3. Copy the configuration JSON
  4. Add to your claude_desktop_config.json:
{
  "mcpServers": {
    "nimblebrain-slack": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-remote", "https://mcp.nimbletools.dev/v1/sse"],
      "env": {
        "API_KEY": "your-workspace-api-key"
      }
    }
  }
}

Building Custom MCP Servers

To build your own MCP server for NimbleBrain:
  1. Follow the MCP Specification
  2. Implement the required transport (SSE for NimbleBrain)
  3. Publish to the NimbleBrain registry or deploy privately

MCP vs REST APIs

FeatureMCPREST API
AI DiscoveryTools auto-discoveredManual documentation
Type SafetySchema-definedVaries
AuthenticationStandardizedVaries by API
Real-timeSSE support built-inRequires WebSocket

Resources