Skip to main content
Glama
suyu-creator

github-code-rag-mcp

한 문장으로

AI가 GitHub 저장소를 실시간으로 검색할 수 있게 해주는 MCP 서버입니다. 인증 코드를 작성 중? 먼저 검색하세요. 미들웨어를 작성 중? 먼저 검색하세요. 결제 연동을 작성 중? 먼저 검색하세요. AI가 코드를 작성하기 전에 GitHub에서 최고의 프로젝트를 찾습니다 — 바퀴를 다시 발명하지 않습니다. 또한 AI가 답변 전에 조사하도록 하는 "요구사항 분석 에이전트" 방법론이 포함되어 있어 추측하지 않습니다.

핵심 기능

  • 실시간 GitHub 저장소 검색 — 스타 순으로 정렬, 언어 및 스타 수로 필터링 가능.

  • 모든 저장소에서 파일 읽기read_github_file이 자동 소스 표시와 함께 파일 내용을 가져옵니다.

  • 이중 채널 폴백 — GitHub Search API를 먼저 사용; 속도 제한 시 공식 검색 페이지(무료, 무제한)로 자동 전환.

  • 보너스: 요구사항 분석 에이전트 — 시스템 프롬프트에 워크플로가 하드코딩되어 AI가 요구사항 명확성을 판단하고, 먼저 검색하고, 결론 전에 한 번에 하나의 질문을 합니다.

  • git clone 없음 · 의존성 1개 — 모두 GitHub REST API를 통해; 런타임에는 mcp>=1.0만; 1초 이내 시작.

도구

도구

설명

search_github

GitHub 공식 API 저장소 검색, 스타 순 정렬

web_search_github

GitHub 공식 검색 페이지 폴백, 무료 무제한 할당량

read_github_file

저장소에서 파일 내용 읽기, 소스 표시 포함

개발

git clone https://github.com/suyu-creator/github-code-rag-mcp.git
cd github-code-rag-mcp
uv sync
uv run --with pytest pytest
uv run github-code-rag

환경 변수:

GITHUB_TOKEN=ghp_xxx           # GitHub API Token (recommended)

기여하기

  • 버그 발견 → Issue 제기

  • 새로운 아이디어 → 먼저 Issue로 논의

  • 코드 기여 → Fork + PR

  • 유용하다고 생각되면 → star를 눌러 더 많은 사람들이 볼 수 있게 하세요


Related MCP server: MCP Code Intelligence

한국어


한 문장 소개

AI가 GitHub 저장소를 실시간으로 검색하게 해주는 MCP 서버입니다. 인증 작성? 검색하세요. 미들웨어 작성? 검색하세요. 결제 작성? 검색하세요. AI가 코드 한 줄을 작성하기 전에 GitHub에서 최고의 프로젝트를 찾아 참고합니다. 처음부터 바퀴를 만들지 마세요. 또한 '요구사항 분석 에이전트' 방법론이 내장되어 AI가 먼저 조사한 후 작업을 시작하며, 추측하지 않습니다.


핵심 기능

🔥 GitHub 저장소 실시간 검색 + 코드 읽기

스타 순으로 정렬하여 가장 성숙한 프로젝트를 우선 선택합니다. 언어, 스타 수로 필터링 지원(예: python stars:>1000). 저장소를 선택한 후 read_github_file로 핵심 파일을 읽어 구현 아이디어를 직접 참고하고, 출처가 자동으로 표시됩니다.

用户:帮我找个 FastAPI 数据库连接的开源项目
    ↓
AI:search_github("fastapi sqlalchemy database stars:>1000")
    ↓
AI:我找到了这些高 star 项目:
  1. tiangolo/fastapi — Python | ⭐ 80000 | FastAPI framework
  2. sqlalchemy/sqlalchemy — Python | ⭐ 10000 | The Python SQL Toolkit
  ...
↓
AI:read_github_file("tiangolo/fastapi", "docs_src/sql_app/main.py")
    ↓
AI:我参考了 FastAPI 官方示例,给你写好了:

# Source: tiangolo/fastapi/docs_src/sql_app/main.py
from sqlalchemy import create_engine
...

