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
| Capability | Description |
|---|---|
| 15 VRP tools | Solve, evaluate, suggest, change, and inspect routing solutions |
| Interactive apps | Route map, score dashboard, what-if builder — rendered inline |
| Guided skills | /solvice:scaffold to build requests, /solvice:debug to diagnose failures |
| Documentation resources | Constraint reference, integration patterns, and request schemas available in-context |
Setup
- Claude Code
- Claude Desktop
- Claude.ai (Projects)
- Other MCP clients
Prerequisites
- Claude Code installed
- A Solvice API key (platform.solvice.io → Settings → API Keys)
Install the plugin
Set the environment variable
Add your API key to your shell profile so it persists across sessions:
- macOS / Linux (zsh)
- macOS / Linux (bash)
- Windows
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 This registers the MCP server and adds these slash commands:
.mcp.json required.In Claude Code, run:| Command | What it does |
|---|---|
/solvice:quickstart | Hands-on tour — solve, score, modify, debug |
/solvice:scaffold | Build a working request through a 5-question interview |
/solvice:debug <id> | Diagnose constraint violations with field-level fixes |
/solvice:setup | Verify the MCP connection is working |
Manual setup (without the plugin)
Manual setup (without the plugin)
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
401 Unauthorized
401 Unauthorized
Tool not found / MCP server not connected
Tool not found / MCP server not connected
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
Authorizationheader is the raw key with no prefix:"${SOLVICE_API_KEY}"
Skills not showing up
Skills not showing up
Skills require the If empty, re-copy from the plugin repository. Skills are optional — tools work without them.
.claude/skills/solvice/ directory with SKILL.md files inside each skill folder. Verify the structure: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
| Tool | Description | REST equivalent |
|---|---|---|
vrp-solve-sync | Solve a routing problem and wait for results | POST /v2/vrp/solve/sync |
vrp-solve | Submit a solve job (async, returns job ID) | POST /v2/vrp/solve |
vrp-evaluate-sync | Score an existing solution synchronously | POST /v2/vrp/evaluate/sync |
vrp-evaluate | Score an existing solution (async) | POST /v2/vrp/evaluate |
vrp-suggest-sync | Get schedule suggestions for unassigned jobs | POST /v2/vrp/suggest/sync |
vrp-suggest | Get suggestions (async) | POST /v2/vrp/suggest |
vrp-demo | Generate and solve a sample problem | GET /v2/vrp/demo |
Inspect & Modify
| Tool | Description | REST equivalent |
|---|---|---|
vrp-get-solution | Retrieve optimized routes (renders route map) | GET /v2/vrp/job/{id} |
vrp-get-explanation | Score breakdown and constraint violations (renders dashboard) | GET /v2/vrp/job/{id}/explanation |
vrp-get-request | Original request summary | GET /v2/vrp/job/{id}/request |
vrp-get-status | Job status (queued, solving, solved, failed) | GET /v2/vrp/job/{id}/status |
vrp-get-all | Combined request, solution, and explanation | — |
vrp-get-debug | Solver internals for constraint tracing | GET /v2/vrp/job/{id}/debug |
What-If Analysis
| Tool | Description |
|---|---|
vrp-change | Move jobs between routes, reorder stops, then evaluate or re-solve |
vrp-what-if | Open the interactive drag-and-drop scenario builder |
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
OnRouteRequest, calls vrp-solve-sync, and renders the route map.
Diagnose a failed solve
vrp-get-all, identifies constraint violations, and suggests fixes with exact field paths.
Test a schedule change
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