alexeibespalov avatar

Trident

alexeibespalov/tridentpublic

Exposes Trident's text-based diagramming language through MCP, letting Claude parse, generate, and manipulate architecture diagrams using a simple 2D DSL. You can ask the assistant to create diagrams with containers, nodes, connections, and annotations, then export them as SVG or PNG. The format is straightforward: declare containers and nodes with coordinates, draw arrows between them, and add labels inline. Useful when you're sketching system architecture or data flows in chat and want actual rendered output instead of ASCII art. The public core includes the parser and read-only renderer, while the full platform at tridentchart.com adds collaboration features.

tools
23
transport
STDIO, HTTP
env var
1
last updated
May 30, 2026

Install

From registry metadata
$ npx add-mcp https://mcp.tridentchart.com/mcp --name trident

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http trident https://mcp.tridentchart.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 23 tools

Verified live against the running server on Nov 6, 2026.

get_trident_specReturns the complete Trident 2D specification including grammar, syntax rules, coordinate system, containers, nodes, connections, shapes, and icon reference. Use this when you need deep understanding of the Trident DSL.

Returns the complete Trident 2D specification including grammar, syntax rules, coordinate system, containers, nodes, connections, shapes, and icon reference. Use this when you need deep understanding of the Trident DSL.

No parameters. Call it with no arguments.

