API Reference
MCP Server
Ontology Workbench exposes a Model Context Protocol (MCP) server at /api/mcp. This lets AI coding assistants — Claude, Cursor, Windsurf, and any MCP-compatible client — query your documentation and schema data directly.
No authentication is required. The MCP server is publicly accessible.
Endpoint
POST /api/mcp
GET /api/mcp
GET /api/mcp— returns discovery metadata (server name, version, available tools)POST /api/mcp— executes MCP JSON-RPC 2.0 requests
Available tools
The server exposes three tools:
search_docs
Full-text search across all Ontology Workbench documentation pages.
Input:
{
"query": "string"
}Output: An array of matching excerpts with page titles and slugs.
Example:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_docs",
"arguments": { "query": "export prisma schema" }
}
}get_entities
Returns the list of entity type names from a published OWB model.
Input:
{
"modelId": "string (UUID)"
}Output: Array of entity type names in the model.
get_relationship
Returns relationship details for a published OWB model.
Input:
{
"modelId": "string (UUID)"
}Output: Array of relationships with source, target, and cardinality.
Connecting from Claude Desktop
Add the following to your Claude Desktop MCP configuration (claude_desktop_config.json):
{
"mcpServers": {
"ontology-workbench": {
"url": "https://your-deployment-url.com/api/mcp"
}
}
}Once connected, Claude can search OWB documentation and query your published models during a conversation.
Connecting from Cursor
In Cursor's settings, add a new MCP server with the URL:
https://your-deployment-url.com/api/mcp
Cursor will automatically discover the available tools via the GET /api/mcp discovery endpoint.
Protocol details
The server implements MCP over HTTP using JSON-RPC 2.0. Supported methods:
| Method | Description |
|---|---|
tools/list | Returns all available tools and their input schemas |
tools/call | Executes a tool by name with the provided arguments |
Discovery response (GET /api/mcp):
{
"name": "owb-docs",
"version": "1.0.0",
"tools": ["search_docs", "get_entities", "get_relationship"]
}Use cases
- Ask your AI assistant about OWB — "How do I set up API key authentication?" routes to
search_docs - Generate code from your model — give Claude your model ID and ask it to generate a migration, resolver, or seeder using the actual entity types from
get_entities - Cross-reference your schema — ask Cursor to check that a new relationship is consistent with the existing model structure via
get_relationship