How to connect a Lucidchart MCP with Claude Code (4 steps)
.png)
Developers building documentation agents, architecture review tools, or AI assistants that need to reference diagrams in Lucidchart have no direct path.
The content in the app lives in a visual layer that agents can't reach without a dedicated integration, so every workflow that needs diagram context ends up relying on manual exports or screenshots.
To help your developers easily read diagram content, retrieve shape data, and surface visual documentation from the terminal, we'll show you how to connect Lucidchart with Merge Agent Handler's Lucidchart MCP server.
How it works
Merge Agent Handler connects Claude Code to the Lucidchart API through a single CLI setup.
You install the Merge CLI, authenticate once with your Merge Agent Handler account, and register the connection with one command.
Merge handles Lucidchart's OAuth token storage and refresh on your behalf, so you never manage credentials locally or rewire authentication when tokens expire.
Here's the command that registers the connection:
Prerequisites
Before getting started, you'll need the following:
- A Merge Agent Handler account
- Claude Code installed (run
claude --versionto confirm) - pipx installed (run
pipx --versionto confirm, or install viapip install pipx) - A Lucidchart account with access to the documents you want to connect (Team or Enterprise plan required for API access)
If you want to connect Merge Agent Handler's Lucidchart MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
1. Install the Merge CLI
Install with pipx: pipx install merge-api

Then confirm the installation: merge --version
2. Log in to Merge
Run merge login to authenticate the CLI with your Merge Agent Handler account: merge login
This authenticates your session so the CLI can make authorized requests on your behalf going forward.
Related: How to use a Figma MCP in Claude Code
3. Add Agent Handler to Claude Code
The simplest way to register Agent Handler with Claude Code:
Or register manually:
Open Claude Code and run: /mcp
agent-handler should appear under Local MCPs with a connected status.

4. Authenticate Lucidchart
Open a Claude Code session and try: "List all diagrams in my Lucidchart workspace and summarize what each one covers based on its title and any shape labels."
The first time you invoke a Lucidchart tool, a Magic Link will appear to complete connector authentication.

Once authenticated, you should see something like the following:

{{this-blog-only-cta}}
Lucidchart MCP FAQ
In case you have more questions on setting up and using the Lucidchart MCP in Claude Code, we've addressed several more commonly-asked questions below.
What can you do once the Lucidchart MCP is connected to Claude Code?
With Lucidchart connected, Claude Code can:
- List and browse documents: retrieve all diagrams accessible to the authenticated account, organized by folder or team space, without opening the Lucidchart UI
- Read diagram content: pull shape labels, connector text, and layer structure from any diagram, giving agents the ability to understand and summarize visual documentation as text
- Access shape data: retrieve linked data and metadata attached to shapes, useful when diagrams embed structured information like system attributes, cost estimates, or data field definitions
- Pull document metadata: get diagram names, owners, creation dates, last-modified timestamps, and sharing settings across a workspace
- Navigate pages within a document: retrieve individual pages or sheets within a multi-page diagram, enabling agents to scope their context to the relevant section of a large architecture document
- Read comments: retrieve comments on diagrams or specific shapes, useful for agents that need to surface open questions or decisions logged directly on a diagram
Why use Merge Agent Handler vs. a self-hosted Lucidchart MCP server?
You can build a self-hosted MCP server on top of Lucidchart's API. Lucidchart uses OAuth 2.0, and the API exposes document and shape data through REST endpoints. For a single developer working with a specific set of diagrams, the initial wiring is manageable: complete the OAuth flow, store the token, and define tools for the endpoints you need.
The friction compounds when more than one developer or agent needs access.
OAuth tokens are user-scoped, so a team setup requires either shared credentials (a security risk) or per-user token management across every environment where the MCP runs. As the set of diagrams and agents grows, there's no mechanism in a self-hosted setup for restricting which documents a given agent can read or logging which tool calls were made and when.
Merge Agent Handler handles multi-user credential management so each developer authenticates once through the Merge CLI rather than managing OAuth flows individually.
Agent Handler also lets you scope which Lucidchart tools a given agent can reach. A documentation summarization agent, for example, can get read access to documents and shapes but not write or delete access. And every tool call is logged with the timestamp, tool name, and inputs, giving teams an audit trail of which diagrams were accessed and when.
Why connect Lucidchart to Claude Code?
Lucidchart holds the kind of knowledge that's hardest to keep current: architecture diagrams that describe how systems actually work, process flows that capture how teams operate, and data models that reflect the current schema. These documents are maintained by engineers and designers but rarely accessible to the agents and tools that need their content.
With the Lucidchart MCP connected, Claude Code can read diagram content, retrieve shape data, and surface document metadata without leaving the terminal.
This matters when diagram context needs to inform code: generating a service stub that matches the architecture diagram, verifying that a proposed database change is consistent with the ERD, or pulling the latest process flow before writing a test plan.
.png)
.png)


.png)
.png)