Connect OpenClaw agents to Miro via Model Context Protocol (MCP). Use when generating diagrams, visualizing code, brainstorming board layouts, or integrating Miro into AI-powered design workflows. Supports OAuth 2.1 authentication, 14+ MCP-compatible clients (Cursor, Claude Code, Replit, Lovable, VSCode/Copilot, Gemini CLI, Windsurf, Kiro CLI, Amazon Q, others). Best for design thinking, architecture visualization, project planning, collaborative ideation.
Miro MCP enables AI agents to read from and write to Miro boards via the Model Context Protocol—an open standard for AI-external system integration. Your agent can generate diagrams, analyze board content, and create code from visual designs.
Prerequisites:
Minimal Setup:
url: https://mcp.miro.com/Quick Example:
Prompt: "Summarize the content on this board: https://miro.com/app/board/uXjVGAeRkgI=/"
Result: Agent reads board items and returns a summary
See references/mcp-connection.md for detailed setup instructions per client.
Miro MCP supports two primary use cases: diagram generation and code generation.
Generate visual diagrams directly on Miro boards from code, PRDs, or text descriptions:
Tool: Use code_explain_on_board prompt or diagram_create tool with DSL (flowchart, UML class/sequence, ERD).
Generate working code from board content:
Tool: Use code_create_from_board prompt to analyze board and generate docs/code.
Miro MCP has been tested and verified with 14+ MCP-compatible clients:
| Client | Method | Notes |
|---|---|---|
| Cursor | Config file + OAuth | JSON config in settings |
| Claude Code | CLI: claude mcp add | Command-line setup |
| Replit | Web UI + OAuth | Install button integration |
| Lovable | Web UI + OAuth | Settings → Integrations |
| VSCode/GitHub Copilot | MCP Registry + OAuth | GitHub MCP Registry link |
| Windsurf | Config file + OAuth | JSON config in settings |
| Gemini CLI | CLI setup | Video tutorial available |
| Kiro CLI | Config file + OAuth | .kiro/settings/mcp.json |
| Amazon Q IDE | Settings + OAuth | IDE extension config |
| Claude (Web/Desktop) | Connectors + OAuth | Add connectors in chat |
| Kiro IDE | Built-in | Native MCP support |
| Glean | Native | MCP integration ready |
| Devin | Native | Native MCP support |
| OpenAI Codex | Protocol-based | Direct MCP access |
See references/ai-coding-tools.md for step-by-step setup per client.
Miro MCP uses OAuth 2.1 with dynamic client registration for secure authentication:
client_id, redirect_uri, scopeauthorization_codeaccess_token and refresh_tokenaccess_token in API calls to Miro MCP ServerWhy team selection matters: MCP is team-scoped. If you reference a board from a different team than the one you authenticated against, you'll get access errors. Simply re-authenticate and select the correct team.
Standard JSON configuration (valid for most clients):
{
"mcpServers": {
"miro-mcp": {
"url": "https://mcp.miro.com/",
"disabled": false,
"autoApprove": []
}
}
}
context_get is expensive — uses Miro AI credits (only tool that does)context_get calls, cache frequently accessed contentIf you're on Miro Enterprise Plan, your admin must first enable Miro MCP Server in your organization before you can use it. Contact your Miro administrator for enablement.
User prompt: "Analyze my codebase at ~/dev/myapp and create an architecture diagram on this board: [board-URL]"
Agent steps:
1. Read codebase structure
2. Analyze dependencies and modules
3. Use code_explain_on_board to generate UML diagram
4. Create diagram on Miro board via diagram_create tool
User prompt: "This board has our PRD. Generate implementation docs and code guidance."
Agent steps:
1. Use context_explore to find PRD document on board
2. Use context_get to read PRD details
3. Use code_create_from_board prompt
4. Generate docs and implementation guidance
5. Create doc_create items on board with generated content
User prompt: "Summarize this prototype and suggest improvements"
Agent steps:
1. Use context_explore to find prototype screens
2. Use context_get to read screen details/markup
3. Analyze and suggest UX improvements
4. Use doc_create to add feedback document to board
Beyond MCP, Miro's REST API enables programmatic board automation via curl/bash scripting. Useful for:
Use OAuth 2.1 Bearer tokens:
curl -H "Authorization: Bearer $ACCESS_TOKEN" https://api.miro.com/v2/...
Tokens obtained via OAuth flow (see OAuth setup in SKILL.md), valid for defined scope.
curl -X POST https://api.miro.com/v2/boards \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Board",
"description": "Auto-generated template"
}' | jq '.id'
Correct nested structure (discovered via Phase B testing):
curl -X POST https://api.miro.com/v2/boards/{board_id}/shapes \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"data": {
"shapeType": "rectangle",
"content": "Label text"
},
"geometry": {
"width": 200,
"height": 100
},
"position": {
"x": 0,
"y": 0,
"origin": "center"
},
"style": {
"fillColor": "#3b82f6",
"borderColor": "#1e40af",
"borderWidth": 2
}
}'
Shape types: rectangle, circle, ellipse, diamond, triangle, pentagon, hexagon, etc.
curl -X POST https://api.miro.com/v2/boards/{board_id}/text \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "<b>Bold</b> and <i>italic</i> text",
"geometry": {
"width": 300,
"height": 100
},
"position": {
"x": 0,
"y": 0,
"origin": "center"
},
"style": {
"fontSize": 24,
"color": "#000000",
"fontFamily": "Arial",
"textAlign": "center"
}
}'
Effective structure for reusable templates:
1. Board creation (metadata)
2. Section headers (color-coded background + text)
3. Content containers (boxes, cards, lists)
4. Visual hierarchy (title → sections → items)
5. Guides (methodology, examples, legends)
See miro-journey-map-recreation.sh in workspace for working example.
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /boards | Create board |
| GET | /boards/{id} | Get board info |
| POST | /boards/{id}/shapes | Add shape |
| POST | /boards/{id}/text | Add text |
| POST | /boards/{id}/frames | Add frame (container) |
| GET | /boards/{id}/items | List board items |
| PATCH | /boards/{id}/items/{id} | Update item |
| DELETE | /boards/{id}/items/{id} | Delete item |
# Create section background
curl -X POST https://api.miro.com/v2/boards/$BOARD_ID/shapes \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"data\": {\"shapeType\": \"rectangle\"},
\"geometry\": {\"width\": 1400, \"height\": 120},
\"position\": {\"x\": 0, \"y\": -400, \"origin\": \"center\"},
\"style\": {\"fillColor\": \"#3b82f6\", \"borderWidth\": 2}
}"
# Add section title
curl -X POST https://api.miro.com/v2/boards/$BOARD_ID/text \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"content\": \"<b>Section Title</b>\",
\"geometry\": {\"width\": 1300, \"height\": 100},
\"position\": {\"x\": -650, \"y\": -400, \"origin\": \"center\"},
\"style\": {\"fontSize\": 28, \"color\": \"#ffffff\"}
}"
data, geometry, position, style is critical/Users/bigbubba/.openclaw/workspace/miro-journey-map-recreation.sh for working template recreation example