mcpField
T
trident

trident

Remote
github.com/alexeibespalovMedia & Design0Updated 1w ago
Repository

About trident

Trident is an open-source, text-based diagramming core for developers and AI assistants. It parses and serializes Trident markup and renders diagrams in read-only form.

Key features

  1. 01Parse Trident markup
  2. 02Serialize graph data as markup
  3. 03Render diagrams to SVG and PNG
  4. 04Interactive read-only canvas
  5. 05Browser demo without a build step

Use cases

  1. 01Turn diagram markup into a visual
  2. 02Convert graph data back to markup
  3. 03Preview diagrams in a browser

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://mcp.tridentchart.com/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Packages
npmtrident-mcp1.0.2

Tools

23

This tool takes no parameters.

Details

From the project 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);

// Interactive canvas with zoom + pan (no editing)
await mountViewer(document.getElementById('diagram'), markup, parser);

// PNG blob (2× retina)
const blob = await renderToPNG(markup, parser, { scale: 2 });
</script>

Open demo.html directly in a browser to see it running.


Markup format

trident

container <id> [color:<hex>] [label:"<text>"] [at (<x>, <y>)]
node <id>(<icon>)[<label>] [in <container>] [at (<x>, <y>)] [color:<hex>]
<source> --> <target>
<source> -->|<label>| <target>
text <id> "<content>" at (<x>, <y>) [style:stickyNote|textBody]

See spec.md for the full grammar and example.md for complete working diagrams.


License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.