loading…
Search for a command to run...
loading…
MCP for https://chhart.app to easily create flowcharts or sankey diagram
MCP for https://chhart.app to easily create flowcharts or sankey diagram
npm version License: MIT Node.js Version
An MCP (Model Context Protocol) server that enables AI assistants like ChatGPT, Claude, and others to programmatically create flowcharts and Sankey diagrams on chhart.app.
npm install -g chhart-mcp
Or run directly without installing:
npx chhart-mcp
# Clone the repository
git clone https://github.com/alwank/chhart_MCP.git
cd chhart_MCP
# Install dependencies
npm install
# Build the project
npm run build
You can use our managed MCP server without installing anything locally.
Configure your MCP client to connect to the public endpoint:
{
"mcpServers": {
"chhart": {
"url": "https://mcp.chhart.app/mcp"
}
}
}
For use with Claude Desktop, Cursor, or other local MCP clients:
Build the project:
npm run build
Add to your MCP client configuration:
For Claude Desktop, edit claude_desktop_config.json:
{
"mcpServers": {
"chhart": {
"command": "npx",
"args": ["-y", "chhart-mcp"]
}
}
}
For Cursor or other clients, see CONFIG_EXAMPLES.md for more examples.
Restart your MCP client
For deployment to Railway, Vercel, or other cloud platforms, we use the modern StreamableHTTP transport for reliable, stateless communication.
Build and start the StreamableHTTP server:
npm run build
npm run start:streamable
The server will start on port 3000 (or the port specified in PORT environment variable).
Configure your MCP client to connect to the remote endpoint:
{
"mcpServers": {
"chhart": {
"url": "https://your-deployment-url.com/mcp"
}
}
}
Deploy to Railway:
See the Railway Deployment Guide for detailed instructions.
We migrated from SSE to StreamableHTTP transport for better reliability:
| Feature | SSE Transport | StreamableHTTP Transport |
|---|---|---|
| Connection Type | Long-lived SSE stream | Stateless HTTP requests |
| Stability | Prone to timeouts | ✅ Robust and reliable |
| Cloud Compatibility | Limited | ✅ Excellent |
| Session Management | Required | Optional (stateless) |
The SSE transport is still available but deprecated:
npm run start:sse # Not recommended for production
create_flowchartCreates a flowchart using Chhart's text-based DSL.
Parameters:
content (string, required) - Flowchart content in Chhart DSL formattitle (string, optional) - Title for the flowchartExample:
{
"content": "Start\n Process Step\n Decision? [shape=diamond]\n Yes\n Action\n End\n No\n Skip\n End",
"title": "Simple Workflow"
}
create_sankeyCreates a Sankey diagram showing flows between nodes.
Parameters:
content (string, required) - Sankey diagram content in Chhart DSL formattitle (string, optional) - Title for the diagramExample:
{
"content": "Revenue [value=100]\n Costs [value=40]\n Salaries [value=25]\n Operations [value=15]\n Profit [value=60]",
"title": "Budget Flow"
}
get_syntax_helpReturns documentation and examples for Chhart syntax.
Parameters:
type (enum, optional) - 'flowchart', 'sankey', or 'all' (default: 'all')Once configured, you can ask your AI assistant:
"Create a flowchart showing a user login process with email verification"
"Create a Sankey diagram showing how $100 of revenue splits into costs, taxes, and profit"
"Show me the syntax for creating flowcharts in Chhart"
# Install dependencies
npm install
# Build
npm run build
# Watch mode (auto-rebuild on changes)
npm run watch
# Run locally (stdio mode)
npm start
# Run StreamableHTTP server (recommended for remote access)
npm run start:streamable
# Run SSE server (legacy, deprecated)
npm run start:sse
chhart_MCP/
├── src/
│ ├── index.ts # Main entry point (stdio mode)
│ ├── server-streamable.ts # StreamableHTTP server (recommended)
│ ├── server-sse.ts # SSE server (legacy)
│ ├── tools/ # MCP tool implementations
│ ├── utils/ # Utility functions
│ └── transports/ # Transport implementations
│ ├── streamable.ts # StreamableHTTP transport
│ └── sse.ts # SSE transport (legacy)
├── dist/ # Compiled JavaScript (generated)
└── docs/ # Documentation files
The MCP server generates shareable URLs by encoding chart data into the URL hash, leveraging chhart.app's existing URL-based sharing feature. This means:
npm install and npm run buildnode --version"connection closed: EOF" or similar errors:
npm run start:streamable)http://localhost:3000/healthClient configuration:
application/json requests to /mcptext/event-stream for the /mcp stream and JSON for /messages/mcp endpointnode_modules and dist, then run npm install and npm run buildFor more help, see CONTRIBUTING.md or open an issue.
We welcome contributions! Please see CONTRIBUTING.md for guidelines on:
For security concerns, please see our Security Policy. Do not open public issues for security vulnerabilities.
MIT License - see LICENSE for details.
Copyright (c) 2026 Chhart.app
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"chhart-mcp": {
"command": "npx",
"args": []
}
}
}