{
  "mcp_version": "1.0",
  "server_name": "graphine",
  "server_version": "0.1.0",
  "description": "AI-powered diagram tools — create, edit, search, and convert cloud architecture diagrams. Browse pre-built templates for AWS, GCP, and Azure.",
  "endpoints": {
    "streamable_http": "/api/mcp"
  },
  "capabilities": {
    "tools": true,
    "resources": false,
    "prompts": false,
    "sampling": false,
    "roots": false
  },
  "tools": [
    { "name": "list_diagrams", "description": "List all diagrams for the authenticated user" },
    { "name": "get_diagram", "description": "Fetch a single diagram by ID, including nodes and edges" },
    { "name": "create_diagram", "description": "Create a new diagram with name, description, nodes, and edges" },
    { "name": "update_diagram", "description": "Update an existing diagram's name, description, nodes, or edges" },
    { "name": "delete_diagram", "description": "Delete a diagram by ID. Irreversible" },
    { "name": "list_versions", "description": "List version history for a diagram (metadata only, paginated)" },
    { "name": "get_version", "description": "Fetch a single full version by diagram ID and version ID" },
    { "name": "restore_version", "description": "Restore a previous version of a diagram" },
    { "name": "export_drawio", "description": "Convert Graphine nodes/edges to draw.io XML" },
    { "name": "export_plantuml", "description": "Convert Graphine nodes/edges to PlantUML text" },
    { "name": "import_drawio", "description": "Parse draw.io XML into Graphine nodes/edges" },
    { "name": "import_plantuml", "description": "Parse PlantUML text into Graphine nodes/edges" },
    { "name": "list_templates", "description": "List all built-in diagram templates with metadata" },
    { "name": "get_template", "description": "Fetch a full template by ID, including nodes and edges" }
  ],
  "authentication": {
    "required": false,
    "methods": ["bearer"],
    "description": "Pass a session JWT via the Authorization: Bearer header for authenticated operations (create, update, delete). Optional for public diagrams and read-only tools."
  },
  "client_configs": {
    "cursor": {
      "url": "/api/mcp"
    },
    "claude_desktop": {
      "url": "/api/mcp"
    },
    "windsurf": {
      "serverUrl": "/api/mcp"
    },
    "stdio": {
      "command": "bun",
      "args": ["mcp/server.ts"],
      "env": {
        "GRAPHINE_API_URL": "http://localhost:3001",
        "GRAPHINE_API_TOKEN": "<your-jwt>"
      }
    }
  },
  "documentation": "/#mcp"
}
