Skip to main content

Overview

Connect CodeAlive with Cursor IDE to enhance your AI-powered development experience. CodeAlive provides Cursor with deep contextual understanding of your entire codebase through the Model Context Protocol (MCP).
Quick install: Run npx @codealive/installer to automatically configure CodeAlive for Cursor. See the Installation Guide for details.
Cursor ships its own codebase_search and will prefer it by default. Connecting the MCP server is not enough — add a project rule so Cursor’s agent reaches for CodeAlive first. See CodeAlive vs Cursor’s built-in codebase search and the ready-made rule in Project Rules.
Working with 1C:Enterprise (BSL)? Also read CodeAlive & 1С — the term “metadata” needs explicit disambiguation in 1C projects.

Prerequisites

  • Cursor installed (latest version recommended)
  • CodeAlive account (Sign up here)
  • Indexed repositories in your CodeAlive dashboard

Connecting to CodeAlive

1

Open MCP settings

Open Cursor Settings:
  • macOS: Cmd+, or menu Cursor → Settings
  • Windows/Linux: Ctrl+, or File → Preferences → Settings
Then go to Tools & MCP in the left panel and click New MCP Server.
In older Cursor builds this panel was named Tools & Integrations.
2

Add the CodeAlive server

Cursor opens .cursor/mcp.json (project-level) or ~/.cursor/mcp.json (global) for editing. Paste this configuration:
Save the file.
Cursor detects the transport from the url field — Streamable HTTP first, with automatic SSE fallback.
Cursor supports OAuth for remote Streamable HTTP servers. Follow the browser sign-in prompt; in Cursor Agent you can start it explicitly with cursor-agent mcp login codealive.
3

Verify the connection

Back on Tools & MCP, authenticate when prompted. The codealive server should then show a green status dot.
4

Try it in chat

Open Cursor’s chat panel and try:
  • “What repositories are available in CodeAlive?”
  • “Search for authentication logic in my codebase”
  • “Explain the architecture of my project”
Cursor supports a deeplink that installs an MCP server in one click. Encode the CodeAlive config as base64 JSON and open this URL:
Generate BASE64_CONFIG from this JSON:
For example, on macOS / Linux:
Only follow MCP deeplinks from trusted sources — clicking installs and configures a server without further confirmation.
Cursor’s agent has a native codebase_search tool backed by a local index of the open workspace. It cannot be disabled in the default Agent mode (tool selection is only available in Custom Modes, and the built-in search has known quirks there), and without instructions the planner will use it for every exploration question — your connected CodeAlive server never gets called. The two tools are not equivalent: Since you cannot remove the built-in tool, the working approach is a precedence rule that names it explicitly. Vague phrasing (“prefer CodeAlive for search”) reliably loses to the planner’s default; naming codebase_search as the thing to avoid wins. That is what the rule below does.

Project Rules for CodeAlive

Project rules teach Cursor’s agent how to use CodeAlive. The legacy .cursorrules file is deprecated — use .cursor/rules/*.mdc (MDC format) instead. Cursor rules have four activation modes, controlled by the .mdc frontmatter: For a tool-precedence rule use Always — it must be active before the planner picks its first search tool, so an on-demand mode is too late. Keep it short for that same reason: always-on rules are injected into every request. Create .cursor/rules/codealive.mdc in your project:
See Instructing Coding Agents for the general patterns behind this rule (imperative + trigger, naming the built-in tool, sequencing) and a universal AGENTS.md variant that also covers teammates on other agents — Cursor’s CLI reads repo-root AGENTS.md too. Cursor rules reference: cursor.com/docs/context/rules.

Usage Patterns

Advanced Features

Multi-File Operations

Cursor can use CodeAlive to work across multiple files:

Project vs Global Configuration

Cursor reads MCP servers from two locations:
  • Project-level: .cursor/mcp.json at the workspace root — commit this so the whole team gets the server.
  • Global: ~/.cursor/mcp.json — applies to every project on your machine.
If both files define a server with the same name, the project-level entry wins.

Team Collaboration

Share the project-level config without exposing API keys:
  1. Commit .cursor/mcp.json referencing an environment variable:
  1. Each teammate exports their own key before launching Cursor:

Docker Alternative

Run the CodeAlive MCP server locally with Docker (stdio transport):

Productivity Tips

Slash Commands

Save recurring CodeAlive prompts as slash commands in .cursor/commands for one-tap reuse.

Beyond Context Windows

Use CodeAlive for codebases that exceed the model’s context limit — semantic search retrieves only the relevant slice.

Scoped Rules

Use globs in .cursor/rules/*.mdc to apply CodeAlive guidance only where it matters.

Team Standards

Share .cursor/rules/codealive.mdc via git to keep the whole team on the same workflow.

Troubleshooting

Solutions:
  1. Check the server status indicator in Settings → Tools & MCP (green = healthy, red = failed)
  2. Verify your API key is correct and active
  3. Reload Cursor: Cmd/Ctrl+Shift+P → "Developer: Reload Window"
  4. Check network connectivity to https://mcp.codealive.ai/api
Solutions:
  1. Ensure your repositories are fully indexed in the CodeAlive dashboard
  2. Wait for indexing to complete
  3. Verify the API key has access to the relevant repositories
  4. Check repository filters
Solutions:
  1. Use more specific queries
  2. Limit search to specific repositories
  3. Check indexing status in dashboard
  4. Consider the Docker option for lower-latency local-network deployments
For more solutions, see the Troubleshooting Guide.

Instruct Your Agent

Connecting CodeAlive makes its tools available, but the agent may still default to its built-in search. For reliable results, add a short instruction in the agent’s native format telling it to prefer semantic_search and grep_search when exploring indexed code. See Instructing Coding Agents.