LIVE DEMO → Home Product
Features Use Cases Compare Enterprise
Docs
Documentation Quickstart MCP Server Integrations
Pricing Blog DASHBOARD → LOG IN →
Tutorial MCP Kilo Code May 4, 2026 · 7 min read

Persistent Memory for
Kilo Code via MCP

Kilo Code is an open-source VS Code AI extension that gives you a fully autonomous coding agent inside your editor. Like all AI coding tools, it has no memory between sessions. This guide shows you how to connect the Kronvex MCP server to Kilo Code — so your agent remembers architectural decisions, coding patterns, and debugging history across every workspace.

In this article
  1. What is Kilo Code?
  2. Why session memory matters for AI coding agents
  3. Prerequisites
  4. Configure the Kronvex MCP server in Kilo Code
  5. Verify the connection
  6. Using memory in your coding sessions
  7. Per-workspace memory configuration
  8. Use cases for persistent project memory
  9. Tips and best practices

What is Kilo Code?

Kilo Code (available on the VS Code Marketplace) is an open-source alternative to Cline and GitHub Copilot Chat. It provides a fully autonomous coding agent that can read files, edit code, run terminal commands, and browse documentation — all from within VS Code. It supports multiple AI backends (OpenAI, Anthropic Claude, Gemini, local Ollama models) and has native support for the Model Context Protocol (MCP).

MCP is an open standard developed by Anthropic that allows AI tools to connect to external servers providing tools, resources, and prompts. When you configure an MCP server in Kilo Code, its tools become available to the AI agent as native capabilities — the agent can call them just like it calls built-in VS Code functions.

Kilo Code vs Cline: Kilo Code is a fork of Cline with additional features including enhanced task management, improved context handling, and a more configurable agent loop. Both share the same MCP configuration format — if you've configured MCP servers in Cline before, the Kronvex config below will work identically.

Why session memory matters for AI coding agents

AI coding agents are most powerful when they have context about the project they're working on. But every Kilo Code session starts from scratch. The agent has to re-learn from the codebase on every task: what patterns are used, what's been tried before, what architectural decisions have been made.

Common symptoms of missing memory:

With Kronvex connected via MCP, Kilo Code can call remember, recall, and inject_context tools natively. The agent decides when to save and retrieve memories — just like a senior developer keeps mental notes of past decisions.

Prerequisites

Configure the Kronvex MCP server in Kilo Code

Kilo Code stores MCP server configuration in its VS Code settings. Open your settings with Cmd/Ctrl + Shift + P → Preferences: Open User Settings (JSON) and add the Kronvex MCP server:

VS Code settings.json — Kilo Code MCP configuration
{
  "kilocode.mcpServers": {
    "kronvex": {
      "command": "npx",
      "args": ["-y", "@kronvex/mcp-server"],
      "env": {
        "KRONVEX_API_KEY": "kv-your-api-key-here",
        "KRONVEX_AGENT_ID": "your-agent-uuid-here"
      }
    }
  }
}

Alternatively, you can configure MCP servers directly from the Kilo Code panel in VS Code. Click the MCP Servers tab in the Kilo Code sidebar, then click Add MCP Server and paste the following JSON:

MCP server definition (Kilo Code UI)
{
  "command": "npx",
  "args": ["-y", "@kronvex/mcp-server"],
  "env": {
    "KRONVEX_API_KEY": "kv-your-api-key-here",
    "KRONVEX_AGENT_ID": "your-agent-uuid-here"
  }
}
Using environment variables instead of hardcoding keys: For a more secure setup, replace the string values with references to your shell environment variables. In VS Code on macOS/Linux, launch VS Code from a terminal that already has KRONVEX_API_KEY and KRONVEX_AGENT_ID set, then use "${env:KRONVEX_API_KEY}" syntax in the JSON.

Verify the connection

After saving the configuration, reload the Kilo Code MCP servers (click the refresh icon in the MCP Servers panel, or restart VS Code). You should see kronvex listed as a connected server with a green indicator and the following tools available:

To confirm, type in the Kilo Code chat: "Use Kronvex to recall anything you know about this project." The agent will call kronvex_recall with a broad query and return any existing memories. On a fresh setup, the response will be empty — that's expected.

