.do
Integration

mcp

Model Context Protocol for AI assistant integration

mcp

Model Context Protocol (MCP) server providing AI assistants access to platform features, data, and tools through a standardized interface.

Overview

The MCP primitive implements the Model Context Protocol, enabling AI assistants like Claude, ChatGPT, and custom agents to interact with the .do platform through natural language commands.

Quick Example

import { mcp } from 'sdk.do'

// Register MCP server
const server = await mcp.server({
  name: 'platform-mcp',
  tools: [
    {
      name: 'create_order',
      description: 'Create a new order',
      parameters: {
        customerId: 'string',
        items: 'array',
      },
      handler: async ({ customerId, items }) => {
        return await db.create('orders', { customerId, items })
      },
    },
  ],
})

// Start server
await server.listen()

Core Capabilities

  • Natural Language Interface - AI assistants can access platform via text
  • Tool Registration - Expose functions as MCP tools
  • Resource Access - Share data and documents with assistants
  • Prompt Templates - Reusable prompts for common tasks
  • Authentication - Secure access control for AI assistants

Access Methods

SDK

TypeScript/JavaScript library for MCP server management

await mcp.server({ name: 'platform-mcp', tools: [...] })

SDK Documentation

CLI

Command-line tool for MCP operations

do mcp start --name platform-mcp --config mcp.json

CLI Documentation

API

REST/RPC endpoints for MCP server management

curl -X POST https://api.do/v1/mcp/servers -d '{"name":"platform-mcp","tools":[...]}'

API Documentation

MCP

Model Context Protocol server itself

The MCP primitive is the protocol itself - AI assistants use it to interact with the platform

MCP Documentation

  • agents - AI agents that use MCP
  • llm - LLM gateway for AI models
  • apis - API gateway for HTTP access