Getting Started
Set up MCP.do and start executing code from AI assistants
Connect Claude Desktop or any MCP-compatible AI assistant to execute code on the .do platform in minutes.
Claude Desktop Setup
1. Get Your API Key
Sign up at platform.do and get your API key from the dashboard.
2. Configure Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"do": {
"url": "https://mcp.do",
"apiKey": "sk_live_xxxxx"
}
}
}3. Restart Claude Desktop
Restart Claude Desktop to load the new configuration.
4. Start Using
Now Claude can execute any code on your .do platform:
You: "Create a new business called Acme Corp"
Claude: [uses do tool]
script: $.Business.create({
name: "Acme Corp",
industry: "Technology"
})
✓ Created business: Acme Corp (ID: acme-corp)You: "Show me all businesses in the technology sector"
Claude: [uses do tool]
script: db.Businesses.filter({ industry: "Technology" })
Results:
- Acme Corp (acme-corp)
- Tech Solutions (tech-solutions)
- Digital Innovations (digital-innovations)You: "For each occupation, generate a lean canvas for all tasks"
Claude: [uses do tool]
script: db.Occupations.forEach(occupation => {
occupation.tasks.forEach(task => task.generateLeanCanvas())
})
✓ Generated 2,847 lean canvases from 923 occupationsProgrammatic Usage
Install MCP SDK
npm install @modelcontextprotocol/sdkConnect to MCP.do
import { Client } from '@modelcontextprotocol/sdk/client/index.js'
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js'
// Connect to MCP server
const transport = new SSEClientTransport(
new URL('https://mcp.do'),
{
headers: {
Authorization: 'Bearer sk_live_xxxxx'
}
}
)
const client = new Client(
{ name: 'my-app', version: '1.0.0' },
{}
)
await client.connect(transport)
// List available tools (just 1!)
const tools = await client.listTools()
console.log(tools)
// [{ name: "do", description: "Execute code...", ... }]
// Execute code
const result = await client.callTool('do', {
script: 'await db.list($.Business)'
})
console.log(result)
// [{ id: 'acme-corp', name: 'Acme Corp', ... }, ...]Real-World Examples
E-commerce Order Processing
await client.callTool('do', {
module: `
import { db, api } from 'sdk.do'
export async function processOrder(customerId, items) {
// Create order
const order = await $.Order.create({
customerId,
items,
total: items.reduce((sum, item) =>
sum + item.price * item.quantity, 0
)
})
// Charge via Stripe
await api.stripe.charges.create({
amount: order.total * 100,
customer: customerId,
description: 'Order #' + order.id
})
// Send confirmation
await api.sendgrid.sendEmail({
to: order.customer.email,
template: 'order-confirmation',
data: { order }
})
// Notify team
await api.slack.postMessage({
channel: '#sales',
text: \`New order: $\${order.total}\`
})
return order
}
`,
script: `
await processOrder('cus_123', [
{ productId: 'prod_456', quantity: 2, price: 99.99 }
])
`
})Lead Enrichment Pipeline
await client.callTool('do', {
script: `
await db.Leads
.filter({ createdAt: '>now-24h' })
.forEach(async lead => {
// Enrich with Clearbit
const enriched = await api.clearbit.enrich({
email: lead.email
})
// Update lead
await lead.update({
company: enriched.company,
title: enriched.title,
linkedin: enriched.linkedin
})
// Generate insights with AI
const insights = await ai.generate({
prompt: 'Analyze this lead: ' + JSON.stringify(enriched),
model: 'gpt-5'
})
// Notify sales
await api.slack.postMessage({
channel: '#sales',
text: \`New qualified lead: \${lead.name} - \${insights}\`
})
})
`
})Autonomous Task Generation
await client.callTool('do', {
script: `
// For each O*NET occupation, generate lean canvas for all tasks
await db.Occupations.forEach(async occupation => {
await occupation.tasks.forEach(async task => {
// Generate lean canvas with AI
const canvas = await ai.generate({
prompt: 'Create a lean canvas for: ' + task.description,
model: 'claude-sonnet-4.5',
schema: $.LeanCanvas
})
// Create business opportunity
await $.Business.create({
name: task.name,
description: task.description,
leanCanvas: canvas,
sourceOccupation: occupation.id,
sourceTask: task.id
})
})
})
`
})Multi-API Integration
await client.callTool('do', {
script: `
// Sync customers across platforms
await db.Customers
.filter({ synced: false })
.forEach(async customer => {
// Create in Stripe
const stripeCustomer = await api.stripe.customers.create({
email: customer.email,
name: customer.name
})
// Add to SendGrid
await api.sendgrid.contacts.add({
email: customer.email,
lists: ['newsletter']
})
// Create in HubSpot
await api.hubspot.contacts.create({
email: customer.email,
firstname: customer.firstName,
lastname: customer.lastName
})
// Update record
await customer.update({
synced: true,
stripeId: stripeCustomer.id
})
})
`
})Authentication Options
MCP.do supports three authentication modes:
Anonymous Access (Read-Only)
No authentication header required. Limited to read-only operations:
curl https://mcp.do \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "do",
"arguments": {
"script": "await db.list($.Business)"
}
},
"id": 1
}'Limits:
- 10 requests/minute
- Read-only operations only
- 10 second timeout
OAuth Token (User Context)
Use OAuth for user-specific permissions:
curl https://mcp.do \
-H "Authorization: Bearer oauth_abc123" \
-H "Content-Type: application/json" \
-d '{ ... }'Limits:
- 100 requests/minute
- User's permissions apply
- 30 second timeout
API Key (Full Access)
Use API key for server-to-server access:
curl https://mcp.do \
-H "Authorization: Bearer sk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{ ... }'Limits:
- 100 requests/minute
- Full platform access
- 30 second timeout
Available SDK Primitives
When executing scripts, you have access to these primitives:
$- Semantic proxy for$.Subject.predicate.Objectpatternsdb- Database operations (list, get, create, update, delete)ai- AI operations (generate, embed, chat)api- API integrations (stripe, sendgrid, slack, etc.)on- Event handlerssend- Event publisherevery- Scheduled tasksuser- Human-in-the-loop functions
See .do Primitives for complete reference.
Next Steps
- The
doTool - Deep dive into module and script properties - Modules vs Scripts - Understanding execution models
- .do Primitives - Complete SDK reference
- Integration Guide - Integrate with other AI frameworks
Troubleshooting
Tool Not Available in Claude Desktop
- Check your
claude_desktop_config.jsonfile - Ensure the URL is
https://mcp.do(nothttp://) - Restart Claude Desktop
- Check Claude's settings/preferences for MCP servers
Authentication Errors
Error: UnauthorizedSolution: Check your API key is correct and starts with sk_live_ or sk_test_
Read-Only Errors (Anonymous)
Error: Write operation not allowed for anonymous usersSolution: Add an API key to your configuration for write access
Timeout Errors
Error: Execution timeoutSolution:
- Simplify your script
- Use pagination for large queries
- Upgrade to authenticated access for 30s timeout (vs 10s anonymous)
Rate Limit Errors
Error: Rate limit exceededSolution:
- Wait 1 minute before retrying
- Upgrade to authenticated access for higher limits
- Batch operations when possible
Resources
- MCP.do Endpoint - Live endpoint
- Example Repository - Code examples
- SDK Documentation - Complete SDK reference
- Model Context Protocol Spec - MCP specification