Connect the MCP server
Sensei hosts the MCP server, so there is nothing to install or keep running. Add this URL to your client. The first time your client calls Sensei, it opens your browser so you can sign in and allow the app.
https://app.kosuke.ai/api/mcp
Run this once:
claude mcp add --transport http kosuke https://app.kosuke.ai/api/mcp
Start Claude Code and type /mcp to sign in. The list then shows kosuke as connected.
Run:
codex mcp add kosuke --url https://app.kosuke.ai/api/mcp
codex mcp login kosuke
To check it, run codex mcp list. It shows kosuke with its URL.
- Open Settings, then Connectors, then Add custom connector.
- Name it
Senseiand pastehttps://app.kosuke.ai/api/mcpas the URL. - Connect it, and sign in when Sensei asks.
Any MCP client that supports Streamable HTTP and OAuth needs only the URL. It opens your browser to sign in at the first call.
In ChatGPT, open Settings, then Developer mode, then Add server, and paste https://app.kosuke.ai/api/mcp as the URL.
Connect your coding agent covers the consent screen, the toolsets and the options you can add to the URL.
Install the CLI
You need Node.js 22.18 or later.
npm install -g @kosuke-ai/kosuke
kosuke auth login
kosuke auth login asks for an API key, created as below, and keeps what you type hidden. Sensei checks the key and saves it. In CI or any script that runs without a person, skip the login and set the KOSUKE_API_KEY environment variable instead. See Sensei CLI.
Create an API key
The CLI, a script and an MCP client with no browser sign in with an API key.
- In the web app, open Settings > You > API keys.
- Type a name for the key, such as
laptop-cli. - Under Access, tick Tasks and sessions.
- Pick an end date: 30 days, 90 days or 1 year.
- Press Create API key.
- Press Copy. Sensei shows the key only once.
Export it:
export KOSUKE_API_KEY=kosuke_...
The CLI reads the same variable. An MCP client with no browser sends the key as a bearer token:
Authorization: Bearer kosuke_...
Each tool call is checked against the key's access, so a tool outside it is refused with 403 API_KEY_SCOPE. Without a browser shows the key on the Claude Messages API and the OpenAI Responses API, and Authentication says what a key can reach.
Paste this into your agent
Read https://kosuke.ai/llms.txt, then connect to Kosuke for me.
1. Add the MCP server https://app.kosuke.ai/api/mcp and sign me in when the browser opens.
2. If you cannot open a browser, send the API key in KOSUKE_API_KEY as a bearer token, or install the CLI with npm install -g @kosuke-ai/kosuke, which reads the same variable.
3. Follow the rules in https://kosuke.ai/docs/api/build-an-agent.md: follow every turn to its end, answer the agent's questions, and stop when I or the credit limit stop you.What your agent should know
- Follow each turn to its end, answer the agent's Clarifications, and stop when a person or the credit limit stops you. See Build an agent on Sensei.
- The API is described by an OpenAPI 3.1 document at
https://app.kosuke.ai/api/openapi.json, which needs no API key. - Every docs page has a Markdown copy, and
https://kosuke.ai/llms.txtlists them all.