MCP-GLSP

MCP-GLSP

Enables AI-driven graphical diagram creation and manipulation using natural language, with support for BPMN workflows, analysis, and manual editing via the Model Context Protocol.

Category
Visit Server

README

MCP-GLSP: AI-Native Graphical Modeling Platform

šŸš€ The world's first AI-native implementation of the Graphical Language Server Protocol (GLSP) using the Model Context Protocol (MCP) for universal AI agent compatibility.

🌟 Revolutionary Features

  • šŸ¤– Natural Language → Diagrams: "Create a workflow for order processing" → Complete BPMN diagram
  • šŸ“Š AI-Powered Analysis: Intelligent optimization, bottleneck detection, and process improvement
  • šŸ”§ Universal AI Access: Any MCP-compatible AI agent can create and manipulate diagrams
  • šŸŽØ Interactive Canvas: Real-time diagram editing with drag-and-drop
  • ⚔ Auto-Discovery: Automatically detects and configures available AI models

šŸ“Š Current Status

Functional MVP with Strong Foundation

āœ… Working Components:

  • Complete MCP server with 7 diagram tools implemented
  • TypeScript frontend with Canvas rendering
  • Ollama integration with model auto-detection
  • Basic diagram creation and manipulation
  • Comprehensive documentation and startup instructions

āš ļø Ready for Use:

  • Creates sample diagrams with basic node types
  • AI generates intelligent diagram planning (text-based)
  • Manual editing supports position updates and basic interactions
  • All three services integrate smoothly

šŸ”§ Areas for Enhancement:

  • AI → Visual: Currently generates text plans, full visual generation being refined
  • Canvas Rendering: Basic shapes working, advanced BPMN/UML symbols in development
  • Edge Creation: Tool implemented, UI workflow being polished
  • File Persistence: Memory-based storage, file system integration planned
  • Testing: Core functionality validated, comprehensive test suite in progress

Architecture Validation: This implementation successfully demonstrates that the MCP-GLSP concept works. The foundation is solid and the system is actively usable for diagram creation and AI experimentation.

šŸ—ļø Architecture

Revolutionary Protocol Mapping:

  • MCP Resources → Diagram model state (read-only views)
  • MCP Tools → Diagram operations (create, modify, validate)
  • MCP Prompts → AI modeling workflows (guided templates)

Components:

  • Backend: Rust HTTP server implementing MCP over JSON-RPC
  • Frontend: TypeScript web client with Canvas rendering + AI integration
  • AI Agent: Ollama LLM integration with intelligent diagram generation

šŸš€ Quick Start

Prerequisites

  1. Rust (latest stable)

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  2. Node.js (v18+) and npm

    # Download from https://nodejs.org/ or use your package manager
    node --version  # Should be v18+
    npm --version
    
  3. Ollama (for AI features)

    # Install from https://ollama.ai/ then:
    ollama pull llama3.2  # or llama2, mistral, etc.
    

šŸ”„ Start the Complete System

Terminal 1: Start MCP-GLSP Server

cd glsp-mcp-server
cargo run --bin server

Expected: "Server listening on http://127.0.0.1:3000"

Terminal 2: Start Frontend + AI Agent

cd glsp-web-client
npm install  # First time only
npm run dev

Expected: "Local: http://localhost:5173/"

Terminal 3: Ensure Ollama is Running

# Check if running:
curl http://127.0.0.1:11434/api/tags

# If not running:
ollama serve

šŸŽÆ Test the AI Workflow

  1. Open: http://localhost:5173
  2. Check Status: AI panel should show 🟢 for both Ollama and MCP connections
  3. Select Model: Dropdown automatically populated with your available models
  4. Enter Description:
    "Create a BPMN workflow for customer support ticket resolution with escalation paths"
    
  5. Click "Create Diagram": Watch AI → MCP → Canvas magic! ✨

šŸŽØ Usage Examples

Natural Language Diagram Creation

"Create a workflow for e-commerce order fulfillment with payment validation, inventory check, and shipping"

→ Complete BPMN diagram with start/end events, tasks, gateways, and proper flow

AI-Powered Analysis

  • Analyze Current Diagram: Get intelligent insights about process efficiency
  • Optimize Layout: AI applies best practices for diagram organization
  • Add Error Handling: Automatically insert error boundaries and recovery paths

Manual Editing

  • Drag & Drop: Interactive canvas with real-time editing
  • Tool Palette: Create nodes, edges, apply layouts manually
  • Export: SVG, JSON, or other formats

šŸ”§ Development

Backend Development

cd glsp-mcp-server

# Run server
cargo run --bin server

# Run tests
cargo test

# Build release
cargo build --release

Frontend Development

cd glsp-web-client

# Development server
npm run dev

# Build for production
npm run build

# Type checking
npx tsc

# Linting
npm run lint

API Testing

# Test MCP server health
curl http://127.0.0.1:3000/health

# Test diagram creation
curl -X POST http://127.0.0.1:3000/mcp/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
      "name": "create_diagram",
      "arguments": {"diagramType": "workflow", "name": "Test"}
    },
    "id": 1
  }'

šŸ“š Documentation

🌐 MCP Protocol Integration

This implementation provides:

Tools (7 available)

  • create_diagram, create_node, create_edge, delete_element
  • update_element, apply_layout, export_diagram

Resources (Dynamic)

  • diagram://model/{id} - Complete diagram state
  • diagram://validation/{id} - Validation results
  • diagram://metadata/{id} - Statistics and info
  • diagram://list - All available diagrams

Prompts (6 AI workflows)

  • generate_workflow, optimize_layout, add_error_handling
  • analyze_diagram, create_subprocess, convert_diagram

šŸš€ What Makes This Revolutionary

  1. First AI-Native GLSP: Traditional GLSP requires manual interaction - this enables pure AI-driven modeling
  2. Universal AI Compatibility: Any MCP-compatible AI can connect (Claude Desktop, custom agents, etc.)
  3. Intelligent Automation: AI understands diagram semantics, not just visual elements
  4. Self-Configuring: Auto-discovers models, handles errors gracefully
  5. Proven Architecture: Demonstrates successful MCP-GLSP integration with real working code

šŸ¤ Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

šŸ“„ License

MIT License - see LICENSE file for details.

šŸ™ Acknowledgments

  • Eclipse GLSP: Original Graphical Language Server Protocol inspiration
  • Anthropic MCP: Model Context Protocol specification
  • Ollama: Local LLM runtime
  • Rust & TypeScript: Amazing development ecosystems

šŸŽÆ Ready to revolutionize diagram creation with AI? Start the system and create your first AI-generated diagram in under 2 minutes! šŸš€

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