Skip to content

Reason (MCP)

1. Add Oka to your MCP client

@oka-core/reason is an npm package runnable via npx. Add it to your MCP client config:

{
"mcpServers": {
"oka": {
"command": "npx",
"args": ["-y", "@oka-core/reason"]
}
}
}

No API key needed in the config — you’ll authenticate interactively.

See client-specific setup for config file locations (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Codex, etc.).

2. Authenticate

Once your MCP client connects to Oka, use the login tool:

> Use the login tool to authenticate with Oka

This opens your browser to id.oka.so where you sign in (or create an account). The MCP server stores your token locally at ~/.oka/credentials.json — you won’t need to log in again until the token expires.

Alternative: API key

For CI/CD pipelines or headless environments where browser login isn’t possible, set OKA_API_KEY in your MCP config:

{
"mcpServers": {
"oka": {
"command": "npx",
"args": ["-y", "@oka-core/reason"],
"env": { "OKA_API_KEY": "sk_..." }
}
}
}

Get your API key from app.oka.soSettings → API keys.

3. Record your first observation

Ask your agent:

Use the observe tool to record: “First Oka observation — testing the intelligence layer.”

Then query it back:

Use the context tool to check what we know so far.

4. What’s available

Oka exposes 19 MCP tools — 2 for auth, 7 for writing events, and 10 for querying intelligence. See MCP tools overview for the full list, or @oka-core/reason SDK reference for environment variables and configuration.