🔌MCP - Prerequisites & Authentification
Connect your AI client to Casebase via OAuth or Bearer Token and access your use case portfolio directly through MCP.
📋 Table of Contents
⚙️ Overview
The Casebase MCP Server allows any MCP-compatible AI client to interact directly with your use case portfolio. Instead of using the Casebase interface, you can query, create, and update use cases through AI assistants like Claude, Cursor, or your own agents.
The MCP Server is a lightweight adapter layer: it forwards requests from the AI client directly to the Casebase REST API. All processing logic lives in the AI client or in the Casebase backend — not in the MCP Server itself.
Server URL:
https://mcp.casebase.ai/mcp/{tenant}/{workspaceId}
✅ Prerequisites
- A Casebase account with workspace access
- An MCP-compatible client (e.g. Claude Desktop, Cursor, VS Code, Claude Code CLI)
- Authentication via OAuth (SSO or email/password) — or a Bearer Token for CLI and developer setups
🔐 Authentication
The MCP Server supports two authentication models. Use the table below to choose the right one:
| Scenario | OAuth 2.1 | Bearer Token (Entra ID) |
|---|---|---|
| Client type | Claude.ai, Cursor, VS Code, Claude Desktop — any MCP client with OAuth support | Claude Code CLI, custom agents, developer setups |
| Setup effort | Minimal — paste the MCP URL, sign in in the browser | Low — generate a token via Azure CLI and add it to config |
| Token lifetime | Session-based, managed automatically | ~1 hour, manual renewal required |
| Best for | All end users and production use | Developers, automation, CLI workflows |
| Revocation | Instant via Casebase settings | Token expires automatically |
OAuth 2.1 (recommended)
OAuth is the easiest way to connect an MCP-compatible AI client to Casebase. No manual token management required.
How it works:
- Copy your MCP Server URL from Workspace Settings → MCP Server
- Add it to your AI client as a new MCP server (URL only — no headers needed)
- An authentication window opens automatically
- Sign in via SSO (if configured for your organisation) or with email and password
- Done — your AI client is connected
The session is managed automatically. You only need to sign in again if the session expires or you explicitly sign out.
Bearer Token (for developers & CLI)
For Claude Code CLI and other setups where OAuth isn't practical, you can use a short-lived Bearer Token from Microsoft Entra ID.
Generate a token via the Azure CLI:
powershellaz account get-access-token --resource {entra-resource-id} --query accessToken -o tsv
The token is passed as a header in your client configuration:
Authorization: Bearer {token} Provider: AD
⚠️ Tokens expire after approximately 1 hour. See Token Renewal for the refresh workflow.
🚀 Setup by Client
You can find your MCP Server URL under Workspace Settings → MCP Server.
Claude Desktop (OAuth)
Add the MCP Server URL to Claude Desktop as a new MCP server. The authentication window opens automatically on the first connection attempt.
Claude Desktop (Bearer Token)
Open claude_desktop_config.json and add the following entry:
{ "mcpServers": { "casebase": { "type": "http", "url": "https://mcp.casebase.ai/mcp/{tenant}/{workspaceId}", "headers": { "Authorization": "Bearer {your-token}", "Provider": "AD" } } } }
Cursor
Create a .cursor/mcp.json file in your project directory:
{ "mcpServers": { "casebase": { "url": "https://mcp.casebase.ai/mcp/{tenant}/{workspaceId}", "headers": { "Authorization": "Bearer {your-token}", "Provider": "AD" } } } }
VS Code
Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and select MCP: Add Server → HTTP. Enter the server URL and confirm. Then open the generated mcp.json and add the headers:
{ "servers": { "casebase": { "type": "http", "url": "https://mcp.casebase.ai/mcp/{tenant}/{workspaceId}", "headers": { "Authorization": "Bearer {your-token}", "Provider": "AD" } } } }
Claude Code CLI
powershellclaude mcp add casebase "https://mcp.casebase.ai/mcp/{tenant}/{workspaceId}" ` --transport http ` --header "Authorization: Bearer {your-token}" ` --header "Provider: AD"
Verify the connection:
claude mcp listand/mcpwithin a session.
Renewing the token: Claude Code stores the token directly in its registration. When it expires, run
claude mcp remove casebasefirst, then repeat themcp addcommand with the new token.
🔄 Token Renewal
Applies only to Bearer Tokens (Entra ID). Bearer Tokens expire after approximately 1 hour. If your client stops responding or reports an authentication error:
1. Generate a new token:
powershellaz account get-access-token --resource {entra-resource-id} --query accessToken -o tsv
2. Replace the token in your client configuration:
| Client | Steps |
|---|---|
| Claude Desktop | Replace the Authorization header in claude_desktop_config.json, restart the client |
| Cursor | Replace the Authorization header in .cursor/mcp.json |
| VS Code | Replace the Authorization header in mcp.json |
| Claude Code CLI | claude mcp remove casebase → repeat mcp add with the new token |
💡 Clients don't automatically reload configuration files — restart the client or the MCP connection after updating the token.