MCP Server
The ChapterTwo MCP (Model Context Protocol) server allows AI assistants to interact with the platform — managing rightsholders, querying royalty analytics, and more.
Server URL
https://mcp.chaptertwo.com/api/mcpAuthentication is handled automatically via OAuth 2.0. When your MCP client connects, it negotiates authentication through the standard OAuth discovery flow.
Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
json{ "mcpServers": { "chaptertwo": { "url": "https://mcp.chaptertwo.com/api/mcp" } } }
Config file location:
- —macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - —Windows:
%APPDATA%\Claude\claude_desktop_config.json
Cursor
Add to .cursor/mcp.json in your project root:
json{ "mcpServers": { "chaptertwo": { "url": "https://mcp.chaptertwo.com/api/mcp" } } }
Generic MCP Clients
Any MCP client that supports Streamable HTTP transport and OAuth 2.0 can connect:
| Setting | Value |
|---|---|
| Server URL | https://mcp.chaptertwo.com/api/mcp |
| Transport | Streamable HTTP (POST) |
| Auth | OAuth 2.0 with PKCE (auto-negotiated) |
OAuth discovery endpoints:
- —
https://mcp.chaptertwo.com/.well-known/oauth-authorization-server - —
https://mcp.chaptertwo.com/.well-known/oauth-protected-resource
Authentication Flow
- —Your MCP client connects to the server URL
- —The server responds with a 401 including a WWW-Authenticate header pointing to the OAuth discovery endpoint
- —Your client fetches the OAuth metadata and initiates a PKCE authorization flow
- —You log in via ChapterTwo (Clerk) in your browser
- —The client receives an access token and includes it in subsequent requests
Tokens auto-refresh. If you belong to multiple organizations, set the x-organization-id header to select one.
Available Tools
The MCP server exposes the following tools (all prefixed with c2_):
| Tool | Description |
|---|---|
| c2_health | Check API health status |
| c2_whoami | Returns current user and organization info |
| c2_get_permissions | Get current user permissions and capabilities |
| c2_api_call | Call any tRPC API procedure (auto-detects query vs mutation) |
| c2_list_endpoints | List available API endpoints, optionally filtered by namespace |
| c2_search_endpoints | Search API endpoints by keyword |
| c2_describe_endpoint | Returns procedure type, namespace, and route info |
| c2_query_analytics | Query royalty analytics via the Cube semantic layer |
| c2_cube_meta | Get available Cube measures, dimensions, and descriptions |
Example Usage
Once connected, you can ask your AI assistant:
- —"List my rightsholders"
- —"Show earnings for Artist X in 2024"
- —"What are the top tracks by revenue?"
- —"What API endpoints are available?"
- —"What analytics dimensions can I query?"
Troubleshooting
“Missing or invalid Authorization header”
Your MCP client didn't include a valid bearer token. Ensure OAuth is properly configured and your client supports the OAuth 2.0 + PKCE flow.
“No organization found for this user”
Your ChapterTwo account isn't associated with any organization. Contact your administrator to be added to an organization.
“Multiple organizations found”
You belong to multiple organizations. Set the x-organization-id header to select which one to use. Your MCP client may prompt you to choose.
“Access token expired”
Your access token has expired. Most MCP clients handle token refresh automatically. If not, reconnect to trigger a new OAuth flow.
Connection timeout
The MCP server has a 55-second timeout per request. If you're running a complex analytics query, try narrowing the filters or reducing the data range.