Skip to content

Kimi Code

Membase in the Kimi Code CLI over Streamable HTTP, with OAuth consent or a developer key in the header, and the skill.

Kimi Code CLI connects to remote MCP servers over Streamable HTTP, and reads pages and runs commands, so it can take the skill as well.

  • Kimi Code CLI. It has no kimi mcp command: MCP servers are declared in mcp.json, or added with /mcp-config inside a session.
  • For a key in the configuration or the skill, a developer key from Connect › Developer keys › Create key.

Add the server to ~/.kimi-code/mcp.json for every project, or to .kimi-code/mcp.json in one project:

{ "mcpServers": { "membase": { "url": "https://api.app.membase.com/mcp-http" } } }

/mcp-config in a session adds the same entry without editing the file. A server added while a session is open joins only the sessions started after it (one enabled through /plugins joins open sessions at once). In a new session run:

/mcp-config login membase

The browser opens Membase’s consent screen. Choose the access level, the Memories Kimi Code may use and whether it may read Your profile, then press Approve access. If Kimi Code asked only to read, Read is the only level offered. /mcp shows the server’s connection status. Kimi Code has no setup card of its own on Connect: once you approve, it is listed on the AI apps tab under the name it registered.

Name an environment variable that holds the key, instead of logging in:

{ "mcpServers": { "membase": {
"url": "https://api.app.membase.com/mcp-http",
"bearerTokenEnvVar": "MEMBASE_API_KEY" } } }

and export MEMBASE_API_KEY=mbk_… in the shell that starts Kimi Code. A static "headers": { "Authorization": "Bearer mbk_…" } works too; keep a file that holds a key out of version control. The key’s level applies, up to Full. The skill sentence from Connect › Developer keys › Use a key › Skill works as well: Kimi Code installs the folder and keeps the key as MEMBASE_API_KEY.

What its access level allows, the same with consent or a key: Read, Read & write or Full. The tools per level are on Any MCP client.

An empty list of memories means no Memory is switched on for this connection. Switch one on under Memories it can use on Kimi Code’s page in Connect (its row on the AI apps tab), or under Use in on the Memory.

Delete the membase entry from mcp.json, or remove it with /mcp-config; sessions already open list it as removed until they end. Then Revoke… Kimi Code’s connection, or the key, on its page in Connect. A consent token Kimi Code still holds stops working once you revoke it.

It says What it means Do
Membase’s tools ask you to authorize, or fail before you have logged in consent not completed /mcp-config login membase
/mcp does not list Membase the entry was added while this session was open start a new session
it can use no memories connected, no Memory switched on Memories it can use on Kimi Code’s page in Connect
a write is refused the connection or key is at Read raise it to Read & write under Access on its page
/mcp shows Membase as failed with a key MEMBASE_API_KEY is not set in Kimi Code’s environment, or the key is unknown, expired or revoked: the server answers 401 invalid_token, and Kimi Code does not retry rejected credentials set the variable; or create a new key, update MEMBASE_API_KEY (or the header) and start a new session