An MCP server for searching code identifiers and returning complete definitions

An MCP server for searching code identifiers and returning complete definitions

mcp-code-search-server•byfx-an

mcp-code-search-server is a Model Context Protocol server that provides code search for large language models, locating identifiers in codebases and returning their complete definitions rather than just reference locations.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Searches codebases for identifiers using ripgrep.
  • •Automatically identifies and extracts complete definitions of variables, functions, and classes.
  • •Detects and handles files in different encodings such as UTF-8, GBK, and Big5.
  • •Parses code in JavaScript/TypeScript, Java, and Python.

BEST FOR

  • •Helping an LLM understand a codebase's internal logic, data flow, and dependencies by retrieving full definitions and their context.
  • •Locating where relevant code lives within files for a large language model.

ABOUT MCP-CODE-SEARCH-SERVER

An MCP server for searching code identifiers and returning complete definitions is cataloged as an MCP server attributed to fx-an. mcp-code-search-server is a Model Context Protocol server that provides code search for large language models, locating identifiers in codebases and returning their complete definitions rather than just reference locations. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for An MCP server for searching code identifiers and returning complete definitions are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What does the search-files tool do?

The search-files tool searches for a code identifier and returns its complete definition.

How does an LLM communicate with the server?

The server is based on the MCP protocol and can be called as a Server; large language models communicate with it through the stdio interface.

Upstream README

View this exact version on GitHub

README.md · 47051cce2409 · Fetched 2026-11-13 13:50:05 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

mcp-code-search-server

一个MCP Server,帮助LLM查找相关代码在文件中的位置,支持返回完整的函数定义。 An MCP Server, which helps the LLM find the location of relevant code within files and supports returning the complete function definitions.

项目简介

mcp-code-search-server 是一个基于 Model Context Protocol (MCP) 实现的服务器,专为大语言模型(LLM)提供代码搜索功能。它能够帮助LLM精准定位代码库中的标识符(如变量、函数、类等),并返回其完整定义,而不仅仅是引用位置。通过获取完整的代码定义及其上下文,有助于LLM更好地理解代码的内部逻辑、数据流和依赖关系。

主要功能

  • 代码搜索:使用 ripgrep 高效搜索代码库中的标识符
  • 多语言支持:支持JavaScript/TypeScript、Java和Python的代码解析
  • 完整定义提取:自动识别并提取变量、函数、类等完整定义
  • 多编码支持:自动检测并处理不同编码的文件(UTF-8, GBK, Big5等)
  • 智能过滤:提供默认配置排除常见的非代码目录和文件类型

安装方法

# 使用npm安装
npm install mcp-code-search-server

# 或使用pnpm安装
pnpm install mcp-code-search-server

使用方法

作为命令行工具使用

npx mcp-code-search-server

在调试模式下使用

# 构建项目
npm run build

# 运行调试器
npm run debug

# 或者一步执行
npm run build-debug

在LLM工具中集成

本服务器基于MCP协议,可以作为Server被调用。大语言模型可以通过stdio接口与服务器通信。

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

API参数说明

search-files 工具

搜索代码标识符并返回其完整定义。

参数类型必填描述
querystring是要搜索的代码标识符(变量名、函数名、类名等)
cwdstring是要搜索的目录路径
filePatternstring否用于筛选文件的glob模式(例如:'*.ts')
excludePatternsstring[]否要从搜索中排除的文件模式数组
excludeDirsstring[]否要从搜索中排除的目录数组

支持的语言

  • JavaScript/TypeScript
  • Java
  • Python

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for An MCP server for searching code identifiers and returning complete definitions from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-code-search-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools