Connect Lucid to Claude: Automate Cloud Models & Visual Data Sync
Learn how to connect Lucid to Claude using a managed MCP server. Automate AWS cloud model generation, diagram creation, and document sharing.
If you need to connect Lucid to Claude to automate cloud architecture diagrams, generate visual models from your AWS data, or manage enterprise document compliance, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's tool calls and Lucid's REST API. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on /connect-lucid-to-chatgpt-create-diagrams-manage-document-assets/ or explore our broader architectural overview on /connect-lucid-to-ai-agents-orchestrate-team-access-legal-holds/.
Giving a Large Language Model (LLM) read and write access to a visual collaboration platform like Lucid is an engineering challenge. You have to handle OAuth 2.0 token lifecycles, parse asynchronous job statuses for model generation, map massive JSON schemas to MCP tool definitions, and deal with complex, hierarchical document sharing permissions. Every time Lucid updates an endpoint or deprecates a legacy data source route, you have to update your server code, redeploy, and test the integration.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Lucid, connect it natively to Claude, and execute complex diagramming and administrative workflows using natural language.
The Engineering Reality of the Lucid API
A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against Lucid's API is painful. You are not just integrating a simple text-based data store; you are interfacing with a complex engine that processes Mermaid markup, async cloud architecture syncs, and strict SCIM identity controls.
If you decide to build a custom MCP server for Lucid, here are the specific integration challenges you will face:
Asynchronous Cloud Model Generation
Lucid allows you to dynamically generate architecture diagrams based on cloud data (AWS, Azure, Google Cloud). However, these endpoints (create_a_lucid_cloud_aw, create_a_lucid_cloud_azure) do not return the completed diagram synchronously. Instead, they return a jobId via a 202 Accepted response. An LLM has no inherent concept of waiting. Your MCP server must expose specific status-checking tools (e.g., list_all_lucid_status) and clearly instruct the LLM via schema descriptions to poll that endpoint with the jobId until the status returns SUCCEEDED or FAILED.
Markup Limits and Payload Sizing
One of the most powerful ways to automate Lucid is by passing Mermaid markup into the create_a_lucid_document_mermaid_diagram endpoint. LLMs excel at generating Mermaid code. However, Lucid enforces a strict 100,000-character limit on the markup payload. If Claude generates a massive architecture diagram that exceeds this limit, the API will throw a 400 error. Your MCP server must properly map these constraints into the JSON schema so the model knows the boundaries of its output.
Granular Hierarchical Sharing Logic
Sharing a document in Lucid is not a simple boolean flag. Access control is split across teams, groups, and individual users, and is further segmented into direct shares vs. inherited folder-level access. endpoints like update_a_lucid_shares_users_share_by_id require explicit mapping of role strings and document IDs. A custom server must flatten these complex permission trees into digestible tools so the LLM doesn't hallucinate invalid role assignments or apply team shares to endpoints meant for individuals.
How Truto's Managed MCP Server Works
Truto eliminates the need to build a custom MCP server by dynamically generating one based on your connected Lucid account. When you connect a Lucid instance to Truto, the platform reads the integration's resource definitions and documentation records (descriptions, query schemas, and body schemas) to automatically compile a list of MCP-compatible tools.
This documentation-driven approach means a tool only appears in the MCP server if it has a corresponding documentation entry. This acts as a quality gate, ensuring Claude only sees endpoints that are fully described and explicitly scoped for AI usage.
Crucially, Truto handles the proxy layer but does not mask rate limits. When the Lucid API returns an HTTP 429 Too Many Requests, Truto passes that error directly back to the caller (Claude). Truto normalizes the upstream rate limit information into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset), but the orchestrator or MCP client is responsible for implementing retry and backoff logic. Truto does not auto-retry or absorb these errors, ensuring your agent has accurate, real-time feedback on its API consumption.
Step 1: Generate the Lucid MCP Server
You can generate the MCP server URL for your connected Lucid account using either the Truto UI or the Truto REST API.
Method A: Via the Truto UI
If you prefer a visual interface, you can generate the server directly from your Truto dashboard:
- Log into your Truto account and navigate to the Integrated Accounts page.
- Select your connected Lucid account.
- Click the MCP Servers tab.
- Click the Create MCP Server button.
- Select your desired configuration (e.g., restrict to
readorwritemethods, apply specific tags, or set an expiration date). - Click Create and copy the generated MCP server URL (it will look like
https://api.truto.one/mcp/abc123def456...).
Method B: Via the Truto API
For teams embedding MCP server generation into their own applications or CI/CD pipelines, you can create the server programmatically via a POST request. This validates the integration's AI readiness, generates a secure, hashed token stored in Cloudflare KV, and returns a ready-to-use URL.
Request:
curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
-H "Authorization: Bearer YOUR_TRUTO_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Lucid Diagramming Agent",
"config": {
"methods": ["read", "write", "custom"]
},
"expires_at": "2026-01-01T00:00:00Z"
}'Response:
{
"id": "mcp-789-xyz",
"name": "Lucid Diagramming Agent",
"config": {
"methods": ["read", "write", "custom"]
},
"expires_at": "2026-01-01T00:00:00Z",
"url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}Save the url from this response. This single URL contains everything Claude needs to authenticate and discover tools for this specific Lucid account.
Step 2: Connect the MCP Server to Claude
Once you have the Truto MCP server URL, connecting it to Claude is straightforward. The server speaks standard JSON-RPC 2.0, meaning it works natively with Claude's built-in MCP client.
Method A: Via the Claude UI
If you are using the Claude desktop app or web interface with custom connector support:
- Open Claude and navigate to Settings.
- Click on Integrations (or Connectors depending on your plan tier).
- Select Add MCP Server or Add custom connector.
- Paste the Truto MCP URL into the Server URL field.
- Click Add.
Claude will immediately ping the /mcp/:token endpoint, complete the initialization handshake, and fetch the list of available Lucid tools.
Method B: Via Manual Config File (claude_desktop_config.json)
If you are managing your Claude Desktop configuration manually for local development, you can add the Truto MCP server using the official Server-Sent Events (SSE) adapter.
Locate your claude_desktop_config.json file (typically in ~/Library/Application Support/Claude/ on macOS or %APPDATA%\Claude\ on Windows) and add the following JSON:
{
"mcpServers": {
"lucid_truto": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/YOUR_TOKEN_HERE"
]
}
}
}Restart Claude Desktop. The application will execute the npx command to bridge the SSE connection to the Truto remote server, mounting all your Lucid tools directly into the chat interface.
Hero Tools for Lucid Automation
When Claude connects to the Truto MCP server, it gains access to the fully normalized Lucid API. Here are 6 high-leverage tools exposed by the integration, designed specifically for diagram generation, compliance, and document management.
1. create_a_lucid_document_mermaid_diagram
This tool allows Claude to generate a new Mermaid diagram within an existing Lucidchart or Lucidspark document. It is the primary bridge between LLM-generated code and visual representation. The LLM must respect the 100,000-character limit for the markup.
"I've analyzed our microservices architecture. Please update the master infrastructure diagram in Lucid document ID 'doc_998877' by creating a new Mermaid diagram reflecting the addition of the new payment gateway service."
2. lucid_documents_search
This tool provides deep search capabilities across the authenticated user's accessible documents. It allows Claude to filter by keywords, product type (Lucidchart vs. Lucidspark), creation/modification dates, and status. It returns rich metadata including URLs, version counts, and classification levels.
"Find all Lucidchart documents created in the last 30 days that have the keyword 'Q3 Roadmap' in the title or content, and give me the direct view URLs."
3. create_a_lucid_cloud_aw
This tool initiates an asynchronous job to generate a new Lucid model visualizing data directly from an AWS data source. Claude provides the title, data source IDs, and sync preferences, and the API returns a jobId for polling.
"Kick off a new AWS cloud architecture model for the 'Production VPC' data source. Title it 'Prod Infrastructure Q3' and set auto-sync to true."
4. list_all_lucid_status
Because cloud model generation and imports in Lucid are asynchronous, this tool is critical. It allows Claude to poll the status of an active AWS data source job (using the jobId returned from the creation tool) to determine when the model is fully rendered.
"Check the status of the AWS cloud model job ID 'job_12345'. If it's finished, get the resulting document ID."
5. create_a_lucid_accounts_legal_hold
Essential for IT and legal administrators, this tool creates a new legal hold on a Lucid account. It locks documents from deletion or modification based on specific keywords and date ranges, ensuring compliance during discovery or offboarding.
"Create a new legal hold titled 'Project Phoenix Audit'. Set the start date for today, apply it to all documents containing the keyword 'Phoenix', and give me the legal hold ID."
6. update_a_lucid_shares_users_share_by_id
This tool allows Claude to modify or grant direct collaborator access to a specific Lucid document for a specific user. It manages the granular role assignments (e.g., viewer, commenter, editor).
"Grant user ID 'usr_556677' editor access to the 'Q4 Financials' document (ID 'doc_112233')."
For a complete list of all available Lucid tools, required parameters, and JSON schemas, view the full inventory on the Truto Lucid Integration Page.
Workflows in Action
MCP tools become incredibly powerful when chained together. Here are two real-world workflows demonstrating how an AI agent interacts with the Lucid API to automate complex tasks.
Workflow 1: Cloud Architecture Diagramming & Status Polling
Persona: DevOps Engineer
"Generate a new AWS architecture diagram using the 'Staging-AWS' data source. Once it's fully generated, share it with alex@company.com as a viewer."
How the agent executes this:
create_a_lucid_cloud_aw: The agent calls this tool, passing the AWS data source ID and the requested title. It receives ajobId(e.g.,job_999) in response.list_all_lucid_status: The agent enters a polling loop, calling this tool withjob_999to check the status. It waits until the API returnsSUCCEEDEDand provides the newdocumentId.lucid_users_search: The agent searches foralex@company.comto retrieve their internal LuciduserId.update_a_lucid_shares_users_share_by_id: The agent grants the retrieveduserIdtheviewerrole on the newly generateddocumentId.
Result: The DevOps engineer receives a confirmation that the AWS infrastructure diagram has been automatically generated from live cloud data and securely shared with the correct team member.
sequenceDiagram
participant Claude as Claude Desktop
participant Truto as Truto MCP Server
participant Lucid as Lucid API
Claude->>Truto: call tool: create_a_lucid_cloud_aw
Truto->>Lucid: POST /cloud-models/aws
Lucid-->>Truto: 202 Accepted (jobId)
Truto-->>Claude: Returns jobId
loop Polling
Claude->>Truto: call tool: list_all_lucid_status
Truto->>Lucid: GET /cloud-models/aws/{jobId}/status
Lucid-->>Truto: Status (PENDING/SUCCEEDED)
Truto-->>Claude: Returns Status + Document ID
end
Claude->>Truto: call tool: update_a_lucid_shares_users_share_by_id
Truto->>Lucid: PUT /documents/{id}/shares/users/{userId}
Lucid-->>Truto: 200 OK
Truto-->>Claude: SuccessWorkflow 2: Secure Employee Offboarding & Data Retention
Persona: IT/Compliance Administrator
"We are offboarding Sarah from engineering. Search for all Lucid documents she owns, place a legal hold on her account data for the next 90 days, and then deactivate her SCIM user profile."
How the agent executes this:
lucid_scim_users_search(orlist_all_lucid_scim_users): The agent searches for Sarah's email to retrieve herid.lucid_documents_search: The agent queries documents filtered by heruserIdas the owner to log an inventory of her assets.create_a_lucid_accounts_legal_hold: The agent creates a legal hold lasting 90 days and retrieves thelegalHoldId.create_a_lucid_legal_hold_user_add: The agent attaches Sarah'suserIdto the newly created legal hold, locking her documents.update_a_lucid_scim_user_by_id: The agent makes a SCIM PUT request settingactive: falseto deactivate her access without deleting the historical data.
Result: The IT Admin receives a complete audit log of the employee's documents, confirmation that the data is secured via legal hold, and verification that the user's access has been revoked.
Security and Access Control
When exposing a sensitive visual data platform like Lucid to an AI agent, security configuration is paramount. Truto provides several mechanisms to lock down your MCP servers at the time of creation:
- Method Filtering (
config.methods): Restrict the server to safe operations. For example, settingmethods: ["read"]ensures the agent can only usegetandlisttools (like searching documents) and absolutely cannot usecreate,update, ordeleteoperations. - Tag Filtering (
config.tags): If the integration utilizes tool tags, you can restrict the MCP server to a specific domain (e.g., only exposing tools related todiagramming, while hiding tools related tobillingoruser_management). - Expiration Dates (
expires_at): Create short-lived MCP servers for temporary tasks or external contractors. Once the ISO datetime is reached, the server is automatically destroyed and the URL immediately stops working. - Strict Authentication (
require_api_token_auth): By default, the cryptographically secure MCP URL acts as the authentication token. If enabled, this setting requires the client to also pass a valid Truto API token in theAuthorizationheader, adding a second layer of identity verification.
Building Robust Agentic Workflows
Connecting Lucid to Claude via Truto's MCP server transforms a visual collaboration tool into a programmable data layer. By converting natural language into strictly typed JSON-RPC calls, your agents can generate complex Mermaid diagrams, automate cloud infrastructure visualizations, and manage strict compliance controls without writing a line of custom API mapping code.
Because Truto dynamically builds these tools from documentation, your agents always have the most accurate, up-to-date schema definitions. And because Truto forces your orchestration layer to handle HTTP 429 rate limits natively, your agents build realistic execution paths that respect Lucid's infrastructure boundaries.
Stop maintaining custom integration code and brittle OAuth refreshes. Let Truto manage the connectivity layer so your engineering team can focus on building better AI logic.
FAQ
- Does Truto automatically handle Lucid API rate limits?
- No. Truto passes HTTP 429 Too Many Requests errors directly back to the caller (Claude). It normalizes the rate limit information into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset), but your agent orchestrator must handle retry and backoff logic.
- How do I generate a Lucid MCP server using Truto?
- You can generate the server via the Truto UI by navigating to your integrated Lucid account and clicking 'Create MCP Server', or via the API by sending a POST request to `/integrated-account/{id}/mcp` with your desired configuration.
- How do AI agents handle Lucid's asynchronous cloud model generation?
- Lucid returns a jobId when generating cloud models (like AWS diagrams). The MCP server exposes polling tools (like list_all_lucid_status) which the AI agent must repeatedly call until the status returns SUCCEEDED.
- Can I restrict what the AI agent can do in Lucid?
- Yes. When creating the MCP server in Truto, you can configure method filters (e.g., restricting the server to 'read' operations only), apply tag filters, and set strict expiration dates (expires_at) to limit the agent's access.