npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

code-context-mcp-hologres

v0.1.9

Published

Model Context Protocol integration for Code Context Hologres

Readme

code-context-mcp-hologres

Model Context Protocol (MCP) integration for Code Context - A powerful MCP server that enables AI assistants and agents to index and search codebases using semantic search.

npm version npm downloads

Check out the main project README for an overview and setup instructions.

🚀 Use Code Context as MCP in Claude Code and others

Model Context Protocol (MCP) allows you to integrate Code Context with your favorite AI coding assistants, e.g. Claude Code.

Quick Start

Prerequisites

Before using the MCP server, make sure you have:

  • API key for your chosen embedding provider (OpenAI, VoyageAI, Gemini, Ollama, or DashScope setup)
  • Hologres vector database instance

💡 Setup Help: See the main project setup guide for detailed installation instructions.

Prepare Environment Variables

Embedding Provider Configuration

Code Context MCP supports multiple embedding providers. Choose the one that best fits your needs:

📋 Quick Reference: For a complete list of environment variables and their descriptions, see the Environment Variables Guide.

# Supported providers: OpenAI, VoyageAI, Gemini, Ollama, DashScope
EMBEDDING_PROVIDER=OpenAI
OPENAI_API_KEY=sk-your-openai-api-key
EMBEDDING_MODEL=text-embedding-3-small
OPENAI_BASE_URL=https://api.openai.com/v1

Available Models: See getSupportedModels in openai-embedding.ts for the full list.

VOYAGEAI_API_KEY=pa-your-voyageai-api-key
EMBEDDING_MODEL=voyage-code-3
GEMINI_API_KEY=your-gemini-api-key
EMBEDDING_MODEL=gemini-embedding-001
EMBEDDING_MODEL=nomic-embed-text
OLLAMA_HOST=http://127.0.0.1:11434
DASHSCOPE_API_KEY=sk-your-dashscope-api-key
EMBEDDING_MODEL=text-embedding-v4

Available Models: See getSupportedModels in dashscope-embedding.ts for the full list.

Hologres Vector Database Configuration

Configure your Hologres connection:

HOLOGRES_HOST=your-hologres-instance.hologres.aliyuncs.com
HOLOGRES_PORT=80
HOLOGRES_DATABASE=your-database-name
HOLOGRES_USER=your-access-id
HOLOGRES_PASSWORD=your-access-secret

Embedding Batch Size

EMBEDDING_BATCH_SIZE=512

Custom File Processing (Optional)

CUSTOM_EXTENSIONS=.vue,.svelte,.astro,.twig
CUSTOM_IGNORE_PATTERNS=temp/**,*.backup,private/**,uploads/**

Usage with MCP Clients

claude mcp add code-context-hologres -e OPENAI_API_KEY=your-openai-api-key -e HOLOGRES_HOST=your-hologres-host -e HOLOGRES_PORT=80 -e HOLOGRES_DATABASE=your-database-name -e HOLOGRES_USER=your-access-id -e HOLOGRES_PASSWORD=your-hologres-password -- npx code-context-mcp-hologres@latest
{
  "mcpServers": {
    "code-context-hologres": {
      "command": "npx",
      "args": ["-y", "code-context-mcp-hologres@latest"],
      "env": {
        "OPENAI_API_KEY": "your-openai-api-key",
        "HOLOGRES_HOST": "your-hologres-host",
        "HOLOGRES_PORT": "80",
        "HOLOGRES_DATABASE": "your-database-name",
        "HOLOGRES_USER": "your-access-id",
        "HOLOGRES_PASSWORD": "your-hologres-password"
      }
    }
  }
}
[mcp_servers.code-context-hologres]
command = "npx"
args = ["code-context-mcp-hologres@latest"]
env = { "OPENAI_API_KEY" = "your-openai-api-key", "HOLOGRES_HOST" = "your-hologres-host", "HOLOGRES_PORT" = "80", "HOLOGRES_DATABASE" = "your-database-name", "HOLOGRES_USER" = "your-access-id", "HOLOGRES_PASSWORD" = "your-hologres-password" }
startup_timeout_ms = 20000
"augment.advanced": { 
  "mcpServers": [ 
    { 
      "name": "code-context-hologres", 
      "command": "npx", 
      "args": ["-y", "code-context-mcp-hologres@latest"] 
    } 
  ] 
}

For LangChain/LangGraph integration examples, see this example.

npx code-context-mcp-hologres@latest

Features

  • 🔌 MCP Protocol Compliance: Full compatibility with MCP-enabled AI assistants and agents
  • 🔍 Hybrid Code Search: Natural language queries using advanced hybrid search (BM25 + dense vector)
  • 📁 Codebase Indexing: Index entire codebases for fast hybrid search
  • 🔄 Incremental Indexing: Efficiently re-index only changed files using Merkle trees
  • 🧩 Intelligent Code Chunking: AST-based code analysis for syntax-aware chunking
  • 🗄️ Scalable: Integrates with Hologres for scalable vector search
  • 🛠️ Customizable: Configure file extensions, ignore patterns, and embedding models
  • Real-time: Interactive indexing and searching with progress feedback

Available Tools

1. index_codebase

Index a codebase directory for hybrid search (BM25 + dense vector).

Parameters:

  • path (required): Absolute path to the codebase directory to index
  • force (optional): Force re-indexing (default: false)
  • splitter (optional): Code splitter - 'ast' or 'langchain' (default: "ast")
  • customExtensions (optional): Additional file extensions (default: [])
  • ignorePatterns (optional): Additional ignore patterns (default: [])

2. search_code

Search the indexed codebase using natural language queries.

Parameters:

  • path (required): Absolute path to the codebase directory
  • query (required): Natural language query
  • limit (optional): Maximum results (default: 10, max: 50)
  • extensionFilter (optional): File extension filter (default: [])

3. clear_index

Clear the search index for a specific codebase.

Parameters:

  • path (required): Absolute path to the codebase directory

4. get_indexing_status

Get the current indexing status of a codebase.

Parameters:

  • path (required): Absolute path to the codebase directory

Contributing

This package is part of the Code Context monorepo. Please see:

Related Projects

License

MIT - See LICENSE for details