Docs / Integrations
MCP

Use Prefsly with Kimi Code CLI

Use Kimi K3 in the terminal with one authorized Prefsly profile.

Set it up

  1. Install and start Kimi Code CLI, run /login to configure a model provider, then select K3 with /model if it is not already active.
  2. Create a profile token in Prefsly Connections, export it as PREFSLY_PROFILE_TOKEN, then create the mcp.json configuration below at ~/.kimi-code/mcp.json, or at .kimi-code/mcp.json to limit it to one project.

    Kimi Code MCP configuration

    export PREFSLY_PROFILE_TOKEN='your-profile-token'
    {"mcpServers":{"prefsly":{"url":"https://www.prefsly.io/mcp","bearerTokenEnvVar":"PREFSLY_PROFILE_TOKEN"}}}
  3. If you use the project-level configuration, approve Kimi's workspace trust prompt. Start a new Kimi Code session and run /mcp to confirm the connection. The configuration reads the token from the environment instead of storing it in mcp.json.
  4. Add the startup instruction below to ~/.kimi/AGENTS.md to apply it across projects.

    Startup instruction for ~/.kimi/AGENTS.md

    At the start of every new session, call the `prefsly` MCP tool `get_profile` and use its returned preferences throughout the session. If the call fails, tell me that prefsly.io preferences could not be loaded.
Good to know

This configuration uses a profile token, which keeps the secret out of mcp.json and works in SSH or headless sessions. Revoke it in Prefsly Connections to stop future reads.

Create and use a profile token

Update or disconnect

For copied prompts, copy a new prompt after edits. For MCP, your next tool call sees the saved revision. Revoke a connection from Prefsly Connections when you no longer want a client to retrieve the profile.

Official source

Kimi Code CLI MCP documentation ↗

Related Prefsly guides

Create and manage profilesMCP authentication optionsMCP troubleshootingPrivacy and sharing controls
Published by Prefsly · Last reviewed September 25, 2026 · All documentation