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

@hayhandsome/code-index-mcp

v0.1.3

Published

MCP server for code indexing and semantic search

Readme

code-index-mcp

一个可通过 npx 运行的 MCP 服务器,为 AI 工具提供代码索引与语义搜索能力。每次调用会执行按需增量同步,保证结果最新。

运行要求

  • Node.js >= 18
  • Qdrant(默认 http://localhost:6333

快速开始

npx @hayhandsome/code-index-mcp

默认使用 stdio 传输,适配 MCP 客户端的子进程方式调用。

配置

全局配置(推荐)

目录:~/.code-index-mcp/

config.json(非敏感):

{
  "qdrantUrl": "http://localhost:6333",
  "embedderProvider": "openai",
  "modelId": "text-embedding-3-small",
  "modelDimension": 1536,
  "embeddingBatchSize": 60,
  "searchMinScore": 0.2,
  "searchMaxResults": 20,
  "timeoutMs": 300000,
  "openAiCompatibleBaseUrl": "http://localhost:1234",
  "ollamaBaseUrl": "http://localhost:11434"
}

secrets.json(敏感):

{
  "qdrantApiKey": "",
  "openAiApiKey": "",
  "openAiCompatibleApiKey": ""
}

Workspace 覆盖(可选)

目录:<workspace>/.code-index/

config.json / secrets.json 会覆盖全局配置。

环境变量(最高优先级)

  • CODE_INDEX_QDRANT_URL
  • CODE_INDEX_QDRANT_API_KEY
  • CODE_INDEX_EMBEDDER_PROVIDER
  • CODE_INDEX_MODEL_ID
  • CODE_INDEX_MODEL_DIMENSION
  • CODE_INDEX_EMBEDDING_BATCH_SIZE
  • CODE_INDEX_SEARCH_MIN_SCORE
  • CODE_INDEX_SEARCH_MAX_RESULTS
  • CODE_INDEX_TIMEOUT_MS
  • CODE_INDEX_OPENAI_API_KEY
  • CODE_INDEX_OPENAI_COMPATIBLE_API_KEY
  • CODE_INDEX_OPENAI_COMPATIBLE_BASE_URL
  • CODE_INDEX_OLLAMA_BASE_URL

MCP 工具

  • code_index_search:按需同步后搜索
  • code_index_update:执行一次增量同步
  • code_index_reindex:清空并重建索引
  • code_index_clear:清空向量与本地缓存
  • code_index_status:查看当前配置与索引状态

示例:搜索

{
  "tool": "code_index_search",
  "arguments": {
    "query": "How is the config loaded?",
    "workspacePath": "/path/to/repo"
  }
}

忽略规则

  • 自动读取 .gitignore
  • 如果存在 .rooignore,会在 .gitignore 基础上叠加

许可

MIT