get_generator_guideReturns LLM-optimized instructions for generating Trident diagrams, including quick reference, critical rules (especially Y-axis!), spacing guidelines, common patterns, color conventions, and error prevention checklist. Use this before generating Trident markup (a whole diagra...

Returns LLM-optimized instructions for generating Trident diagrams, including quick reference, critical rules (especially Y-axis!), spacing guidelines, common patterns, color conventions, and error prevention checklist. Use this before generating Trident markup (a whole diagra...

No parameters. Call it with no arguments.

get_comprehensive_exampleReturns a comprehensive Trident example demonstrating all syntax features including containers, nodes (traditional and bracket-style syntax), diamond/rectangle shapes, icons, connections with labels, routing modes, cards, and text annotations. Use this to see all features in a...

Returns a comprehensive Trident example demonstrating all syntax features including containers, nodes (traditional and bracket-style syntax), diamond/rectangle shapes, icons, connections with labels, routing modes, cards, and text annotations. Use this to see all features in a...

No parameters. Call it with no arguments.

validate_tridentReturns a comprehensive validation checklist for Trident diagrams covering syntax rules, semantic rules, best practices, and common mistakes to avoid. Use this after generating a diagram to verify correctness.1 params

Returns a comprehensive validation checklist for Trident diagrams covering syntax rules, semantic rules, best practices, and common mistakes to avoid. Use this after generating a diagram to verify correctness.

Parameters* required
diagramstring
Optional: The Trident diagram code to include context-specific validation tips
get_quick_startReturns a condensed 2-minute quick-start guide with minimal working examples, core syntax reference, and key concepts. Use this for rapid learning when you need to generate simple diagrams quickly.

Returns a condensed 2-minute quick-start guide with minimal working examples, core syntax reference, and key concepts. Use this for rapid learning when you need to generate simple diagrams quickly.

No parameters. Call it with no arguments.

open_documentOpens a live Trident document and returns its full contents as Trident markup DSL — the human-readable text format used to author diagrams. Use this to READ and UNDERSTAND the diagram: its structure, labels, connections, and layout. Do NOT rely on this to enumerate entity IDs...3 params

Opens a live Trident document and returns its full contents as Trident markup DSL — the human-readable text format used to author diagrams. Use this to READ and UNDERSTAND the diagram: its structure, labels, connections, and layout. Do NOT rely on this to enumerate entity IDs...

Parameters* required
agentIdstring
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
token*string
Access token for this document. The document ID is embedded in the token.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
get_document_summaryReturns a complete structured summary of a Trident document as JSON: all node IDs, container IDs, connection IDs, annotation IDs, labels, and entity counts. Use this for PROGRAMMATIC OPERATIONS — it is never truncated regardless of diagram size, so you always get every entity...1 params

Returns a complete structured summary of a Trident document as JSON: all node IDs, container IDs, connection IDs, annotation IDs, labels, and entity counts. Use this for PROGRAMMATIC OPERATIONS — it is never truncated regardless of diagram size, so you always get every entity...

Parameters* required
token*string
Access token for this document. The document ID is embedded in the token.
get_recent_changesReturns the recent change history for a live Trident document. Each entry shows who made the change, what was changed, and when. Useful for understanding what edits have been made by AI agents or human collaborators. Requires a valid access token.3 params

Returns the recent change history for a live Trident document. Each entry shows who made the change, what was changed, and when. Useful for understanding what edits have been made by AI agents or human collaborators. Requires a valid access token.

Parameters* required
limitnumber
Optional: Maximum number of entries to return (default 100, max 500)
sincenumber
Optional: Unix timestamp in milliseconds — only return changes after this time
token*string
Access token for this document. The document ID is embedded in the token.
add_nodeAdds a new node (entity) to a live Trident document. The node appears immediately for all collaborators. Requires a valid editor access token. Before adding nodes: call open_document to understand the diagram layout and pick sensible positions; call get_document_summary to get...5 params

Adds a new node (entity) to a live Trident document. The node appears immediately for all collaborators. Requires a valid editor access token. Before adding nodes: call open_document to understand the diagram layout and pick sensible positions; call get_document_summary to get...

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
node*object
Node definition. ERD field rows: when node.container is an ERD table (a container with kind:"erd"), the node becomes that table's next row — give only id, label (e.g. "🔑 id", "🔗 user_id", "email"...
token*string
Editor access token for this document. The document ID is embedded in the token.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
update_nodeUpdates properties of an existing node in a live Trident document. Only the fields you provide are changed; others are preserved. Use get_document_summary to get all node IDs before calling this. Requires a valid editor access token.6 params

Updates properties of an existing node in a live Trident document. Only the fields you provide are changed; others are preserved. Use get_document_summary to get all node IDs before calling this. Requires a valid editor access token.

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
changes*object
Fields to update. Only provided fields are changed.
nodeId*string
ID of the node to update
token*string
Editor access token for this document. The document ID is embedded in the token.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
delete_nodeRemoves a node from a live Trident document. All connections to/from this node are also removed automatically. Use get_document_summary to get all node IDs before calling this. This action is reversible via Ctrl+Z in the Trident editor. Requires a valid editor access token.5 params

Removes a node from a live Trident document. All connections to/from this node are also removed automatically. Use get_document_summary to get all node IDs before calling this. This action is reversible via Ctrl+Z in the Trident editor. Requires a valid editor access token.

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
nodeId*string
ID of the node to delete
token*string
Editor access token for this document. The document ID is embedded in the token.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
add_containerAdds a new container (group/swimlane) to a live Trident document. Containers visually group related nodes. Use get_document_summary to check existing container IDs before adding to avoid duplicates. Requires a valid editor access token. To build an ERD (entity-relationship dia...5 params

Adds a new container (group/swimlane) to a live Trident document. Containers visually group related nodes. Use get_document_summary to check existing container IDs before adding to avoid duplicates. Requires a valid editor access token. To build an ERD (entity-relationship dia...

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
container*object
token*string
Editor access token for this document. The document ID is embedded in the token.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
update_containerUpdates properties of an existing container in a live Trident document. Only provided fields are changed. Use get_document_summary to get all container IDs before calling this. Requires a valid editor access token. This is also how you RESIZE a container: set width/height (and...6 params

Updates properties of an existing container in a live Trident document. Only provided fields are changed. Use get_document_summary to get all container IDs before calling this. Requires a valid editor access token. This is also how you RESIZE a container: set width/height (and...

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
changes*object
containerId*string
ID of the container to update
token*string
Editor access token for this document. The document ID is embedded in the token.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
delete_containerRemoves a container from a live Trident document. By default, nodes inside are detached (kept on the diagram without a container). Pass deleteNodes: true to remove the container's nodes as well. Use get_document_summary to get all container IDs before calling this. Requires a...6 params

Removes a container from a live Trident document. By default, nodes inside are detached (kept on the diagram without a container). Pass deleteNodes: true to remove the container's nodes as well. Use get_document_summary to get all container IDs before calling this. Requires a...

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
containerId*string
ID of the container to delete
deleteNodesboolean
If true, also delete all nodes inside the container (default false)
token*string
Editor access token for this document. The document ID is embedded in the token.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
add_connectionAdds a connection (arrow/edge) between two nodes or containers in a live Trident document. Use get_document_summary to get valid source and target IDs before calling this. Requires a valid editor access token. For ERD relationships, connect the two TABLE containers (field rows...5 params

Adds a connection (arrow/edge) between two nodes or containers in a live Trident document. Use get_document_summary to get valid source and target IDs before calling this. Requires a valid editor access token. For ERD relationships, connect the two TABLE containers (field rows...

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
connection*object
token*string
Editor access token for this document. The document ID is embedded in the token.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
delete_connectionRemoves a connection from a live Trident document. Provide either the connectionId, or both source and target node IDs to find and remove the matching connection. Use get_document_summary to get all connection IDs before calling this. Requires a valid editor access token.7 params

Removes a connection from a live Trident document. Provide either the connectionId, or both source and target node IDs to find and remove the matching connection. Use get_document_summary to get all connection IDs before calling this. Requires a valid editor access token.

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
connectionIdstring
ID of the connection to delete (preferred)
sourcestring
Source node ID (use with target if connectionId unknown)
targetstring
Target node ID (use with source if connectionId unknown)
token*string
Editor access token for this document. The document ID is embedded in the token.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
get_document_pngRenders the current state of a live Trident document as a PNG image directly from the Yjs collaborative session — bypassing Firestore, which may be stale. Returns a base64-encoded PNG. Use this to visually verify that diagram edits look correct before or after making changes.1 params

Renders the current state of a live Trident document as a PNG image directly from the Yjs collaborative session — bypassing Firestore, which may be stale. Returns a base64-encoded PNG. Use this to visually verify that diagram edits look correct before or after making changes.

Parameters* required
token*string
Access token for this document. The document ID is embedded in the token.
add_annotationAdds a text annotation to a live Trident document. Two visual styles: style:stickyNote (default — post-it card with colored background, good for notes/callouts) or style:textBody (plain transparent text, good for diagram titles and section labels). Ideal for architectural note...5 params

Adds a text annotation to a live Trident document. Two visual styles: style:stickyNote (default — post-it card with colored background, good for notes/callouts) or style:textBody (plain transparent text, good for diagram titles and section labels). Ideal for architectural note...

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
annotation*object
Annotation definition
token*string
Editor access token for this document.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
update_annotationUpdates an existing text annotation in a live Trident document. Only the fields you provide are changed. Use get_document_summary to get all annotation IDs before calling this. Requires a valid editor access token.6 params

Updates an existing text annotation in a live Trident document. Only the fields you provide are changed. Use get_document_summary to get all annotation IDs before calling this. Requires a valid editor access token.

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
annotationId*string
ID of the annotation to update
changes*object
Fields to update. Only provided fields are changed.
token*string
Editor access token for this document.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
delete_annotationRemoves a text annotation from a live Trident document. Use get_document_summary to get all annotation IDs before calling this. Requires a valid editor access token.5 params

Removes a text annotation from a live Trident document. Use get_document_summary to get all annotation IDs before calling this. Requires a valid editor access token.

Parameters* required
action_explanationstring
Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip.
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
annotationId*string
ID of the annotation to delete
token*string
Editor access token for this document.
userNamestring
First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as "[agentId] working with [userName]".
update_canvas_graphicRepositions or resizes a background image (canvas graphic) in a live Trident document. Use open_document to get the canvas graphic ID and current dimensions — it appears as: image <id> "<url>" at (x, y) width:W height:H. The position at (x, y) is the TOP-LEFT corner. USE THIS...6 params

Repositions or resizes a background image (canvas graphic) in a live Trident document. Use open_document to get the canvas graphic ID and current dimensions — it appears as: image <id> "<url>" at (x, y) width:W height:H. The position at (x, y) is the TOP-LEFT corner. USE THIS...

Parameters* required
action_explanationstring
Optional: brief explanation shown live to human collaborators (max 250 chars).
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot").
canvasGraphicId*string
ID of the canvas graphic to update (from open_document output).
changes*object
Geometry fields to update. Only provided fields are changed; all others are preserved.
token*string
Editor access token for this document.
userNamestring
First name of the human you are assisting.
make_suggestionPosts a visible suggestion to human collaborators watching the document WITHOUT making any changes to the diagram. Use this when you observe something worth flagging — a potential mistake, an improvement, or a question — but want the human to decide. The suggestion appears as...5 params

Posts a visible suggestion to human collaborators watching the document WITHOUT making any changes to the diagram. Use this when you observe something worth flagging — a potential mistake, an improvement, or a question — but want the human to decide. The suggestion appears as...

Parameters* required
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
entityIdstring
ID of the node or container this suggestion relates to. Always provide this when the suggestion concerns a specific element — it moves the AI cursor to that element so collaborators know exactly wh...
suggestion*string
The suggestion text to show to human collaborators (max 500 chars). Be concise and actionable.
token*string
Viewer or editor access token for this document.
userName*string
First name of the human you are assisting.
explainDelivers an explanation payload to human collaborators watching the document, optionally anchored to a specific node or container. Use this when you want to explain what a diagram element represents, why it exists, or how it relates to other parts of the system — without sugge...5 params

Delivers an explanation payload to human collaborators watching the document, optionally anchored to a specific node or container. Use this when you want to explain what a diagram element represents, why it exists, or how it relates to other parts of the system — without sugge...

Parameters* required
agentId*string
YOUR AI assistant name (e.g. "Claude.ai", "GitHub Copilot"). Shown as "[agentId] working with [userName]" in the collaboration presence dot.
entityIdstring
ID of the node or container being explained. Always provide this when explaining a specific element — it moves the AI cursor to that element so collaborators can follow along.
explanation*string
The explanation text to deliver to human collaborators (max 1000 chars).
token*string
Viewer or editor access token for this document.
userName*string
First name of the human you are assisting.

Sponsors

Configuration

TRIDENT_API_KEY

Optional Trident API key for document editing tools. Spec tools work without a key.

Readme

Trident — Public

Open-source core of Trident — a text-based diagramming tool.

This repo contains the parser, serializer, and read-only renderer. No auth, no collaboration, no dependencies.


What's here

FilePurpose
parser.jsParses Trident markup text → graphData object
trident-serializer.jsSerializes graphData → Trident markup text
renderer-oss.jsRead-only renderer: SVG, PNG, interactive canvas
spec.mdFull language specification
example.mdWorking diagram examples
demo.htmlBrowser demo (open directly, no build step)

Quick start

<script type="module">
import { Trident2DParserV2 } from './parser.js';
import { renderToSVG, renderToPNG, mountViewer } from './renderer-oss.js';

const parser = new Trident2DParserV2();

const markup = `trident
container backend color:#4A90E2 label:"Backend"
node api[API Server] in backend at (150, 100)
node db[Database]   in backend at (350, 100)
api --> |Query| db`;

// SVG string
const svg = await renderToSVG(markup, parser);

View the full README on GitHub

Details

Repository
github.com/alexeibespalov/tridentpublic
Package
trident-mcp
Transport
STDIO, HTTP
Registry
MCP registry, active
Tools verified
Nov 6, 2026