Local DAG Builder MCP

Local DAG Builder MCP

A private-by-default, local-first DAG editor that lets you build causal diagrams visually, validate cycles, and save/export as JSON, SVG, or PNG through MCP tools.

Category
Visit Server

README

Local DAG Builder MCP

A private-by-default, local-first DAG editor launched through Model Context Protocol (MCP). Build causal diagrams visually, validate cycles immediately, and save/export portable JSON, SVG, or PNG.

DAG builder screenshot

flowchart LR
  User --> Codex
  Codex --> MCP[MCP server]
  MCP --> Launcher[local process manager]
  Launcher --> Web[React DAG website]
  Web --> Storage[Browser storage / JSON]

Quick start

git clone https://github.com/resace3/local-dag-builder-mcp.git
cd local-dag-builder-mcp
npm install
npm run build
npm run start:mcp

Then add the MCP configuration below and ask Codex: Start the local DAG builder. The tool returns a verified http://127.0.0.1:8080 URL. For manual web development: npm run dev.

Codex configuration

Codex uses an mcp_servers table. Add this to ~/.codex/config.toml (Windows: C:\\Users\\<you>\\.codex\\config.toml):

[mcp_servers.local_dag_builder]
command = "node"
args = ["C:\\path\\to\\local-dag-builder-mcp\\packages\\mcp-server\\dist\\index.js"]

On macOS/Linux, use /absolute/path/to/local-dag-builder-mcp/packages/mcp-server/dist/index.js. In WSL, use the Linux path. Restart Codex, then ask it to call get_dag_builder_status. See docs/mcp-tools.md for details.

Features

  • Drag, edit, duplicate, colour, search and auto-arrange typed nodes.
  • Directed React Flow edges with immediate self-loop and cycle rejection.
  • Live validity, warnings, counts, and topological order.
  • Undo/redo, local save/load, JSON import/export/copy, SVG and PNG exports.
  • MCP tools: start_dag_builder, stop_dag_builder, get_dag_builder_status, create_example_dag, validate_dag, open_dag_file.

Commands

npm run build · npm run dev · npm run start:web · npm run start:mcp · npm test · npm run test:e2e · npm run lint · npm run typecheck

scripts/setup.ps1 and scripts/setup.sh install and build in one step.

DAG schema

{ version: "1.0", name, nodes: [{ id, label, type, description?, color?, position }], edges: [{ id, source, target, label? }] }. Examples live in examples/.

Security and privacy

The website binds only to 127.0.0.1; no analytics or external services are used. The MCP server validates ports, uses spawn without a shell, caps request sizes, and only reads example files or paths under the project / explicit allowed folder. DAG JSON is data, never executable code. Details: docs/architecture.md.

Testing and troubleshooting

Run npm test, npm run typecheck, then npm run test:e2e. If port 8080 is busy, request another port (or the launcher picks the next available port). Delete browser local storage from the editor’s Clear action if a saved graph needs resetting.

MIT licensed.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured