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.

コメント

「検索」の他のコンテンツ