MCP Integration

Use Clawdbase-listed agents as MCP tools in Claude, Cursor, and any MCP-compatible host.

The Model Context Protocol (MCP) is an open standard for connecting AI models to external tools and data sources. Clawdbase makes it easy to discover trusted agents that expose MCP servers - and to register your own.

What is MCP?

MCP lets an AI model (like Claude or GPT-4) call external tools during a conversation. Instead of building tool integrations from scratch, you connect the model to an MCP server that exposes a set of callable functions.

Adding a Clawdbase agent as an MCP tool

If an agent in the directory exposes an MCP server, its detail page shows a "Use via MCP" section with the connection config.

In Claude Desktop

Add the agent's MCP server to your claude_desktop_config.json:

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "my-research-agent": {
      "command": "npx",
      "args": ["-y", "@your-username/my-research-agent"],
      "env": {
        "API_KEY": "your-api-key-if-required"
      }
    }
  }
}

Restart Claude Desktop. The agent's tools will appear in the tool selector.

In Cursor

Add to your Cursor MCP config:

~/.cursor/mcp.json
{
  "mcpServers": {
    "my-research-agent": {
      "command": "npx",
      "args": ["-y", "@your-username/my-research-agent"]
    }
  }
}

Remote MCP (SSE)

If the agent exposes a remote HTTP MCP server:

{
  "mcpServers": {
    "clawdbase-search": {
      "url": "https://clawdbase.ai/mcp",
      "transport": "sse"
    }
  }
}

Clawdbase MCP Server

Clawdbase itself exposes an MCP server that lets AI models search the directory, retrieve trust scores, and look up lineage.

Connect

{
  "mcpServers": {
    "clawdbase": {
      "url": "https://clawdbase.ai/mcp",
      "transport": "sse"
    }
  }
}
{
  "mcpServers": {
    "clawdbase": {
      "url": "https://clawdbase.ai/mcp",
      "transport": "sse"
    }
  }
}
import { Client } from '@modelcontextprotocol/sdk/client/index.js'
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js'

const client = new Client({ name: 'my-app', version: '1.0.0' })
await client.connect(
  new SSEClientTransport(new URL('https://clawdbase.ai/mcp'))
)

const result = await client.callTool('search_agents', {
  query: 'research synthesis',
  tier: 'high',
  limit: 5,
})

Available tools

ToolDescription
search_agentsSearch the directory with full filter support
get_agentFetch the full detail record for an agent ID
get_lineageReturn the ancestor/descendant tree
get_identityFetch a creator's trust profile by handle
check_trustGiven a GitHub URL, return the trust score if listed

Tool schema example - search_agents

// Input
{
  query: string          // free-text search
  tier?: 'high' | 'medium' | 'low'
  verified?: boolean
  category?: string
  limit?: number         // 1–10, default 5
}

// Output
{
  agents: Array<{
    id: string
    name: string
    creator: string
    trustScore: number
    confidence: number
    description: string
    url: string          // https://clawdbase.ai/creator/repo
  }>
  total: number
}

Publishing your agent as an MCP server

To have your agent appear in Clawdbase with MCP support, add an mcp.json manifest to the root of your repository:

mcp.json
{
  "name": "My Research Agent",
  "version": "1.0.0",
  "description": "Synthesizes multi-source research into structured reports.",
  "transport": ["stdio", "sse"],
  "tools": [
    {
      "name": "research",
      "description": "Search multiple sources and return a structured research report.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": { "type": "string", "description": "Research topic or question" },
          "depth": { "type": "number", "description": "Search depth (1–5)", "default": 3 }
        },
        "required": ["query"]
      }
    }
  ],
  "install": {
    "npm": "@your-username/my-research-agent",
    "command": "npx -y @your-username/my-research-agent"
  }
}

When your agent is registered on Clawdbase and the manifest is detected, the "Use via MCP" section appears automatically on the detail page.

Minimal TypeScript MCP server

Here's a minimal MCP server in TypeScript ready for registration:

Install the SDK

npm install @modelcontextprotocol/sdk zod

Create the server

src/index.ts
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
import { z } from 'zod'

const server = new McpServer({
  name: 'my-research-agent',
  version: '1.0.0',
})

server.tool(
  'research',
  'Search multiple sources and return a structured report.',
  {
    query: z.string().describe('Research topic or question'),
    depth: z.number().min(1).max(5).optional().default(3),
  },
  async ({ query, depth }) => {
    // Your research logic here
    const report = await runResearch(query, depth)
    return {
      content: [{ type: 'text', text: report }],
    }
  }
)

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

Add mcp.json to the repository root

mcp.json
{
  "name": "My Research Agent",
  "transport": ["stdio"],
  "install": { "npm": "@your-username/my-research-agent" }
}

Register on Clawdbase

Go to your MySanctum dashboard, register the agent with the GitHub repository URL, and the MCP section will appear automatically on your listing.

The MCP SDK reference is at modelcontextprotocol.io/docs. The TypeScript SDK source is at github.com/modelcontextprotocol/typescript-sdk.