
Symbols
io.github.Jordan-Horner由 GitHub 账号 Jordan-Horner 发布v1.0.3更新于 Oct 24, 2026
Fast polyglot source code intelligence: symbols, imports, dependencies, and impact analysis.
概览
为助手提供只读的代码智能:符号、导入、依赖、被依赖、影响分析和项目依赖图。
- 可以做什么
- Symbols 是一个通过 MCP 暴露的多语言源代码智能工具。它使用 tree-sitter AST 解析提取符号(函数、类、常量、变量),解析导入语句,并解析文件级依赖。工具包括 syms_list、syms_imports、syms_deps、syms_dependents、syms_impact、syms_search 和 syms_graph,支持可选的符号类型过滤和行列范围。结果以结构化内容返回。
- 适用场景
- 当助手需要代码库的结构化上下文时使用:梳理陌生仓库、评估改动可能影响的范围、审查依赖关系,或按名称查找符号。它面向希望按需获取最新项目事实、而不必反复阅读文件或依赖过时聊天记录的开发者。
- 运行要求
- 作为本地 stdio 进程在用户机器上运行(仅限桌面端)。可通过发布压缩包、Homebrew 或使用 Go 1.26+ 从源码构建来安装 syms 二进制文件。未声明任何账户、API 密钥或环境变量。它从本地文件系统读取源代码文件。
安装
在 SourceWeft 中
- 打开 控制台中的 Symbols,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
symbols
A fast, polyglot source code intelligence CLI. Extract symbols, parse imports, trace dependencies, and analyze impact — all from the command line.
No language server required. No build step for your projects. Just point it at your code.
[Go] [License: MIT] [MCPAmpel]
[symbols MCP server]Table of contents
- Why this exists
- How it saves context
- What it does
- Install
- Language support
- Usage
- MCP server
- How it works
- Project root detection
- Limitations
- License
Why this exists
symbols is for the moments when you need to understand a codebase quickly without opening 30 files first.
Common pain points it targets:
- You are about to change a file and need to know blast radius immediately.
- You are onboarding to an unfamiliar repo and need a map, not a scavenger hunt.
- You are reviewing a PR and want concrete dependency and ownership signals.
- You are using AI coding tools and need reliable, structured project context on demand.
Instead of manually reconstructing context from editor tabs, grep output, and memory, symbols gives you the structural view in one step.
How it saves context
symbols saves context in two practical ways:
- It externalizes code structure into fast, repeatable queries (
list,deps,dependents,impact,graph,search) so you do not have to rebuild mental maps every session. - It exposes the same model through MCP (
syms mcp) so agents and tools can fetch fresh project facts directly, rather than relying on stale chat history or guessed file relationships.
Net effect:
- less re-reading
- fewer "what will this break?" surprises
- faster onboarding and safer refactors
- more useful AI assistance because context is retrieved, not improvised
- lower cost from fewer exploratory engineering cycles and reduced AI token spend on repo re-discovery
What it does
Install
Option 1: Build from source
Requirements: Go 1.26+
Option 2: Direct installation (Linux/macOS)
Option 3: Homebrew (macOS)
Verify installation
Language support
Symbol extraction uses tree-sitter for full AST parsing (function signatures with parameters, classes, types, constants). Import parsing and dependency resolution use regex.
Usage
Symbol extraction
Output:
Import parsing
Output:
Dependency queries
Impact analysis
Output:
Project graph summary
Output:
JSON output
All commands support --json for machine-readable output:
Shorthand
The list subcommand is the default — you can omit it:
Symbol search
Output:
MCP server
Run syms as an MCP server for AI tool integration (e.g. Claude Code):
Exposes all functionality as MCP tools over stdio (JSON-RPC 2.0):
syms_list and syms_search accept optional kinds: string[] arguments to filter symbol kinds.
syms_list and syms_search also accept optional include_ranges: boolean for start/end line+column metadata.
Tool results are returned in structuredContent (not JSON text blobs in content[].text).
Claude Code setup
After installing syms, configure it as an MCP server:
Project-level (recommended for teams):
Create .mcp.json in your project root:
Commit this file so your team gets the symbols server automatically.
Global (all projects):
Create or edit ~/.mcp.json:
After configuration:
- Restart Claude Code
- When prompted, approve the
symbolsMCP server - Claude Code will now have access to code intelligence tools in all your projects
How it works
Symbol extraction uses tree-sitter for full AST parsing. Each language has a compiled grammar (linked statically into the binary) that produces a syntax tree. The tool walks the tree to extract top-level declarations with names, kinds, line numbers, and function parameters. For Python, module-level assignments are also extracted as constants (UPPER_CASE) or variables.
Import parsing uses regex patterns tuned to each language's import syntax. This is fast and reliable for standard import forms without needing AST parsing.
Dependency resolution maps import specifiers to actual files on disk using language-specific conventions:
- Python: module dot-path to file path, relative import resolution
- Go:
go.modmodule name stripping, package-to-directory mapping - Java/Kotlin: dot-to-slash convention, standard source root prefixes (
src/main/java/) - Rust:
crate/self/superpath resolution,mod.rsconvention - C#: namespace-to-path with progressive prefix stripping
- PHP: PSR-4 backslash-to-slash mapping,
require/includepath resolution
Directory scanning uses early pruning of .git, node_modules, dist, build, vendor, target, and other common non-source directories.
Project root detection
For deps, dependents, impact, and graph, the tool auto-detects the project root by walking up the directory tree looking for .git, package.json, or pyproject.toml. Override with --root:
Limitations
- Convention-based resolution — dependency resolution uses file path conventions, not compiler/build system integration. TypeScript/JavaScript
pathsfromtsconfig.json/jsconfig.jsonare supported (includingextends), but webpack/vite aliases defined outside tsconfig are not. - File-level granularity — dependencies are traced at the file level (import graph), not at the function or symbol level. There is no call graph.
- C/C++ includes —
#includeparsing and header resolution are not yet implemented. Symbol extraction works, but dependency tracing does not. - Ruby/Scala/Bash — symbol extraction works via tree-sitter, but import parsing and dependency resolution are not implemented.
- Dynamic imports — Python's
importlib.import_module(), JavaScript's computedrequire(), and similar dynamic patterns are not detected. - Monorepo boundaries — the tool resolves imports within a single project root. Cross-package imports in monorepos may not resolve correctly.
License
来源:README.md,提交 84af4cc
工具
0版本历史
1- v1.0.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分