🔄 GitHub API + 공식 검색 페이지 이중 폴백, 속도 제한 걱정 없음

  • GitHub Search API: 최고 품질, 스타 순 정렬(시간당 60회 무료, Token 사용 시 시간당 5000회)

  • GitHub 공식 검색 페이지 폴백: 무료 무제한 할당량, 속도 제한 시 자동 전환

  • git clone 없음: 모두 REST API를 통해, 로컬 디스크 차지하지 않음

🧠 보너스: 요구사항 분석 에이전트 — 먼저 조사한 후 작업

시스템 프롬프트에 워크플로가 하드코딩되어 AI가 바로 추측해서 작성하지 않습니다. 요구사항이 명확한지 먼저 판단하고, 유사 프로젝트를 검색하고, 실제 프로젝트를 기반으로 요구사항을 되묻고, 확인이 끝난 후에야 결론을 내립니다.

⚡ git clone 없음 · 의존성 1개만

  • 모두 GitHub REST API를 통해, 저장소 clone 불필요

  • 런타임에는 mcp>=1.0만 의존, 나머지는 모두 Python 표준 라이브러리

  • 시작 < 1초, 메모리 < 50MB


빠른 시작

1. 설치

# 推荐:pipx 一键安装(隔离环境)
pipx install github-code-rag

# 或者 uv
uv tool install github-code-rag

# 或者 pip
pip install github-code-rag

2. Token 설정(선택이지만 권장)

export GITHUB_TOKEN=ghp_your_token_here

Token 없이도 사용 가능 — GitHub 공식 검색 페이지 폴백이 내장되어 있어 무료 무제한 할당량을 제공합니다. Token이 있으면 GitHub API 할당량이 시간당 60회 → 5000회로 증가합니다.

3. AI 클라이언트에 설정

아래의 '클라이언트 설정' 섹션을 참조하세요.

4. 이렇게 시도해보세요

설치 후 AI에게 말해보세요:

"React 관리 백엔드 오픈소스 프로젝트를 찾아줘, 먼저 GitHub에서 검색해봐"

AI가 먼저 GitHub를 검색한 후, 검색된 프로젝트를 기반으로 추천하는지 확인해보세요.


클라이언트 설정

아래 설정은 모두 stdio 모드입니다. 설정 완료 후 클라이언트를 재시작하면 사용할 수 있습니다. 설치 경로를 모르시나요? which github-code-rag(macOS/Linux) 또는 where github-code-rag(Windows)를 실행하여 확인하세요.

Claude Code

~/.claude.json을 편집하고 추가하세요:

