Skip to content

Custom Connectors

Build your own connectors to integrate Chainabit agents with any service or internal tool.

Overview

There are two ways to create custom connectors today:

  1. Build an MCP server and connect it via the mcp-generic connector
  2. Use the http_webhook tool type for simple request/response integrations

For validated remote presets, prefer the dedicated Zapier or Context7 connector pages instead of building a custom path from scratch.

A custom adapter SDK is coming soon for more advanced use cases.

Option 1: Build an MCP Server

This is the recommended approach for custom integrations. You build a standard MCP server, deploy it, and connect it to Chainabit.

How It Works

  1. Create an MCP server that exposes your tools using the Model Context Protocol
  2. Deploy it with HTTP (SSE) transport
  3. Connect it to Chainabit using the mcp-generic connector (see the MCP guide)
  4. Chainabit discovers your tools automatically via sync-tools

Benefits

  • Standard protocol supported by a growing ecosystem
  • Full control over tool logic, authentication, and error handling
  • Tools are auto-discovered -- no manual registration
  • Works with any language that has an MCP SDK (TypeScript, Python, Go, etc.)

Quick Example

Here is a minimal MCP server in TypeScript:

typescript
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new McpServer({ name: "my-tools", version: "1.0.0" });

server.tool(
  "lookup_customer",
  { email: { type: "string", description: "Customer email" } },
  async ({ email }) => {
    const customer = await yourDatabase.findCustomer(email);
    return {
      content: [{ type: "text", text: JSON.stringify(customer) }],
    };
  }
);

const transport = new StdioServerTransport();
await server.connect(transport);

For HTTP transport (required for Chainabit), wrap it with an HTTP/SSE adapter. See the MCP documentation for details.

Once deployed, connect it:

bash
chainabit connectors install mcp-generic --name "Customer Tools"
# Configure with your server URL
chainabit connectors sync <instance-id>

Option 2: HTTP Webhook

For simple integrations that only need to make a single HTTP request and return the response, you can use webhook-based tools.

How It Works

  1. Install the mcp-generic connector pointing to your HTTP endpoint
  2. Configure individual tool definitions that map to HTTP endpoints
  3. Each tool execution sends a request to your endpoint and returns the response

When to Use

  • You have an existing REST API you want to expose as agent tools
  • The integration is simple (single request/response per tool)
  • You do not need bidirectional communication or streaming

Example

If you have your own API at https://service.example.com/api, you can create a connector instance and configure tools that map to specific endpoints.

Coming Soon: Custom Adapter SDK

We are building an SDK that will let you define custom connectors as first-class adapters within Chainabit, with:

  • Declarative tool definitions
  • Built-in credential management
  • OAuth flow support
  • Rate limiting and retry policies
  • A publishing mechanism to share connectors across workspaces

Stay tuned for updates.

Connecting from Claude (or other AI clients)

Chainabit itself hosts an MCP server at https://api.chainabit.com/api/v1/mcp. This means you can point Claude Desktop, Cursor, Windsurf, or any MCP-compatible client directly at Chainabit to give it access to your agents, chains, connectors, and workspace.

How to add it in Claude Desktop

  1. Open your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS)
  2. Add the following entry:
json
{
  "mcpServers": {
    "chainabit": {
      "url": "https://api.chainabit.com/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_CHAINABIT_API_KEY"
      }
    }
  }
}
  1. Restart Claude Desktop — a hammer icon will appear confirming MCP tools are loaded

Your Chainabit API key can be generated under Settings → API Keys in the Chainabit dashboard.

See the full guide at Chainabit MCP Server for all available tools, example prompts, and configuration for Cursor and Windsurf.

Best Practices

  • Keep tools focused. Each tool should do one thing well. Prefer many small tools over a few large ones.
  • Validate inputs. Define clear input schemas so agents know what parameters are expected.
  • Return structured data. JSON responses are easier for agents to interpret and act on.
  • Handle errors gracefully. Return meaningful error messages that help agents (and users) understand what went wrong.
  • Secure your endpoints. Always require authentication for your MCP servers or webhook endpoints.

Built with purpose.