Skip to main content

Overview

The Solvice MCP server exposes the VRP API as tools that AI assistants can call directly. You describe a routing problem in natural language, and the assistant builds the request, solves it, and renders interactive visualizations — all within the conversation. This works with any MCP-compatible client. The guide below covers Claude Code (CLI) and Claude.ai (web).
The MCP server uses the same API key as the REST API. All VRP endpoints are available as tools with the same request/response schemas.

What You Get


Setup

Prerequisites

Install the plugin

1

Set the environment variable

Add your API key to your shell profile so it persists across sessions:
Never commit API keys to version control. Use environment variables or a secrets manager.
2

Install the Solvice plugin

The Solvice plugin bundles the MCP server configuration, guided skills, and slash commands. Installing it wires up the MCP connection automatically — no manual .mcp.json required.In Claude Code, run:
This registers the MCP server and adds these slash commands:
3

Restart Claude Code and verify

Restart Claude Code so it picks up the plugin and environment variable. Then ask:
Claude calls the vrp-demo tool, solves a sample problem, and renders an interactive route map inline.
If you prefer to add the MCP server directly to a project without installing the plugin, create a .mcp.json file in your project root:
.mcp.json
${SOLVICE_API_KEY} is resolved from your environment automatically. You don’t paste the key into this file.

Troubleshooting

The API key is missing or invalid. Verify the environment variable is set:
If empty, re-add it to your shell profile and restart your terminal. Then restart Claude Code.
If you installed the plugin, restart Claude Code — the MCP server connects at startup. Run /solvice:setup to confirm the connection.If you’re using manual .mcp.json setup, make sure:
  • The file is in your project root (not a subdirectory)
  • You restarted Claude Code after creating the file
  • The JSON is valid (no trailing commas, correct quotes)
  • The Authorization header is the raw key with no prefix: "${SOLVICE_API_KEY}"
Skills require the .claude/skills/solvice/ directory with SKILL.md files inside each skill folder. Verify the structure:
If empty, re-copy from the plugin repository. Skills are optional — tools work without them.

VRP Tools

The MCP server exposes VRP endpoints as callable tools. Each tool maps to a REST API endpoint with the same request/response format.

Solve & Optimize

Inspect & Modify

What-If Analysis

Use vrp-change with operation: "evaluate" to test a change without committing it. Switch to operation: "solve" to apply changes and re-optimize.

Interactive Visualizations

Tools that return solutions or explanations render interactive apps directly in the conversation.

Route Map

Color-coded routes on a live map with numbered stops, click-for-details markers, and a floating KPI bar showing score, distance, and travel time.Triggered by vrp-get-solution.

Score Dashboard

Hard/medium/soft score breakdown, constraint violation table (sortable), and resource utilization bars.Triggered by vrp-get-explanation.

What-If Builder

Drag jobs between routes and see instant score re-calculation. Compare original vs. modified scores side-by-side.Triggered by vrp-what-if.

Gantt Chart

Timeline view for shift scheduling solutions (Fill and Create solvers).Triggered by fill-get-solution or create-get-solution.

Skills (Claude Code)

The Solvice plugin includes skills — guided workflows you invoke with slash commands.

/solvice:quickstart

Hands-on tour of the VRP platform. Solves a demo problem, then lets you explore scoring, what-if analysis, debugging, and integration patterns through a menu.

/solvice:scaffold

Builds a working VRP request through a five-question interview: job type, scale, time windows, skills, capacity. Solves the request to verify feasibility and auto-fixes up to 3 times if needed. Returns verified JSON you can paste into your integration.

/solvice:debug <solve-id>

Diagnoses infeasible solutions and unassigned jobs. Fetches the explanation, maps each violated constraint to a root cause, and returns exact field paths with before/after fix values.
Skills are specific to Claude Code. In Claude.ai Projects, the same workflows are available by asking the assistant directly (e.g., “Build me a VRP request for field service appointments”).

Example Workflows

Build and solve a routing problem

The assistant builds an OnRouteRequest, calls vrp-solve-sync, and renders the route map.

Diagnose a failed solve

The assistant calls vrp-get-all, identifies constraint violations, and suggests fixes with exact field paths.

Test a schedule change

The assistant calls vrp-change with operation: "evaluate" and compares the scores.

Next Steps

VRP Quickstart

Build your first VRP request with the REST API

Scoring & Constraints

Understand hard, medium, and soft scores

Request Schema

Full VRP request schema reference

API Reference

Complete REST endpoint documentation