AI Diagramming: let your assistant draw and edit real Lekh boards
Ask ChatGPT, Claude or your coding assistant to find your boards, explain a diagram, draw a new one or change one while your team is looking at it — or let an agent read a diagram and follow it while it works. It works on real Lekh boards, and it acts as you: it can see and change only what your Lekh account can. For drawing and editing in ChatGPT, choose Work rather than Chat.
Available on every Lekh plan, including free.
What your assistant can do in Lekh
Find and organise boards
Search your boards and folders, create folders, and rename, move, star or share boards.
“Move all my Q3 planning boards into a folder called Planning.”
Explain a board without opening it
Ask what a diagram says. The assistant reads the board and can show you a picture of it.
“Summarise the steps in my onboarding flowchart.”
Draw a diagram from a description
Describe it in words and get a real Lekh board, drawn with Lekh's shape library.
“Draw our signup flow as a flowchart.”
Edit a board, even while it's open
Changes appear live on the canvas of anyone who has the board open, in the Lekh web or mobile app.
“Add a 'Payment failed' branch after the payment step.”
Let agents work from your diagrams
A diagram can guide an agent, not just a person. A coding agent can read your architecture diagram or flowchart and follow it as it writes code — and any agent that makes decisions can use a Lekh board as its reference.
“Read the "Checkout flow" board in Lekh and implement the checkout to match it.”
Why use Lekh with your assistant
- It's a real board, not a picture. Open it in Lekh and keep editing it yourself.
- In the assistant you already use. No new app to learn. Connect Lekh once and ask in your own words.
- Your team sees it live. Edits land on the board while your colleagues have it open.
What is MCP?
MCP, the Model Context Protocol, is an open standard that lets AI assistants use apps on your behalf. Lekh runs an MCP server. You add Lekh to your assistant once, in the assistant's settings, and from then on you can ask it to work in Lekh for you.
Server URL
Every assistant is given the same address:
https://api.lekh.app/mcpThere are two ways for the assistant to prove it is you. Which one depends on your assistant — find it below.
Choose your assistant
Sign in with Lekh (recommended where your assistant offers it)
Claude and ChatGPT connect this way. It is the recommended way wherever your assistant offers it.
In ChatGPT, use Work for diagrams
ChatGPT's Chat is designed for quick answers, while Work is designed for complex, multi-step tasks. Drawing or changing a diagram is one of those — placing shapes, connecting them, looking at the result and fixing it — so in Chat, ChatGPT may make mistakes. Choose Work before you ask.
- Add Lekh to your assistant using the server URL above.
- The assistant opens a Lekh consent screen. Sign in if asked, check what it will be allowed to do, and approve.
- That is all. You can disconnect it at any time in Lekh, under AI & MCP.
Claude (web, Desktop and mobile)
Claude connects with Sign in with Lekh, as a custom connector. You add the connector once, on claude.ai. Claude Desktop and the Claude mobile apps use the connectors of your Claude account, so you do not add it again there. On Desktop and mobile the Lekh sign-in page may open in a browser where you are not signed in to Lekh; if it asks, sign in and approve.
Which Claude plans can do this
Custom connectors are available on every Claude plan: Free, Pro, Max, Team and Enterprise.
- Free: you can add only one custom connector. If you already have one, remove it first, or upgrade.
- Team and Enterprise: an organization Owner adds Lekh for everyone first, and custom connectors must be allowed for your organization. If Add custom connector is greyed out, ask your Owner.
Before you start
- You need a Lekh account. A free one is fine: sign up here.
- Set it up on claude.ai in a web browser on a computer. It is the easiest place to do it.
Step 1: Add Lekh to Claude
On a Free, Pro or Max plan:
- Go to claude.ai and sign in.
- Open Customize, then Connectors.
- Click +, then Add custom connector.
- For the name, type Lekh.
- For the remote MCP server URL, paste
https://api.lekh.app/mcp. - Leave Advanced settings as they are. Lekh does not need a client ID or secret.
- Click Add.
On a Team or Enterprise plan:
- An Owner adds Lekh once for the whole organization: Organization settings → Connectors → Add → Custom → Web, paste
https://api.lekh.app/mcp, and click Add. - Everyone else then opens Customize → Connectors, finds Lekh in the list, and clicks Connect.
Step 2: Sign in with Lekh
- If Claude does not open Lekh by itself, click Connect next to Lekh in Customize → Connectors.
- A Lekh page opens. Sign in to Lekh if it asks you to.
- Lekh shows what Claude will be allowed to do. Read it, then approve.
- You are taken back to Claude, and Lekh now shows as connected.
Step 3: Use Lekh in a chat
- Start a new chat.
- Click + at the lower left of the message box, then Connectors.
- Switch Lekh on. You can switch it on or off for each chat.
- Ask Claude in your own words, for example "Draw our signup flow as a flowchart in Lekh."
On claude.ai, Claude asks you to confirm before it applies an edit to a board.
If something goes wrong
- Add custom connector is greyed out: on Team or Enterprise, your organization has turned custom connectors off. Ask your Owner. On Free, you may already have your one custom connector.
- The Lekh page did not open: allow pop-ups for claude.ai, then click Connect next to Lekh again.
- To disconnect: in Lekh, open AI & MCP and disconnect Claude. It stops working within a minute.
- Still not working: disconnect Lekh in AI & MCP, remove the Lekh connector in Claude, then add it again and approve. This is also what makes Claude pick up the newest Lekh tools.
Check it works
Ask the assistant to "list my Lekh boards". It should answer with the boards in your Lekh dashboard.
ChatGPT
ChatGPT connects with Sign in with Lekh. You add Lekh once, as a custom app in ChatGPT's developer mode, then switch it on in the chats where you want it.
Which ChatGPT plans can do this
You need developer mode, which OpenAI offers on Plus, Pro, Business, Enterprise and Edu plans, on the web at chatgpt.com.
- ChatGPT Free and Go: not supported. Developer mode is not available on these plans, so you cannot connect ChatGPT to Lekh yet. You can upgrade your ChatGPT plan, or use Claude, which works on its free plan.
- Business, Enterprise and Edu: your workspace owner or admin decides who can use developer mode. If you do not see it, ask them to allow it (in Workspace settings → Permissions & roles).
Before you start
- You need a Lekh account. A free one is fine: sign up here.
- Use chatgpt.com in a web browser on a computer. Developer mode is set up on the web.
Step 1: Turn on developer mode
- Go to chatgpt.com and sign in.
- Click your profile picture or name at the lower left, then Settings.
- Open Security and login.
- Turn on Developer mode. If ChatGPT shows a warning about custom apps, read it and confirm.
Step 2: Add Lekh as a plugin
- Open the Plugins page: in Settings, choose Plugins, or go straight to chatgpt.com/plugins.
- Click the + button to add a plugin.
- For the name, type Lekh. For the description, type Lekh.
- For the MCP server URL, paste
https://api.lekh.app/mcp. - For authentication, choose OAuth.
- If ChatGPT asks you to confirm that you trust this app, confirm.
- Click Create to save.
Step 3: Sign in with Lekh
- ChatGPT asks you to sign in to Lekh. Click the button to continue.
- A Lekh page opens. Sign in to Lekh if it asks you to.
- Lekh shows what ChatGPT will be allowed to do. Read it, then approve.
- You are taken back to ChatGPT. Lekh is now connected.
Step 4: Use Lekh in a chat
- Start a new chat.
- Click + next to the message box, choose Developer mode, and pick Lekh.
- Ask ChatGPT in your own words, for example "List my Lekh boards."
For drawing or editing a diagram, select Work instead of Chat in the toggle at the top of the page before you ask.
ChatGPT asks you to confirm before it applies an edit to a board.
If something goes wrong
- There is no Developer mode in Security and login: your plan does not include it (ChatGPT Free and Go), or your workspace admin has not allowed it.
- The Lekh page did not open: allow pop-ups for chatgpt.com, then open Lekh on the Plugins page and connect again.
- To disconnect: in Lekh, open AI & MCP and disconnect ChatGPT. It stops working within a minute.
- Still not working: disconnect Lekh in AI & MCP, remove the Lekh plugin on ChatGPT's Plugins page, then add it again and sign in. This is also what makes ChatGPT pick up the newest Lekh tools.
Check it works
Ask the assistant to "list my Lekh boards". It should answer with the boards in your Lekh dashboard.
Access token
For developer tools and automation: Claude Code, Codex, Cursor, VS Code, and scripts, CI jobs or custom agents that talk to MCP directly. Claude and ChatGPT do not take a token; use Sign in with Lekh for them.
- In Lekh, open AI & MCP and create an access token. Choose Full access or Read only.
- Copy the token. It starts with
lekh_pat_. - Put it in the assistant's settings as a request header:
Authorization: Bearer <your Lekh access token>Treat a token like a password: anyone who has it can use Lekh as you. Tokens do not expire. Deleting one in AI & MCP stops it working within a minute.
Claude Code
Claude Code connects with an access token.
Steps
- Create an access token in Lekh under AI & MCP.
- In a terminal, add Lekh as an HTTP MCP server with the token in its header:
claude mcp add --transport http lekh https://api.lekh.app/mcp \
--header "Authorization: Bearer <your Lekh access token>"- Start Claude Code and run
/mcpto see that the lekh server is connected.
Check it works
Ask the assistant to "list my Lekh boards". It should answer with the boards in your Lekh dashboard.
If something goes wrong
- It does not connect: check that the token was copied whole, and that the header reads exactly
Authorization: Bearer <your Lekh access token>. - It connected before, and now fails or offers the wrong tools: run
claude mcp remove lekh, then add it again with the command above. If that does not help, delete the token in AI & MCP, create a new one, and put it in again.
Codex CLI
Codex connects with an access token, through its config's bearer-token setting.
These steps follow the client's own documentation, which keeps evolving over time. If something here does not match what you see, please tell us at info@lekhapp.com.
Steps
- Create an access token in Lekh under AI & MCP.
- Put the token in an environment variable, for example in your shell profile:
export LEKH_ACCESS_TOKEN="<your Lekh access token>"- Add Lekh to Codex's config file,
~/.codex/config.toml:
[mcp_servers.lekh]
url = "https://api.lekh.app/mcp"
bearer_token_env_var = "LEKH_ACCESS_TOKEN"- Start Codex in a shell where the variable is set.
Check it works
Ask the assistant to "list my Lekh boards". It should answer with the boards in your Lekh dashboard.
If something goes wrong
- It does not connect: check that the token was copied whole, and that
LEKH_ACCESS_TOKENis set in the shell you start Codex in — Codex reads the variable and builds the header itself. - It connected before, and now fails or offers the wrong tools: remove the
[mcp_servers.lekh]block from~/.codex/config.toml, start Codex once without it, then put the block back. If that does not help, delete the token in AI & MCP, create a new one, and put it in again.
Cursor
Cursor connects with an access token, in the headers of its mcp.json.
These steps follow the client's own documentation, which keeps evolving over time. If something here does not match what you see, please tell us at info@lekhapp.com.
Steps
- Create an access token in Lekh under AI & MCP.
- Open Cursor's MCP config file:
~/.cursor/mcp.jsonfor every project, or.cursor/mcp.jsonin one project. Do not commit a file that holds your token. - Add Lekh:
{
"mcpServers": {
"lekh": {
"url": "https://api.lekh.app/mcp",
"headers": {
"Authorization": "Bearer <your Lekh access token>"
}
}
}
}- Check in Cursor's MCP settings that the lekh server is enabled.
Check it works
Ask the assistant to "list my Lekh boards". It should answer with the boards in your Lekh dashboard.
If something goes wrong
- It does not connect: check that the token was copied whole, and that the header reads exactly
Authorization: Bearer <your Lekh access token>. - It connected before, and now fails or offers the wrong tools: remove the
lekhentry frommcp.json, restart Cursor, then add it back. If that does not help, delete the token in AI & MCP, create a new one, and put it in again.
VS Code
VS Code connects with an access token, in the headers of its MCP server config.
These steps follow the client's own documentation, which keeps evolving over time. If something here does not match what you see, please tell us at info@lekhapp.com.
Steps
- Create an access token in Lekh under AI & MCP.
- Open VS Code's MCP config: your user-level MCP configuration, or
.vscode/mcp.jsonin a workspace. Do not commit a file that holds your token. - Add Lekh:
{
"servers": {
"lekh": {
"type": "http",
"url": "https://api.lekh.app/mcp",
"headers": {
"Authorization": "Bearer <your Lekh access token>"
}
}
}
}- Start the lekh server from VS Code's MCP server list, then use it from the chat in agent mode.
Check it works
Ask the assistant to "list my Lekh boards". It should answer with the boards in your Lekh dashboard.
If something goes wrong
- It does not connect: check that the token was copied whole, and that the header reads exactly
Authorization: Bearer <your Lekh access token>. - It connected before, and now fails or offers the wrong tools: stop the lekh server, remove its entry from your MCP configuration, then add it back and start it again. If that does not help, delete the token in AI & MCP, create a new one, and put it in again.
Any other MCP client
Any MCP client that lets you set a request header can connect with an access token.
This covers tools such as Windsurf and Gemini CLI, automation tools such as n8n, CI jobs, and custom agents built on an MCP SDK.
If something here does not match what you see, please tell us at info@lekhapp.com.
Steps
- Create an access token in Lekh under AI & MCP.
- Configure the client with:
- URL:
https://api.lekh.app/mcp - Transport: Streamable HTTP. Lekh answers
POSTrequests only; there is no SSE stream and no session. - Header:
Authorization: Bearer <your Lekh access token>
- URL:
URL: https://api.lekh.app/mcp
Transport: Streamable HTTP (POST only)
Header: Authorization: Bearer <your Lekh access token>If your client supports MCP authorization instead, you can try Sign in with Lekh with just the URL.
Check it works
Ask the assistant to "list my Lekh boards". It should answer with the boards in your Lekh dashboard.
If something goes wrong
- It does not connect: check that the token was copied whole, and that the header reads exactly
Authorization: Bearer <your Lekh access token>. - It connected before, and now fails or offers the wrong tools: remove the Lekh server from your client's configuration and add it again. If that does not help, delete the token in AI & MCP, create a new one, and put it in again.
Safe by design
- It acts as you. An assistant can see and change only what your Lekh account can.
- It asks before it edits. claude.ai and ChatGPT ask you to confirm before an edit is applied to a board.
- You stay in control. Disconnect an assistant or delete an access token any time in Lekh, under AI & MCP. It stops working within a minute.
- Read only, if you prefer. An access token can be created as Read only: it can look at your boards but can't change or share anything.
Limits
An assistant works on your boards through Lekh's MCP server, which has a few limits of its own. They apply only to assistants: in the Lekh app you can keep working on any board as usual.
- Boards up to 1 MB. An assistant can’t open, change or create a board larger than 1 MB. Free-hand drawing takes up the most space on a board, and the number of shapes comes next. To bring a board under the limit, split it into two boards in the Lekh app. For a very large diagram, ask the assistant to spread it across several boards.
- Boards up to 50 pages. An assistant can’t work on a board with more than 50 pages, and can’t add a 51st page. Move some pages to another board in the Lekh app; the assistant can’t do it for you, because it can’t open the board.
- A board over either limit is not damaged. It still opens in the Lekh app, and you can edit it there as usual. Only the assistant can’t work on it.
- Pictures: PNG or JPEG, up to 1 MB. Resize or convert a larger picture, or one in another format, before you ask the assistant to add it to a board.
- About 20 pictures of a board a minute. Each time an assistant shows you what a board looks like, or previews an edit before making it, it counts towards this. If it reaches the limit it has to wait a little before the next one. Asking about one page rather than the whole board helps.
- Groups up to 5 deep. An assistant can nest groups inside groups up to five levels deep. It can’t make deeper nesting, and on an existing board it can’t see objects nested deeper than that.
- Very large edits can time out. An edit that takes longer than about 10 seconds is stopped, and nothing on the board is changed. Ask for the change in smaller steps.
Assistants don't work with free-hand drawing
An assistant can't draw free-hand, and it can't read free-hand drawing — it can only see it in a picture of the board. If you ask an assistant to edit a board that has free-hand drawing on it, the drawing may be lost, so use Duplicate in Lekh to keep a copy of the board first.
What people ask an assistant to draw in Lekh
These are the things people actually ask for, with the kind of prompt that gets them. You describe what you want in your own words; what comes back is a Lekh board you can open on your phone, tablet or laptop and keep working on. Lekh's whole shape library is available to your assistant, which is why a BPMN pool looks like a BPMN pool rather than a rectangle with a label.
None of this needs a new habit. You stay in the assistant you already talk to, and the diagram appears in the app your team already opens. If a colleague has the board open while you ask for a change, they watch it happen.
A flowchart from a description
Describe the steps and the branches in your own words. You get a flowchart on a real board, with the decision diamonds and arrows already placed — and you can rearrange it afterwards like anything else you drew yourself.
“Draw our signup flow as a flowchart, with a branch for a failed payment.”
A process, workflow or swimlane diagram
Turn a checklist, a runbook or a paragraph of policy into a process everyone can see. Say who owns what and the assistant lays the steps out in lanes.
“Turn this onboarding checklist into a swimlane diagram with Sales, Legal and IT.”
An architecture or system diagram
Name your services and how they talk to each other. Useful when the diagram in the README stopped matching reality three releases ago.
“Draw our services: web app, API, Postgres, Redis, and the queue between the API and the workers.”
A sequence diagram
Describe an exchange — a handshake, a checkout, a retry — and get the participants and the messages between them in order.
“Show the OAuth handshake between the browser, our API and the identity provider.”
A mind map
Give the assistant your notes and ask it to group them. Good for the messy half hour after a workshop, when the themes are in the notes but not yet visible.
“Mind-map the themes from these interview notes.”
An org chart
Paste a list of names and reporting lines and get the shape of the team. Ask for a change and it redraws.
“Build an org chart from this list of names and reporting lines.”
A network or infrastructure diagram
Describe the kit and the links between it. Lekh’s shape library carries the standard network symbols, so the result looks like a network diagram rather than labelled rectangles.
“Draw the office network: two switches, a firewall, and the VPN link to AWS.”
A UI wireframe
Sketch a screen before you build it — panels, tabs, a form, a list — and move the pieces around in Lekh once you can see it.
“Sketch a wireframe for a settings screen with three tabs.”
BPMN, UML and the other notations
The same shape library the app uses is available to your assistant, so a notation with rules — BPMN, UML, ArchiMate, ERD — comes out in its own symbols rather than approximated.
“Draw the order-to-cash process in BPMN.”
The assistant places the shapes and gets you most of the way there; the last bit of arranging is yours, and it takes seconds because the result is a real board rather than an image you would have to start again from. Ask for a change in the same conversation and it edits the board you already have, instead of drawing a second one. If you would rather draw it yourself, Lekh is a diagram maker, a flowchart maker and a collaborative whiteboard in the same app — and the same board opens both ways, on iPhone, iPad, Android, Mac and the web.
Questions people ask
Can ChatGPT draw a diagram?
Yes. Connect ChatGPT to Lekh and ask it in your own words — it draws a real Lekh board, not a picture of one. Claude, Claude Code, Codex, Cursor and VS Code work the same way.
Can AI make a flowchart from text?
Yes. Describe the steps and the branches and the assistant lays out a flowchart with the right shapes and connectors. It opens in Lekh on any device, and you keep editing it there.
Is it a real diagram or just a picture?
A real, editable board. Shapes, connectors and text you can move, restyle, add to and export — not an image and not a code snippet you have to render somewhere else. That is the difference between this and most AI diagram generators.
Does it work on the free plan?
Yes, on every Lekh plan including free. Your assistant may have its own limits on what it can connect to, which depend on that vendor’s plan rather than on Lekh.
Which assistants can I use?
ChatGPT and Claude connect by signing in with Lekh. Claude Code, Codex CLI, Cursor, VS Code and any other MCP client connect with an access token. The setup steps for each one are on this page.
Why should I use ChatGPT Work and not Chat?
For drawing or editing a diagram, use Work. ChatGPT's Chat is designed for quick answers, while Work is designed for complex, multi-step tasks — and creating or changing a diagram is one: placing shapes, connecting them, checking the result and fixing it. In Chat, ChatGPT may make mistakes. Coding assistants such as Claude Code, Codex and Cursor already work this way, so there is nothing to choose.
Is my data safe?
An assistant acts as you: it can see and change only what your Lekh account can. You can disconnect it, or delete its access token, at any time in the app under AI & MCP, and it stops working within a minute. A token can also be created read-only, so the assistant can look at your boards but cannot change or share anything.
Last updated 2026-10-01