Skip to content

MCP Server (Claude / Cursor)

@vizcrush/mcp-server exposes the entire vizcrush toolkit — every algorithm, every package — as MCP tools that AI agents like Claude Desktop, Claude Code, Cursor, and other MCP-aware clients can call directly.

This means an AI agent can "load my CSV, downsample to 1920 points, detect anomalies, and tell me what's interesting" without any glue code on your end.

What's MCP?

Model Context Protocol is an open standard for AI agents to call tools and access resources from external servers. An MCP server exposes a list of typed tools; an agent picks which ones to call based on user intent.

vizcrush ships with 24+ MCP tools covering downsampling, binning, spatial indexing, statistics, and AI features.

Available tools

Downsampling

ToolPurpose
vizcrush_lttbLTTB downsampling
vizcrush_minmax_lttbMinMax-LTTB (preserves spikes)
vizcrush_auto_downsampleAuto-pick the best algorithm

Binning

ToolPurpose
vizcrush_histogram1D histogram
vizcrush_bin2d2D density grid
vizcrush_bin3d3D voxel grid

Spatial indexing

ToolPurpose
vizcrush_build_indexBuild a 2D quadtree
vizcrush_query_rangeRange query on a quadtree
vizcrush_query_nearestk-NN on a quadtree
vizcrush_build_index_3dBuild a 3D octree
vizcrush_query_range_3dRange query on an octree
vizcrush_frustum_cullFrustum culling for GPU rendering

Aggregate & transform

ToolPurpose
vizcrush_statsSummary statistics + percentiles
vizcrush_normalizeMin-max normalization
vizcrush_sortRadix sort

AI

ToolPurpose
vizcrush_summarizeGenerate a structured data summary
vizcrush_detect_anomaliesAnomaly detection (MAD-based)
vizcrush_auto_optimizeRecommend algorithm + parameters
vizcrush_parse_queryParse a natural-language data query
vizcrush_shape_similarityCompare two series by shape

Utility

ToolPurpose
vizcrush_capabilitiesReport environment capabilities
vizcrush_benchmarkRun a quick benchmark
vizcrush_load_fileLoad a CSV file
vizcrush_inspect_fileInspect CSV columns and dtypes

All tools have Zod-validated schemas (in packages/mcp-server/src/schemas.ts) so the agent gets exact type information for every parameter.

Transports

The MCP server supports two transports:

  • stdio (default) — for desktop AI clients (Claude Desktop, Claude Code, Cursor) that launch the server as a subprocess
  • HTTP streaming — for remote / hosted scenarios

Setup: Claude Desktop

  1. Build the MCP server (once, from the monorepo):

    bash
    cd /path/to/vizcrush
    pnpm install && pnpm build
  2. Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

    json
    {
      "mcpServers": {
        "vizcrush": {
          "command": "node",
          "args": ["/absolute/path/to/vizcrush/packages/mcp-server/dist/index.js"]
        }
      }
    }
  3. Restart Claude Desktop. You should see "vizcrush" in the MCP servers list with all tools available.

  4. Try it. Open a chat and say: "Load /tmp/data.csv, downsample the value column to 1000 points, and detect any anomalies." Claude will pick the right tools and report back.

Setup: Claude Code

Add to ~/.claude.json or your project's .mcp.json:

json
{
  "mcpServers": {
    "vizcrush": {
      "command": "node",
      "args": ["/absolute/path/to/vizcrush/packages/mcp-server/dist/index.js"]
    }
  }
}

Setup: Cursor

In Cursor settings → MCP → Add server:

json
{
  "mcpServers": {
    "vizcrush": {
      "command": "node",
      "args": ["/absolute/path/to/vizcrush/packages/mcp-server/dist/index.js"]
    }
  }
}

Setup: HTTP transport (remote)

Run the server as a long-lived HTTP service:

bash
node packages/mcp-server/dist/index.js --transport http --port 3847

Then point any MCP client at http://localhost:3847.

Example agent prompts

Once configured, you can ask the agent things like:

  • "Load /tmp/financial.csv, build a quadtree on the (timestamp, price) columns, and tell me how many points are in the box (1700000000, 100, 1700100000, 150)."
  • "Run vizcrush_summarize on the temperature series in /tmp/sensors.csv and explain what you find."
  • "Downsample the cpu_usage column to 1920 points and check for anomalies above 90%."
  • "Bin the (lat, lng) columns into a 256×256 density grid and tell me where the hottest cell is."

The agent will pick the right tools, chain them, and report results in natural language.

Inspecting tool schemas

For development, you can list and introspect tools without an AI client by using the MCP inspector:

bash
npx @modelcontextprotocol/inspector node packages/mcp-server/dist/index.js

This opens a browser UI at http://localhost:5173 where you can call tools manually.

See also

Released under the MIT License.