Skip to main content
SearchClone on GitHub

MCP Integration

Connect AI agents to Onboard using the Model Context Protocol (MCP). Full support for tools, resources, and prompts.

MCP Endpoint
Connect your AI agent to this endpoint
http://localhost:3000/api/mcp
Initialize Connection
Start an MCP session
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize"
}
Get Session Info
Optional: Get a session token for tracking
GET /api/mcp

Response:
{
  "session_token": "uuid",
  "endpoint": "/api/mcp",
  "protocol_version": "2024-11-05",
  "capabilities": {
    "tools": ["list_documents", "get_document", ...],
    "resources": ["docs://index", ...],
    "prompts": ["explain_doc", ...]
  }
}
Example: List Tools
// Request
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/list"
}

// Response
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "tools": [
      {
        "name": "list_documents",
        "description": "List all published documentation...",
        "inputSchema": { ... }
      },
      ...
    ]
  }
}
Example: Call a Tool
// Request
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "search_docs",
    "arguments": {
      "query": "getting started",
      "limit": 5
    }
  }
}

// Response
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [{
      "type": "text",
      "text": "{ results: [...] }"
    }]
  }
}