mcp-code-search-server
@fx-an
About mcp-code-search-server
一个MCP Server,帮助LLM查找相关代码在文件中的位置,支持返回完整的函数定义。
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-code-search-server": {
"command": "npx",
"args": [
"mcp-code-search-server"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
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.
More Search MCP servers
Tavily Mcp
tavily-aiProduction ready MCP server with real-time search, extract, map & crawl.
MCP SearXNG Enhanced Server
OvertliDSEnhanced MCP server for SearXNG: category-aware web-search, web-scraping, and date/time retrieval.
Baidu AI Search
baidubceappbuilder-sdk, 千帆AppBuilder-SDK帮助开发者灵活、快速的搭建AI原生应用
DuckDuckGo Search MCP Server
nickclydeA Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
Version 2.0 is here!!
mixelpixxMCP Server built for use with Claude Code, Claude Desktop, VS Code, Cline - enable google search and ability to follow links and research websites
Comments