xmp4 — Semantic code knowledge for your stack
能做什么:查已收录开源库的真实源码与测试,搜符号、看文件大纲和类层级、找谁调用了它、它又调用了谁,并列出项目依赖。跨 C#、Java、TS、Python、Rust 与 PHP 都能查。
什么时候接:评估升级第三方库的影响时,先查清哪些代码在调用目标 API、有没有覆盖测试,再决定能不能安全换版本。
注意:只覆盖已收录的库与版本,新版本或私有包查不到;纯只读不写入,查不到时以仓库源码和本地 IDE 为准。
可用工具
xmp4_calleesFind direct callees (methods called by) a symbol in a project. Navigate step-by-step by calling xmp4_callees again on interesting results.xmp4_callersFind direct callers of a symbol in a project. Navigate step-by-step by calling xmp4_callers again on interesting results.xmp4_depsList external dependencies of a project.xmp4_grepServer-side regex text search over indexed project source files. Free tier: requires file_path (single file). Premium tier (XMP4_PREMIUM_GREP_WALK=true): allows file_glob multi-file walk. Prefer xmp4_tests_for/xmp4_usages for SCIP symbols — grep is for text not indexed (comments, literals, config keys).xmp4_guideUsage guide for xmp4 tools — read this first to learn the correct workflowxmp4_hierarchyGet type hierarchy (base, interfaces, derived) for a symbol in a project.xmp4_infoGet detailed information about a symbol in a project.xmp4_outlineGet outline (all symbols) for a file in a project.xmp4_projectsSearch and browse projects by language and name. Use this first to discover projects, then use other tools with the repo name.xmp4_searchSearch symbols in a project. Use xmp4_projects first to find the project identifier.xmp4_serverGet server information, version, and capabilitiesxmp4_sourceExtract source code for a symbol in a project.xmp4_symbol_atLSP-style position→symbol lookup. Given (file_path, line, column) returns the symbol whose occurrence covers that cursor position. line is 1-based; column is 0-based. Use after xmp4_outline/xmp4_view when you know coordinates and want the canonical symbol.xmp4_tests_forFind direct tests that exercise a given symbol (direct callers filtered to test-file candidates per language pattern: CSharp/Java/PHP: *Test(s).<ext>; Python: test_*.py / *_test.py; TypeScript/JavaScript: *.spec/test.{ts,js}; Rust: *_tests.rs / tests/; etc.).xmp4_usagesFind all usages/references of a symbol in a project.xmp4_viewRead a raw file excerpt from an indexed project by line range. Use after xmp4_search/xmp4_outline locates the region of interest, or to expand a truncated xmp4_source snippet. Hard cap of 500 lines per call.
配置到 Claude / Cursor
{
"mcpServers": {
"remote-ai-example4-xmp4": {
"type": "http",
"url": "https://mcp.example4.ai/mcp"
}
}
}来源
- 更新日期:2026-10-29
同分类其他 MCP
资料来自官方仓库与 MCP 接口探测,以官方最新文档为准;安装第三方 MCP server 前请自行评估安全风险。