AI Integration (MCP) overview
Casewhere exposes its configuration surface as a Model Context Protocol (MCP) server, so AI coding assistants — Claude Code, GitHub Copilot, and OpenAI Codex — can help you build and maintain Casewhere solutions in natural language. Instead of clicking through Casewhere Admin, you can ask an assistant to create a data class, add a workflow activity, wire up a widget, or refactor a rule, and it carries out the change through the same Admin APIs you use.
AI Integration is available in Casewhere 2.9.9 and later. It is turned on by an administrator (see Connect an AI assistant). When enabled, an AI Integration panel appears on the Casewhere Admin home page.
How it works
The Casewhere MCP server is a shared service: a single deployment can connect to any number of Casewhere instances. It does not keep a copy of your configuration — it is a thin proxy that forwards every operation to a specific Casewhere instance's Admin API, acting as you.
Because the server is shared, it needs to know which instance to target and who is acting:
- Which instance — the target instance's base URL is encoded into the MCP server URL itself as a path segment:
<MCP Base URL>/<instance>/mcp. The<instance>segment is a URL-safe encoding of your Casewhere base URL, and it is filled in for you when you download the AI Workspace. There is no base-URL header to set. - Who is acting — by default the assistant signs in through your browser the first time it connects and obtains a token automatically, so nothing is stored in any file. Alternatively you can embed a personal AI Access Token as an
Authorization: Bearerheader.
flowchart LR
DEV["You + AI assistant<br/>(Claude Code / Copilot / Codex)"] -->|"MCP over HTTP<br/>instance in URL · browser login or token"| MCP{{"Casewhere MCP server<br/>(shared service)"}}
MCP -->|"proxies Admin API calls as you"| ADMIN["Casewhere Admin<br/>(your instance)"]
ADMIN --> STORE[("Configuration<br/>Event Sourcing + MongoDB")]
style MCP fill:#1f6feb,color:#ffffff,stroke:#11448a
The important consequences of this design:
- Browser login is the recommended default. The assistant opens a browser on first use, you sign in to this Casewhere instance, and it receives a token automatically — no credential is written to any file. When the session expires, you simply sign in again.
- The optional AI Access Token is a personal credential you generate in Casewhere Admin. It represents you — every action the assistant performs is authorized and audited exactly as if you had done it by hand — and is valid for 30 days. You can revoke all your tokens at any time.
- The MCP server runs over HTTP; its endpoint is the configured MCP Base URL with the encoded instance and
/mcpappended (for examplehttps://mcp-local.casewhere.com/<instance>/mcp). - Nothing is stored on the MCP server. Target a different instance and the same server works against another environment.
What you can do
The MCP server exposes the Casewhere configuration model as a large catalog of tools that span the whole platform — products, data classes, data sources, processes, workflows and activities, widgets and pages, worker sites, themes, rules, triggers, schedulers, IdP connections, text resources, documents, DevOps packages, and workflow tests. In practice you can ask an assistant to:
- Scaffold a solution — create a product, data classes, and the workflows that operate on them
- Build the UI — pages and widgets, worker sites, and themes
- Add automation — rules, data/web/event triggers, and schedulers
- Follow conventions — bootstrap the built-in knowledge pack (platform guides, DSL references, and worked examples) so generated configuration matches Casewhere best practices
- Build and test — compile workflows and rules, and run workflow tests
See Working with MCP tools for the full tool catalog, naming conventions, and edit semantics.
Before you start
- An administrator must enable AI Integration and set the MCP Base URL for your environment (see Connect an AI assistant).
- You need a Casewhere Admin account — the assistant acts with your permissions, so it can only do what you can do.
- You need a supported assistant: Claude Code, GitHub Copilot (VS Code 1.99+, Agent mode), or OpenAI Codex.
In this section
| Topic | Description |
|---|---|
| Connect an AI assistant | Enable the feature, generate a token, download the AI Workspace, and connect your editor |
| Working with MCP tools | Tool catalog, naming conventions, edit semantics, guides, and safety |