sqry - Semantic Code Search

io.github.verivus-oss由 GitHub 账号 verivus-oss 发布v33.0.1更新于 Oct 24, 2026

AST-based semantic code search: 39 tools over 37 languages. Call tracing and impact analysis.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

sqry 提供基于 AST 的语义代码搜索,让助手在本地仓库中查找符号、追踪调用并分析影响,覆盖 37 种语言。

可以做什么
  • 用字符串谓词和结构化过滤条件搜索、列出代码符号(按类型、语言、可见性)
  • 导航定义与引用,并在代码关系图上执行关系查询
  • 导出代码图、追踪调用以做影响分析和语义差异比较
  • 检测重复代码、循环依赖和未使用代码,并查看工作区状态
  • 通过 tools/list、列出工具的命令行参数和 sqry 资源文档发现可用工具与参数结构
适用场景
适合需要理解或浏览大型多语言代码库的场景:定位定义、追踪调用链、评估改动的波及范围,或找出死代码与重复代码。它在本地针对你指定的仓库运行。
运行要求
需在本地安装 sqry-mcp 可执行文件(Cargo 包或容器镜像)并以 stdio 方式运行,另需 sqry 命令行工具用于配置和守护进程模式。环境变量 SQRY_MCP_WORKSPACE_ROOT 指定要索引和搜索的仓库。仅限桌面端,未声明任何认证。
安装前请注意
该服务器会索引并读取源码目录,结果可能把文件路径和代码暴露给助手;若助手使用外部模型服务,也会传给该服务,README 建议对外部或托管 LLM 提供商使用 standard 脱敏预设。配置命令会写入 MCP 配置文件,建议先用 dry-run 预览。守护进程模式需自行启动并加载 sqryd。

安装

在 SourceWeft 中

  1. 打开 控制台中的 sqry - Semantic Code Search,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

sqry MCP Server

Version: 33.0.1

MCP Registry name: mcp-name: io.github.verivus-oss/sqry

sqry-mcp exposes sqry semantic code-search tools to Model Context Protocol clients.

Modes

Standalone mode:

bash
sqry-mcp --no-daemon

Daemon-backed mode:

bash
sqry daemon startsqry daemon load .sqry-mcp --daemon

Standalone mode currently exposes 39 tools. Daemon-hosted MCP exposes a 17-tool subset backed by sqryd. Use dynamic discovery for exact schemas and descriptions:

bash
sqry-mcp --list-tools

MCP clients can also call tools/list, and sqry clients can read sqry://meta/manifest.

Removed in 21.0.0: the sqry_ask natural-language MCP tool was removed. Use sqry_query, semantic_search, and relation_query instead; see Removed features for migration.

Setup

bash
sqry mcp setup --tool claudesqry mcp setup --tool codexsqry mcp setup --tool gemini

Preview without writing:

bash
sqry mcp setup --tool codex --dry-run

Codex and Gemini use global MCP config and rely on starting the assistant in the target project. Claude project scope can pin a workspace root.

When setup writes a standalone command, expect --no-daemon. Use --daemon only when you have started and loaded sqryd intentionally.

Tool Discovery

Prefer discovery over copying static tables:

  • MCP tools/list
  • sqry-mcp --list-tools
  • sqry://meta/manifest
  • sqry://docs/tool-guide
  • sqry://docs/capability-map

The standalone catalog includes tools for symbol search, navigation, relation queries, graph export, impact analysis, semantic diff, duplicate/cycle/unused detection, workspace status, and context propagation.

Quick Start Tool Calls

Use query for string predicates and filters for structured JSON pre-filters:

json
{  "name": "semantic_search",  "arguments": {    "query": "kind:function items:true",    "filters": {      "language": ["rust"],      "visibility": "public"    }  }}

Use items:true or is_definition:true inside query for definition-only predicates. For list_symbols, use the structured items_only parameter instead:

json
{  "name": "list_symbols",  "arguments": {    "kind": "function",    "language": "rust",    "items_only": true  }}

On pre-V16 snapshots without trustworthy definition signal, these definition-only surfaces return a reindexRequired / reindex-required advisory instead of silently evaluating stale default-false marker data.

Workspaces

MCP resolves workspace context from explicit paths, file-bearing arguments, MCP roots, recent session context, and current working directory fallback.

For multi-root projects, configure a workspace with .sqry-workspace or a VS Code .code-workspace file containing sqry.workspace.

bash
sqry workspace status . --json

source_root_id

workspace_status.aggregate.source_root_statuses[].source_root_id is an opaque 8-hex display/correlation token. It is not a path and not a path prefix.

Invalid tool path:

text
485f1995/src/lib.rs

Valid tool paths:

text
src/lib.rs/absolute/path/to/workspace/src/lib.rs

Under redaction, result paths can be rendered with a source-root prefix for display. Use source_root_id only to correlate that display prefix with aggregate status entries. Cleartext source roots appear only in top-level source_roots[] when the selected redaction preset permits them.

Redaction

The MCP runtime default is minimal. For hosted or external LLM providers, standard is the recommended preset unless stricter path privacy is required. strict is available for stronger redaction.

Keep these separate:

  • Runtime default: minimal
  • Recommended external-provider preset: standard
  • Library/environment defaults: see sqry-mcp-redaction docs for embedding-specific behavior

Related Guides

来源:sqry-mcp/README.md,提交 8f139a6

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

4
  1. v33.0.1最新Oct 6, 2026
  2. v33.0.0Oct 5, 2026
  3. v32.0.1Oct 1, 2026
  4. v31.0.0Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分