LU

Lucid MCP Server for Lucidchart & Lucidspark

Connect Lucidchart and Lucidspark to an MCP server to search and extract text representations via LLM-driven AI Vision, available on npm.

Quick Install
npx -y @smartzan63/lucid-mcp-server

Overview

The Lucid MCP Server is a lightweight Model Context Protocol (MCP) implementation that connects Lucidchart and Lucidspark to an AI-driven vision pipeline. It enables Lucid applications to search diagrams and whiteboards and to extract machine-readable text representations using LLM-powered vision and OCR. By acting as an MCP-compatible backend, the server lets Lucid tools call into AI services to index, query, and summarize visual content.

This server is useful for teams that want programmatic access to the contents of diagrams and boards: run semantic search across shapes and notes, extract structured text for downstream processing, or generate compact text representations for LLM prompts. It ships as an npm package and can be deployed as a local or cloud-hosted MCP endpoint for development and production integrations.

Features

  • MCP-compatible endpoints for integration with Lucidchart and Lucidspark
  • LLM-driven AI Vision pipeline to extract text and semantic representations from images/diagrams
  • Search API to find matches across diagrams, boards, or exported assets
  • Extraction API to convert visual content into plain-text or structured outputs
  • Configurable model and OCR settings (via environment or config file)
  • Simple installation via npm and deployable as a small Node service

Installation / Configuration

Install from npm (global or local):

# global install (optional)
npm install -g lucid-mcp-server

# or add to your project
npm install --save lucid-mcp-server

Start the server (project root):

# if package.json has start script
npm start

# or run directly using npx
npx lucid-mcp-server

Example environment variables (recommended):

PORT=3000
LUCID_API_TOKEN=your_lucid_api_token_here    # if the server needs to call Lucid APIs
OPENAI_API_KEY=your_openai_api_key_here      # or any LLM/OCR provider key
MODEL_NAME=gpt-4o-vision                      # example model identifier
OCR_PROVIDER=vision_api                        # provider name used by this server
LOG_LEVEL=info

You can also provide a JSON config file and point the server at it:

{
  "port": 3000,
  "model": "gpt-4o-vision",
  "ocrProvider": "vision_api",
  "lucid": {
    "token": "your_lucid_api_token_here"
  }
}

Run with a file:

npx lucid-mcp-server --config ./mcp-config.json

Available Resources

The server exposes a small set of HTTP endpoints designed to be consumed by Lucid integrations or other clients. Default paths include:

  • GET /mcp/manifest
    • Returns a machine-readable manifest describing the MCP tools and capabilities the server provides.
  • POST /mcp/search
    • Accepts a query and scope, returns ranked matches extracted from target diagrams/boards.
  • POST /mcp/extract
    • Accepts a resource reference (image/board export) and returns a text or structured representation.
  • GET /health
    • Lightweight health check for orchestration and uptime monitoring.

Example request/response shapes:

Search request (curl):

curl -X POST http://localhost:3000/mcp/search \
  -H "Content-Type: application/json" \
  -d '{
    "query": "user authentication",
    "scope": {
      "type": "board",
      "id": "board-1234"
    },
    "options": { "topK": 10 }
  }'

Extract request (curl):

curl -X POST http://localhost:3000/mcp/extract \
  -H "Content-Type: application/json" \
  -d '{
    "resource": { "type": "image", "url": "https://example.com/diagram.png" },
    "format": "text"
  }'

Responses include structured JSON with matches, confidence scores, and extracted text snippets.

Use Cases

  • Search across a team’s Lucidspark boards to find every mention of a product name or technical term, then jump to the exact shape or sticky note containing the text.
  • Automate accessibility: periodically extract text from Lucidchart diagrams and generate alt-text summaries for inclusion in documentation or web pages.
  • Convert legacy diagrams into a searchable index: batch-export diagrams as images, use the MCP server to extract text and metadata, and feed results into your internal search engine.
  • Summarize meeting whiteboards: after a brainstorming session, extract the main points and produce a concise summary using the LLM-driven representation.
  • Integrate with automation: use the server to detect specific patterns (e.g., “TODO”, “blocked”, or “owner:”) and trigger downstream workflows in CI/CD or task trackers.

Additional Notes and Troubleshooting

  • Authentication: if you enable Lucid API calls, ensure a valid Lucid developer token is configured. The server can also accept URLs to exported assets if it doesn’t directly call the Lucid API.
  • Model configuration: swap provider keys or model names via environment variables to use different LLM/OCR backends.
  • Performance: extraction workloads that rely on vision models can be CPU/GPU intensive. Consider batching requests or deploying the server behind autoscaling for heavy usage.
  • Source code and issues: the full implementation and examples are available on GitHub — https://github.com/smartzan63/lucid-mcp-server — where you can report issues or contribute.

If you’re integrating this server into a Lucid application, review the MCP specification and Lucid developer docs to wire the manifest and tool invocations correctly.