AI Charts
An MCP server that enables AI assistants to programmatically create and manage flowcharts, ERDs, and swimlane diagrams. It provides tools for manipulating diagram structures, performing auto-layouts, and exporting to Mermaid or Markdown formats.
README
<p align="center"> <img src="ai-charts-header.png" alt="AI Charts" width="100%" /> </p>
AI Charts
AI-powered flowchart, ERD, and swimlane diagram builder.
AI Charts combines a built-in AI assistant for quick chart creation with an MCP server that lets external AI tools like Claude Desktop and Cursor create and manage charts programmatically. It works with any OpenAI-compatible LLM provider — Ollama, OpenAI, or your own endpoint. No vendor lock-in.
Features
- Three chart types — flowcharts, entity-relationship diagrams, and swimlane diagrams
- Built-in AI assistant — setup wizard for new projects and a chart builder mode for iterating on diagrams through conversation
- MCP server — 18+ tools for external AI integration; connect Claude Desktop, Cursor, or any MCP client to create and manage charts programmatically
- Any LLM provider — works with Ollama, OpenAI, or any OpenAI-compatible API
- Import/export — portable ZIP project archives, Mermaid syntax, Markdown summaries, and PDF export
- Auto-layout & validation — ELK-based auto-layout, cycle detection, reachability analysis, and structural validation
- Revision history — full undo/redo with event tracking
- Dark-themed UI — built with React Flow for interactive diagram editing
Quick Start
Prerequisites: Bun and an LLM provider (e.g. Ollama)
git clone https://github.com/tjameswilliams/ai-charts.git
cd ai-charts
bun install
bun run db:push
bun run dev
The app will be available at http://localhost:5174.
LLM Configuration
Configure your LLM provider through the Settings UI in the app. The default configuration points to a local Ollama instance:
| Setting | Default |
|---|---|
| API Base URL | http://localhost:11434/v1 |
| API Key | ollama |
| Model | llama3.2 |
To use OpenAI, set the base URL to https://api.openai.com/v1, add your API key, and choose a model like gpt-4o. Any OpenAI-compatible endpoint works the same way.
MCP Server
AI Charts exposes an MCP server so external AI tools can create and manage charts programmatically.
Run standalone:
bun run mcp
Connect from Claude Desktop — add to your claude_desktop_config.json:
{
"mcpServers": {
"ai-charts": {
"command": "bun",
"args": ["run", "mcp"],
"cwd": "/path/to/ai-charts"
}
}
}
Available tools include: list_projects, create_project, list_charts, create_chart, build_chart, add_node, add_edge, delete_node, delete_edge, resize_nodes, get_nodes, get_chart_status, validate_chart, export_mermaid, export_markdown, and more.
Project Structure
client/ React + Vite frontend
src/
components/ UI components
store/ Zustand state management
api/ API client
server/ Bun + Hono backend
routes/ API endpoints
db/ Drizzle ORM schema & migrations
lib/
llm.ts LLM integration & tool definitions
mcp/ MCP server & client manager
export/ Export utilities (Mermaid, Markdown, PDF)
validation.ts Chart validation
Tech Stack
- Runtime: Bun
- Backend: Hono, SQLite via Drizzle ORM
- Frontend: React 19, React Flow, Zustand, Tailwind CSS 4
- AI: OpenAI-compatible chat completions, Model Context Protocol
- Layout: ELK via elkjs
License
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.