> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memanto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Kimi Code

> Give Kimi Code persistent, cross-session memory with Memanto — via the CLI connector or as an MCP server.

# Kimi Code + Memanto

![Kimi Code](https://mintcdn.com/memanto/F2nSuqyNs_8EzXcO/logo/integrations/kimi.svg?fit=max\&auto=format\&n=F2nSuqyNs_8EzXcO\&q=85\&s=ed429ea8b3c74746ba23d858583cb658)

Connect [Kimi Code](https://www.kimi.com/code/) to Memanto so it can store facts, decisions, and preferences and recall them across sessions.

## Connect via CLI (recommended)

```bash theme={null}
memanto connect kimi-code
```

This installs a Kimi Code instruction section into `AGENTS.md` and registers the memanto MCP server in `.kimi-code/mcp.json` (see [MCP server setup](https://docs.memanto.ai/cli/connect/connect.md#mcp-server-setup)). If `memanto-mcp` isn't installed, you get the `memanto-memory` skill in `.kimi-code/skills/memanto/` instead. (You can also use the standalone `kimicode-memanto` package via `pip install kimicode-memanto && kimicode-memanto install`.) Add `--global` to install to `~/.kimi-code/` (or `$KIMI_CODE_HOME`) for every project:

```bash theme={null}
memanto connect kimi-code --global
```

The connector also writes `SessionStart`, `PreCompact`, and `PostToolUse` hooks plus the `mcp__memanto__*` permission rule into a managed section of `~/.kimi-code/config.toml`, so [`memanto memory sync`](https://docs.memanto.ai/cli/data/sync) refreshes the memories in `AGENTS.md` when a session starts and again before context is compacted.

## Connect via MCP

`memanto connect kimi-code` already registers the MCP server when `memanto-mcp` is installed. To configure it by hand instead, edit `~/.kimi-code/mcp.json` (per-user) or `.kimi-code/mcp.json` (per-project):

```json theme={null}
{
  "mcpServers": {
    "memanto": {
      "command": "memanto-mcp",
      "env": {
        "MOORCHEH_API_KEY": "mch_xxxxxxxxxxxxxxxxxx",
        "MEMANTO_DEFAULT_AGENT_ID": "kimi-workspace"
      }
    }
  }
}
```

Restart Kimi Code (or run `/mcp` in the TUI) and confirm `memanto` shows up with **7 tools**. See the [MCP integration guide](https://docs.memanto.ai/integrations/mcp.md) for the full server reference.

## Next Steps

* [CLI: connect command](https://docs.memanto.ai/cli/connect/connect.md)
* [MCP Integration](https://docs.memanto.ai/integrations/mcp.md)
* [Memory Types Reference](https://docs.memanto.ai/reference/memory-types.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.