Connect Claude Desktop and claude.ai to Kojen
Add Kojen to Claude (Desktop and claude.ai) as a custom connector with OAuth sign-in, or through claude_desktop_config.json with mcp-remote, and run your agent training from chat.
- 1Open connectors. In Claude Desktop or claude.ai, open Customize → Connectors, click + Add and choose Add custom connector.
- 2Add Kojen. Name it Kojen, paste https://kojen.ai/api/mcp as the remote MCP server URL and click Continue. Keep the detected sign-in settings and click Add.
- 3Sign in. Claude opens the Kojen sign-in (or connect later from the connectors list); sign in and allow the connection.
- 4Use it. In a chat, click + → Connectors, turn Kojen on and ask Claude to work with your dojo.
Add Kojen as a custom connector
- Open Customize → Connectors in Claude Desktop or on claude.ai, click + Add and choose Add custom connector.
- Name it
Kojen, pastehttps://kojen.ai/api/mcpas the remote MCP server URL and click Continue. - Keep the sign-in settings Claude detects (Kojen uses OAuth) and click Add. Claude opens Kojen's sign-in page (or connect later from the connectors list); sign in (or create an account) and allow the connection.
- In a chat, click + → Connectors and turn Kojen on. Claude asks before it calls a tool.
A connector added on claude.ai is available in Claude Desktop too. On Team and Enterprise plans an Owner adds it under Organization settings → Connectors first, then each member connects and signs in. The connector's Request headers setting can send an Authorization: Bearer kojen_… header instead of OAuth, but sign-in is simpler and keeps the key off the organisation's settings.
Or through the config file
If you can't add custom connectors, run Kojen through the mcp-remote bridge (needs Node.js). Edit claude_desktop_config.json (Settings → Developer → Edit Config; on macOS it's in ~/Library/Application Support/Claude/, on Windows in %APPDATA%\Claude\) and restart Claude. mcp-remote handles the OAuth sign-in in your browser:
// claude_desktop_config.json
{
"mcpServers": {
"kojen": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://kojen.ai/api/mcp"]
}
}
}Or skip sign-in and pass an account key. mcp-remote expands ${KOJEN_AUTH} from env, and the header has no space after the colon because Claude Desktop on Windows (like Cursor) doesn't escape spaces inside args:
// claude_desktop_config.json
{
"mcpServers": {
"kojen": {
"command": "npx",
"args": [
"-y", "mcp-remote", "https://kojen.ai/api/mcp",
"--header", "Authorization:${KOJEN_AUTH}"
],
"env": { "KOJEN_AUTH": "Bearer kojen_…" }
}
}
}Sign-in, keys and scopes
- Kojen's MCP server is streamable HTTP at
https://kojen.ai/api/mcp. Clients that support MCP authorization need only that URL: they open a Kojen sign-in and ask you to allow the connection. Kojen is the OAuth authorization server, with discovery at/.well-known/oauth-protected-resource/api/mcp, dynamic client registration and Client ID Metadata Documents. - An OAuth connection gets the
readandwritescopes. Starting paid GPU runs or buying credits needs an API key with thebillingscope. - Clients without sign-in support send
Authorization: Bearer kojen_…: create a key under Settings → API Keys & MCP. Keys expire (90 days by default) and can be revoked any time. - Disconnect an OAuth client under Settings → Connected apps. Its tokens stop working at once.
- Paid or destructive tools (deploy_model, start_training_run, delete_record, …) need
confirmed: true, which the agent should only set after you approve that exact action.
Things to ask once it's connected
- “Summarise my Kojen workspace.” (get_workspace_summary)
- “Create a dataset from these 20 support tickets and tune a prompt that classifies them.” (create_dataset, train_model, wait_for_run)
- “Evaluate the tuned model and tell me its trust score.” (evaluate_model)
- “Red-team my support agent for prompt injection.” (run_simulation)
- “Deploy the best version and give me the endpoint URL.” (deploy_model, which asks you to confirm first)
The full tool list, with each tool's inputs, is on the developer docs.
Get an API key
Kojen is free to start, no card needed. Train and evaluate an agent, deploy it behind an OpenAI-compatible endpoint, and connect your tools over MCP.