MCP & AI integrations
import { Aside } from ‘@astrojs/starlight/components’;
The Model Context Protocol (MCP) lets AI assistants read and (with the right API key scopes) update your team knowledge base through tools such as search, list documents, and create/update document.
Orimora ships two MCP transports:
- HTTP endpoint at
/api/mcp— recommended for remote access. Uses the MCP Streamable HTTP transport. Authenticate with an API key as Bearer token. - stdio server in the repository — for local development. You point your MCP client at
yarn mcp.
Prerequisites
Section titled “Prerequisites”- Same stack as Installation: Node.js, Yarn, PostgreSQL, and a working
.envwith at leastDATABASE_URL(and the other required secrets described there). - An API key from the web app: Settings → Developers. Copy the full token once (format
kb_…). The MCP server validates it against the database like the REST API.
Option 1: HTTP endpoint (recommended)
Section titled “Option 1: HTTP endpoint (recommended)”The HTTP endpoint is available at {APP_URL}/api/mcp (for example https://your-domain.com/api/mcp) and must be enabled per team in Settings → Developers → MCP Server (HTTP). Only team admins can toggle MCP.
Authentication uses Bearer tokens — the same API keys from Settings → Developers.
Quick start (Cursor + hosted Orimora)
Section titled “Quick start (Cursor + hosted Orimora)”- In the web app, go to Settings → Developers and turn on MCP Server (HTTP).
- Under API keys, create a key with the scopes you need (
writeif tools should create or edit documents). Copy the full token once — it starts withkb_. - Use the Copy endpoint URL and Copy Cursor MCP JSON buttons on the same page (they appear when MCP is enabled). In the JSON, replace
YOUR_API_KEYwith your realkb_…token. - Merge the
mcpServersentry into Cursor’s MCP config:- All projects (user):
~/.cursor/mcp.jsonon macOS/Linux, or the path shown in Cursor Settings → MCP for your OS. - Single repository:
.cursor/mcp.jsonat the repo root.
- All projects (user):
- Restart Cursor or use Reload MCP / restart the MCP host so the new server is picked up.
Cursor (HTTP) — config snippet
Section titled “Cursor (HTTP) — config snippet”{ "mcpServers": { "orimora": { "url": "https://your-domain.com/api/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } }}Replace https://your-domain.com with your instance URL and YOUR_API_KEY with the full kb_… key.
Claude Desktop (HTTP)
Section titled “Claude Desktop (HTTP)”Use the same URL and Bearer token. Claude Desktop supports HTTP MCP servers natively since late 2025.
Any MCP client
Section titled “Any MCP client”Send standard MCP Streamable HTTP requests:
- POST
/api/mcp— MCP JSON-RPC messages - GET
/api/mcp— SSE stream for server-initiated messages - DELETE
/api/mcp— session cleanup
All requests require the Authorization: Bearer kb_… header.
Option 2: stdio server (local development)
Section titled “Option 2: stdio server (local development)”For local development with direct database access, you can use the stdio transport:
export ORIMORA_API_KEY="kb_your_full_token_here"yarn mcpThe process uses stdio — it is meant to be spawned by an MCP client, not browsed in a browser.
Under the hood this runs tsx with tsconfig.mcp.json and src/mcp-server/index.ts (see the mcp script in package.json).
Cursor (stdio)
Section titled “Cursor (stdio)”{ "mcpServers": { "orimora": { "command": "yarn", "args": ["mcp"], "cwd": "/absolute/path/to/orimora-repo", "env": { "ORIMORA_API_KEY": "kb_…", "DATABASE_URL": "postgresql://user:pass@host:5432/dbname" } } }}cwdmust be the Orimora repo root so dependencies and path aliases resolve.- If your client loads
.envfor you, you may omit duplicate variables — otherwise passDATABASE_URLexplicitly.
Claude Desktop and others (stdio)
Section titled “Claude Desktop and others (stdio)”Use the same pattern: command + args + working directory + environment with ORIMORA_API_KEY and DATABASE_URL.
Permissions and restricted mode
Section titled “Permissions and restricted mode”API keys support:
- Scopes:
read,write,admin— MCP tools that mutate content requirewritewhere applicable. - Restricted mode: optional allowlists per collection and per-document overrides, configured in the app under Settings → Developers → Configure access. The same rules apply to MCP and to
/api/v1/.
Related documentation
Section titled “Related documentation”- REST API overview — Bearer
kb_…authentication for HTTP clients - Configuration — environment variables
- OpenAPI reference — REST operations
For a short maintainer checklist (dev server URL, health check, internal notes), see internal/dev-and-mcp.md in the repository.