npm install -g @ulpi/codemap

Code intelligence
for any codebase

Hybrid vector + BM25 semantic search, dependency analysis, and PageRank — as a CLI or MCP server for AI agents.

# Quick start
$ npm install -g @ulpi/codemap
$ codemap init # Choose provider + model
$ codemap index # Index your project
$ codemap search "authentication middleware"

Features

Everything you need to understand, navigate, and search your codebase.

Hybrid Search

Search

Combines vector similarity with BM25 keyword scoring for accurate, context-aware code search across your entire project.

Example
$ codemap search "auth middleware"
Key capabilities
Vector similarity scoring
BM25 keyword matching
Symbol name boosting
Graph rank integration
Configurable result limits

MCP Integration

codemap serve starts an MCP server exposing 12 code intelligence tools to any compatible AI agent or editor.

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "codemap": {
      "command": "codemap",
      "args": ["serve"]
    }
  }
}

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "codemap": {
      "command": "codemap",
      "args": ["serve"],
      "type": "stdio"
    }
  }
}

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "codemap": {
      "command": "codemap",
      "args": ["serve"]
    }
  }
}

Add to .kiro/settings/mcp.json in your project root:

{
  "mcpServers": {
    "codemap": {
      "command": "codemap",
      "args": ["serve"]
    }
  }
}

Add to .vscode/mcp.json in your project root:

{
  "servers": {
    "codemap": {
      "command": "codemap",
      "args": ["serve"],
      "type": "stdio"
    }
  }
}

Settings > Tools > AI Assistant > MCP Servers:

{
  "mcpServers": {
    "codemap": {
      "command": "codemap",
      "args": ["serve"]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "codemap": {
      "command": "codemap",
      "args": ["serve"]
    }
  }
}

Add to ~/.config/zed/settings.json:

{
  "context_servers": {
    "codemap": {
      "command": {
        "path": "codemap",
        "args": ["serve"]
      }
    }
  }
}

12 MCP Tools

search_code

Search

Search code using hybrid vector + BM25 scoring. Returns ranked results with file paths, line numbers, and matching snippets.

Parameters
{"query": "authentication middleware", "limit": 10}
Capabilities
Natural language queries
Hybrid vector + BM25
Configurable result limit
Project directory override
Ranked by relevance

Embedding Providers

Choose the provider that fits your needs. Switch anytime.

Provider Models Cost Requires
ULPI Cloud Default qwen3-embedding:4b (2048d) Managed ULPI_API_KEY
Ollama nomic-embed-text mxbai-embed-large all-minilm Free Ollama running locally
OpenAI text-embedding-3-small text-embedding-3-large Paid OPENAI_API_KEY

CLI Commands

Full command reference. All commands support --cwd, --json, and --help.

codemap init

Interactive first-time setup — provider, model, API key

codemap index

Index the current project for code search

codemap search <query>

Search code with hybrid vector + BM25 scoring

codemap symbols <query>

Find functions, classes, and types by name

codemap status

Show index statistics for the current project

codemap watch

Watch for file changes and re-index in real-time

codemap deps <file>

Show files this file depends on

codemap dependents <file>

Show files that depend on this file

codemap rank [file]

Show PageRank importance scores

codemap cycles

Detect circular dependencies

codemap config

Get, set, or list configuration values

codemap serve

Start MCP server over stdio

Get started in seconds

$ npm install -g @ulpi/codemap