MCP.so
登录

mcp-code-search-server

@fx-an

关于 mcp-code-search-server

一个MCP Server,帮助LLM查找相关代码在文件中的位置,支持返回完整的函数定义。

基本信息

分类

搜索

许可证

MIT license

运行时

node

传输方式

stdio

发布者

fx-an

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-code-search-server": {
      "command": "npx",
      "args": [
        "mcp-code-search-server"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is mcp-code-search-server?

mcp-code-search-server is an MCP (Model Context Protocol) server that helps large language models (LLMs) find the location of relevant code within files and supports returning complete function definitions. It uses ripgrep to search for identifiers (variables, functions, classes, etc.) in a codebase and returns their full definitions, not just references.

How to use mcp-code-search-server?

Install with npm install mcp-code-search-server or pnpm install mcp-code-search-server. Run as a CLI tool with npx mcp-code-search-server. It can be integrated as an MCP server in LLM tools by configuring a command that launches npx -y mcp-code-search-server over stdio.

Key features of mcp-code-search-server

  • Searches code identifiers using ripgrep
  • Supports JavaScript/TypeScript, Java, and Python parsing
  • Extracts complete variable, function, and class definitions
  • Automatically detects and handles multiple file encodings (UTF-8, GBK, Big5, etc.)
  • Smart default filtering excludes common non-code directories and file types

Use cases of mcp-code-search-server

  • An LLM needs to locate and understand a specific function implementation in a large codebase
  • A developer uses an LLM-based coding assistant to retrieve full class definitions during refactoring
  • An automated code review tool searches for all usages and definitions of a variable
  • A language model analyzes dependencies by retrieving complete definitions of imported symbols

FAQ from mcp-code-search-server

What does mcp-code-search-server do?

It helps LLMs find the exact location of code identifiers (e.g., function names, variables, classes) in files and returns the complete definition, not just the line where it appears.

What programming languages are supported?

JavaScript/TypeScript, Java, and Python are explicitly supported for code parsing.

How do I install mcp-code-search-server?

Use npm install mcp-code-search-server or pnpm install mcp-code-search-server. Then run it with npx mcp-code-search-server.

What transport protocol does mcp-code-search-server use?

It communicates with the LLM via the stdio interface following the Model Context Protocol.

Does mcp-code-search-server filter out non-code files?

Yes. It provides default configuration to exclude common non-code directories and file types, with smart filtering.

评论

搜索 分类下的更多 MCP 服务器