Using memory in your coding sessions

Letting the agent manage memory automatically

The simplest approach is to include a memory instruction in your Kilo Code system prompt (Settings → Custom Instructions). This tells the agent to use Kronvex proactively:

Kilo Code — Custom Instructions (Kronvex memory)
You have access to persistent memory via the Kronvex MCP tools.

At the start of each task:
- Call kronvex_inject_context with the task description to retrieve relevant past context
- Reference this context when making decisions

During and after tasks:
- Call kronvex_remember to store significant decisions, discoveries, or patterns
- Use memory_type="semantic" for facts and decisions
- Use memory_type="procedural" for coding patterns and best practices
- Use memory_type="episodic" for things that happened (bugs found, PRs merged, etc.)
- Always include session_id="{{ workspace_name }}" to scope memories to this project

Never store sensitive data (tokens, passwords, personal information) in memory.

Manually triggering memory operations

You can also trigger memory operations directly in the chat:

The agent will translate these natural language requests into the appropriate MCP tool calls automatically.

Per-workspace memory configuration

For teams with multiple projects, it's important to scope memories correctly. The cleanest pattern is one Kronvex agent per project, configured at the workspace level in VS Code's .vscode/settings.json:

.vscode/settings.json (workspace-level override)
{
  "kilocode.mcpServers": {
    "kronvex": {
      "command": "npx",
      "args": ["-y", "@kronvex/mcp-server"],
      "env": {
        "KRONVEX_API_KEY": "kv-your-api-key-here",
        "KRONVEX_AGENT_ID": "project-specific-agent-uuid",
        "KRONVEX_DEFAULT_SESSION": "myapp-frontend"
      }
    }
  }
}

The KRONVEX_DEFAULT_SESSION environment variable pre-fills the session_id parameter in all memory calls, so memories are automatically scoped to the current project without needing to specify it manually.

Team setup: Multiple developers can share the same agent and API key. All memories created by any team member are visible to all others — building a shared knowledge base. If you need per-developer isolation, create separate agents and distribute individual API keys.

Use cases for persistent project memory

Onboarding new developers

When a new developer joins the team and opens the project in VS Code with Kilo Code, they immediately have access to months of engineering decisions. Instead of reading through 200 PRs and Confluence pages, they can ask Kilo Code natural language questions and get answers grounded in the project's actual history.

Long-running feature development

When you're building a complex feature over several weeks, Kilo Code can maintain a memory of the sub-decisions made along the way. "We used optimistic updates here because the API latency was 400ms on 3G" — that's the kind of context that's easy to forget and expensive to rediscover when reviewing code six months later.

Recurring bug patterns

Store root causes of bugs as procedural memories. When a similar symptom appears, Kilo Code can recall the previous root cause and suggest starting the investigation there. Pattern: "Race condition in the useEffect cleanup — always check if the component is still mounted before setting state."

Code review context

Before a code review session, ask Kilo Code to recall what the PR is supposed to accomplish and any related past decisions. The agent can surface relevant context ("we decided against this approach in March because of X") that makes code review more informed.

Tips and best practices

Write memories like documentation

A good memory is specific, self-contained, and includes the why. "Changed API base URL to api.v2.myapp.com — old endpoint deprecated 2026-04-01, see migration guide in /docs/api-migration.md" is far more useful than "updated API URL." The Kronvex semantic search will surface it even if future queries use different words like "endpoint change" or "base URL update."

Use TTL for temporary context

Add ttl_days to memories that are only relevant for a limited time — sprint-specific decisions, temporary workarounds, debugging notes. A memory about "disabling email sending in dev until 2026-05-15" should expire automatically, not clutter your memory store permanently.

Give Kilo Code the memory it deserves

Free plan — 500 memories, 3 agents. No credit card. Connect in under 3 minutes.

Get your free API key →

Or read the full Kilo Code integration docs

Integration guide
Kilo Code Persistent Memory — Setup Guide
Step-by-step setup · code snippets · 2 min
Read the guide →
Related articles
Free demo key
Try Kronvex free
Get a demo API key instantly. No credit card required.