{
  "mcpServers": {
    "github-code-rag": {
      "command": "github-code-rag",
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Claude Desktop

설정 → Developer → Edit Config를 열고 추가하세요:

{
  "mcpServers": {
    "github-code-rag": {
      "command": "github-code-rag"
    }
  }
}
  • macOS 설정 파일 경로: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows 설정 파일 경로: %APPDATA%\Claude\claude_desktop_config.json

Cursor

프로젝트 수준 설정(현재 프로젝트만): 프로젝트 루트에 .cursor/mcp.json 생성:

{
  "mcpServers": {
    "github-code-rag": {
      "command": "github-code-rag"
    }
  }
}

전역 설정: 설정 → MCP → Add new server → Stdio → github-code-rag 입력

Codex CLI

~/.codex/config.toml을 편집하고 추가하세요:

[mcp_servers.github-code-rag]
command = "github-code-rag"

MCP 프로토콜을 지원하는 모든 클라이언트에서 사용할 수 있습니다. 사용 중인 클라이언트가 위 목록에 없어도 설정 방식은 기본적으로 동일합니다 — command를 github-code-rag로 지정하면 됩니다.


도구 목록

도구

설명

search_github

GitHub 공식 API 저장소 검색, 스타 순 정렬

web_search_github

GitHub 공식 검색 페이지 폴백, 무료 무제한 할당량

read_github_file

저장소 파일 내용 읽기, 출처 자동 표시


작동 원리

┌───────────────────────────────────────────────────────────┐
│                    你的 AI 客户端                         │
│  (Claude Code / Cursor / Codex / Claude Desktop / ...)   │
└───────────────────────────┬───────────────────────────────┘
                            │ MCP protocol (stdio)
┌───────────────────────────▼───────────────────────────────┐
│                                                           │
│  ┌─────────────────────────────────────────────────┐     │
│  │  系统提示词(需求分析 Agent 方法论)             │     │
│  │    · 先判断需求清晰度 · 先搜再问                 │     │
│  └───────────────────────┬─────────────────────────┘     │
│                          │ 指导 AI 怎么用工具             │
│  ┌───────────────────────▼─────────────────────────┐     │
│  │  3 个 MCP 工具                                   │     │
│  │  search_github / web_search_github / read_file  │     │
│  └───────────┬───────────────────────────┬─────────┘     │
│              │                           │               │
│ ┌────────────▼───────────┐   ┌───────────▼──────────┐    │
│ │  GitHub Search API     │   │  GitHub 官方搜索页    │    │
│ │  按 star 排序           │   │  免费无限兜底         │    │
│ │  零 git clone          │   │                      │    │
│ └────────────────────────┘   └──────────────────────┘    │
│                                                           │
└───────────────────────────────────────────────────────────┘

프로젝트 구조

├── server/
│   ├── mcp_server.py          # MCP 服务器 + 系统提示词(3 个工具)
│   └── __main__.py
├── github/
│   └── connector.py           # GitHub API 封装(纯 urllib,零依赖)
├── core/
│   └── models.py              # 数据模型
├── tests/
│   └── test_search.py         # 两个搜索工具的测试
├── .well-known/mcp.json       # SSE 模式配置
└── pyproject.toml

개발

# 克隆
git clone https://github.com/suyu-creator/github-code-rag-mcp.git
cd github-code-rag-mcp

# 安装依赖
uv sync

# 运行测试
uv run --with pytest pytest

# 手动启动(stdio 模式)
uv run github-code-rag

환경 변수:

GITHUB_TOKEN=ghp_xxx           # GitHub API Token(推荐)

FAQ

어떤 MCP 클라이언트를 지원하나요?

MCP 프로토콜을 지원하는 모든 클라이언트 — Claude Code, Claude Desktop, Cursor, Windsurf, Cline, Codex, Gemini CLI, OpenCode… MCP 서버를 설정할 수 있으면 사용할 수 있습니다.

제 코드가 업로드되나요?

아니요. 이 도구는 저장소 검색만 수행하며, GitHub API는 공개 저장소 메타데이터 조회에만 사용됩니다. 코드가 외부로 전송되지 않습니다.

왜 gh CLI를 직접 사용하지 않나요?

MCP 도구는 AI에게 투명해야 하기 때문입니다 — AI는 어떤 CLI가 설치되어 있는지 알 필요 없이 도구를 호출하기만 하면 됩니다. 또한 순수 Python 구현으로 시스템 의존성이 없습니다.

GitHub API 속도 제한이 걸리면 어떻게 하나요?

GitHub 공식 검색 페이지로 자동 전환되며, 무료 무제한 할당량으로 추가 설정이 필요 없습니다.


Available Tools

9 tools
db_cleanupA

整理数据库表,清理不需要的历史数据。

当 db_inspect 发现数据太多或过时了,用这个工具清理。

Args: action: 操作类型 - "stats" 查看各表数据量(默认) - "purge_category" 删除指定类别的搜索历史(需传 category) - "purge_repo" 删除指定仓库的所有数据(需传 repo,格式 owner/repo) - "purge_all" 清空所有数据(慎重!) - "vacuum" 压缩数据库,回收空间 repo: 仓库名,格式 "owner/repo",配合 action="purge_repo" 使用 category: 类别名,配合 action="purge_category" 使用

ParametersJSON Schema
NameRequiredDescriptionDefault
repoNo
actionNo
categoryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so description carries the burden. It discloses destructive actions (purge_all with warning '慎重') and vacuum behavior, but does not mention reversibility, permissions, error handling, or return format. Adequate but not deep.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Structured with a brief overview followed by a bulleted list of parameters. Each line is purposeful, no redundancy, and front-loaded with the main purpose. Fits within a reasonable length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given multiple actions and dependencies, description covers the main functionality well. Has output schema so return details are not required. Missing edge cases like validation, partial failures, but overall complete enough for a cleanup tool with no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage and only default values, but the description provides detailed explanations for all parameters including valid action values and their prerequisites (category for purge_category, repo for purge_repo). Fully compensates for schema gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool cleans up database tables and lists specific actions (stats, purge_category, purge_repo, purge_all, vacuum). It uses a specific verb 'cleanup' targeting a resource, and differentiates from sibling db_inspect which inspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly mentions when to use: 'when db_inspect finds data is too much or outdated, use this tool to clean'. It references an alternative tool (db_inspect) implicitly, but lacks explicit 'when not to use' or exclusions. Clear context but incomplete exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

db_inspectA

查看数据库表结构和内容概况(所有表、字段、记录数、最近记录)。

想看当前索引了哪些数据时用这个。比 index_status 更详细,展示完整表结构。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It goes beyond the name by detailing exactly what data is returned (all tables, fields, record counts, recent records), implying a read-only inspection. This is useful context, though it doesn't explicitly note side-effect freedom or any potential performance implications, so it falls short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the main purpose, then adds usage guidance and a comparison to a sibling tool. Every sentence earns its place, and there is no redundancy or unneeded detail. It is concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and an output schema exists (so return values need not be explained), the description covers all essential aspects: what it does, what it shows, and when to use it relative to a sibling. It is fully complete for a zero-parameter inspection tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the input schema is an empty object, so the baseline for parameter semantics is 4. The description itself doesn't need to explain parameters since there are none, and it doesn't add anything beyond that, which is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb ('查看' / view) and resource ('数据库表结构和内容概况'), enumerating what it includes (all tables, fields, record counts, recent records). It also distinguishes itself from the sibling tool 'index_status' by noting it is more detailed and shows complete table structure, making its purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use this tool: '想看当前索引了哪些数据时用这个' (use this when you want to see which data is currently indexed). It also provides an alternative comparison, stating it is more detailed than 'index_status', which helps an agent choose between the two. This satisfies the 'when' and 'alternatives' criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

index_statusA

查看当前本地索引了哪些代码文件。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It indicates a read-only viewing operation, but does not explicitly state it is non-destructive or mention any side effects. For a simple status query, this minimal information is sufficient, but it adds no extra context beyond the bare action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that fully communicates the tool's function with no extraneous detail. It is appropriately sized and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity, the description is adequate. It explains what the tool does, and since an output schema is present, return values are already documented. However, it could benefit from a note that this is a read-only operation, but that is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the description does not need to explain any. The baseline of 4 is appropriate because there is nothing to clarify.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to view which code files are currently indexed locally. The verb '查看' (view) is specific, and it differentiates from sibling tools like search_code or read_github_file by focusing on index status rather than file content or searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It does not mention prerequisites, exclusions, or related tools. The usage context is implied (e.g., checking what is available before searching) but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_github_filesA

浏览 GitHub 仓库的文件列表。

找到仓库后,用本工具看目录结构。找到文件后再用 read_github_file 读内容。 禁止用 gh CLI 或 curl 代替。

Args: url: 仓库 URL (来自 search_github 的结果,如 https://github.com/owner/repo) path: 子目录路径(留空看根目录)

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
pathNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It only says 'browse file list' without explicitly stating it's read-only, what it returns, or any side effects. While the output schema may cover return format, the description lacks safety/behavioral details like rate limits or destructive potential. Compared to the calibration example where annotations existed, here the burden is on the description and it is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, structured in two paragraphs plus an args list, and front-loaded with the core purpose. Each sentence contributes to usage or parameter guidance with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple nature of the tool and the presence of an output schema, the description covers the essential workflow and parameter semantics. It doesn't elaborate on edge cases or return formats, but the output schema likely handles that. Minor missing: no mention of pagination or max results, but for a directory listing this is acceptable. Score 4 due to slight lack of behavioral detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, but the description explains both parameters clearly: 'url' is the repository URL from search_github results, and 'path' is the subdirectory path with empty meaning root. This adds significant meaning beyond the schema's generic titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists files in a GitHub repository ('浏览 GitHub 仓库的文件列表'), and explicitly says '看目录结构' (view directory structure). It distinguishes from read_github_file by noting it is to be used before reading content, and from search tools by implying it operates on a known repo.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit workflow: after finding a repo, use this tool to see directory structure, then use read_github_file to read content. Also forbids using gh CLI or curl as alternatives. This clearly guides when to use and when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_github_fileA

读取 GitHub 仓库中某个文件的内容。

读到的代码可以直接复用,需要在代码中标注来源。 文件内容会自动索引到本地,之后可用 search_code 搜索。

Args: url: 仓库 URL (如 https://github.com/owner/repo) path: 文件路径 (如 "src/main.py")

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes
pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses non-obvious behaviors: file content is automatically indexed locally for later search_code, and code reuse requires source attribution. It does not cover auth or rate limits, but the disclosed side effects are meaningful for a read tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: a one-sentence purpose, two sentences of behavioral notes, and a concise Args list. Every sentence earns its place without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-file tool with an output schema, the description covers purpose, parameters, side effects, and usage context. It lacks auth/size caveats, but these are not critical given the tool's simplicity and available schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description compensates by explaining both parameters: url as 'repository URL (e.g., https://github.com/owner/repo)' and path as 'file path (e.g., "src/main.py")'. These examples add meaning beyond bare property names, though advanced options like branch/ref are not mentioned.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states '读取 GitHub 仓库中某个文件的内容' (read a file's content from a GitHub repository), with a specific verb and resource. It distinguishes itself from sibling tools by noting that the content is auto-indexed locally and can later be searched with search_code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context: read code can be reused with source attribution, and content is auto-indexed for later search_code. However, it does not explicitly mention when not to use it or name alternatives like list_github_files, so it stops short of fully explicit guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_codeA

在已读过的代码中搜索关键词。

写代码前先搜一下有没有现成的实现,有就直接复用,禁止从零编写。 只能搜到之前用 read_github_file 读过的文件。

Args: query: Search keywords repo: Optional filter by repository name top_k: Number of results (default: 5, max: 20)

ParametersJSON Schema
NameRequiredDescriptionDefault
repoNo
queryYes
top_kNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the transparency burden. It clearly discloses the indexing dependency on read_github_file and implies this is a read-only search over local scope. It doesn't mention edge cases like missing index or result ordering, but the core behavioral boundary is clearly communicated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: one-sentence summary, clear usage instruction, search scope constraint, and a compact Args list. Every sentence serves a purpose and no unnecessary filler is included.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple three-parameter search tool with an output schema, the description covers scope, prerequisites, when to use, and limitations. It is sufficiently complete for an agent to decide when to invoke this tool and what to expect, although it could mention what happens when there are no previously read files.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the Args section in the description is essential. It explains all three parameters: query, repo, and top_k, with top_k's default and max limit. The descriptions are not very detailed but they do add practical meaning beyond the bare schema types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states '在已读过的代码中搜索关键词' which clearly identifies a search operation scoped to previously read code. It distinguishes itself from sibling tools like search_github or web_search_github by explicitly limiting results to files read with read_github_file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit usage guidance: search before writing code and reuse existing implementations instead of writing from scratch. It also clarifies the limitation that only files read via read_get_file are searchable, but it does not explicitly name alternative tools for cases where code has not been read yet.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_githubA

在 GitHub 搜索仓库,返回仓库 URL。

这是搜索 GitHub 的唯一途径,禁止使用 gh CLI 或 curl。 找到仓库后,用 list_github_files 浏览文件,read_github_file 读代码。

Args: query: Search keywords (中文或英文均可) limit: Maximum results (default: 10, max: 30)

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It clearly indicates a read-only search operation returning URLs, but it does not explicitly state that it has no side effects, nor does it mention any rate limits or potential errors. While the operation is obviously non-destructive, the description lacks explicit behavioral disclosures.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured. It uses two short sentences to convey purpose, exclusivity, and follow-up actions, followed by a compact list of parameters. There is no redundant or verbose wording; every sentence contributes useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is contextually complete for a search tool. It explains the workflow with sibling tools (list_github_files, read_github_file), sets expectations for the return value (repository URL), and provides parameter definitions. It does not describe error handling or pagination, but for a simple search operation, this level of detail is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides only titles and defaults, with no descriptions for 'query' or 'limit'. The description adds meaningful semantics: 'query' is search keywords (can be Chinese or English) and 'limit' is maximum results with a default and max value. This clarifies the purpose and constraints of both parameters, adding value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '在 GitHub 搜索仓库,返回仓库 URL' (search GitHub repositories and return the repository URL). It explicitly distinguishes itself from alternatives by declaring it is the only way to search GitHub and forbids using gh CLI or curl, making the tool's role unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: it states when to use the tool (it is the only search method) and what to do after finding a repository (use list_github_files to browse files and read_github_file to read code). It also gives a clear directive not to use other methods, fully informing the agent about appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_historyA

查询某个类别之前读过什么项目。

用户说"做个XX"时,第一步调本工具查历史记录。 有记录 → search_code 搜代码,无记录 → search_github 搜新仓库。

Args: category: Search category (e.g. "电商web", "点餐小程序")

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It states the tool queries history (implying read-only) but lacks details on return format, pagination, or side effects. Adequate but not exhaustive for a query tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is brief, front-loaded with the purpose, and includes usage context. Every sentence earns its place, though the Args section repeats schema name but adds example.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with an output schema, the description provides necessary context including trigger scenario and next steps. Missing some behavioral details but complete enough for this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and description adds example for category ('电商web'), but does not specify allowed values or format beyond the example. With a single parameter, this is acceptable but not enriched.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states '查询某个类别之前读过什么项目' (query previously read projects by category), distinguishing it from sibling tools like search_code and search_github by specifying its role in the workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs when to use: '用户说"做个XX"时,第一步调本工具查历史记录' and provides decision logic for alternatives (有记录 → search_code, 无记录 → search_github), which is excellent guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

web_search_githubA

通过 GitHub 官方搜索页搜索开源项目(免费,无需 API Key,无限额度)。

当 search_github 限流时用这个替代。搜索 GitHub 上的仓库。 解析 github.com/search 的 HTML 结果页,不依赖第三方搜索引擎。

Args: query: 搜索关键词 (如 "电商网站 React") limit: 返回结果数 (default: 10, max: 20)

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses the mechanism (parsing HTML) and the free/unlimited nature, but doesn't mention potential rate limits on the HTML scraping itself, pagination behavior, or what happens if the HTML structure changes. It's adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with the key purpose and advantage. The Args section is clear. Minor redundancy: '搜索 GitHub 上的仓库' repeats the purpose already stated, but overall it's efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 params, no annotations, output schema exists), the description covers the essential purpose, usage context, and parameter semantics. It doesn't describe the output structure, but the output schema exists, so that's acceptable. It could mention error cases (e.g., if search page is blocked) but is otherwise complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains query as search keywords with an example, and limit as result count with default and max. This adds meaning beyond the bare schema, but doesn't specify the format of results or how limit interacts with pagination. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches GitHub open-source projects via GitHub's official search page, explicitly noting it's free, requires no API key, and has unlimited quota. It distinguishes itself from sibling tool search_github by being a fallback when rate-limited, and from search_code by targeting repositories rather than code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says to use this tool when search_github is rate-limited, providing a clear alternative. It also clarifies it parses github.com/search HTML results and doesn't rely on third-party search engines, giving the agent context on when this is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 9 tool updatesv0.1.0
    • First observeddb_cleanup
    • First observeddb_inspect
    • First observedindex_status
    • First observedlist_github_files
    • First observedread_github_file
    • First observedsearch_code
    • First observedsearch_github
    • First observedsearch_history
    • First observedweb_search_github

TDQS

A4/5.0
Disambiguation3/5

Most tools are distinct, but search_github and web_search_github both search GitHub repos, and index_status and db_inspect both inspect the local index, creating ambiguous pairs. Descriptions help differentiate them but the overlap could cause misselection.

Naming Consistency3/5

Tool names mix patterns: most use verb_noun (search_code, read_github_file), but some are noun-first (index_status, db_inspect, db_cleanup) and one uses a prefix (web_search_github). All are snake_case and readable, but the conventions are not uniform.

Tool Count5/5

With 9 tools, the count is well within the ideal 3-15 range and appropriately covers the workflow of searching repos, reading files, indexing, and managing the local database. Each tool serves a clear purpose in the RAG pipeline.

Completeness4/5

The core workflow is covered: search repos, browse and read files, index code, search indexed code, and manage the database. Minor gaps exist, such as no bulk indexing or a way to query history by repository, but these are not critical for the intended use case.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/suyu-creator/github-code-rag-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server