xmp4 — Semantic code knowledge for your stack

ai.example4由 example4.ai 發布官方發布者v1.2.6更新於 Oct 24, 2026

OSS libs in your stack, really used: source, tests, callers. C#, Java, TS, Python, Rust, PHP+.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取知識與記憶開發者工具

概覽

AI 產生的概覽

讓助理以語意方式查詢已建立索引的開源函式庫原始碼、呼叫者與型別階層。

可以做什麼
提供對已預先建立索引之開源函式庫的語意程式碼查詢,包含專案瀏覽、符號搜尋、符號資訊、原始碼擷取、呼叫者與被呼叫者、型別階層、大綱、使用處、測試對應與相依性清單。另有依行號範圍讀取檔案的檢視工具與伺服器端正規表達式搜尋,並提供工具使用指南與伺服器資訊。
適用情境
當你想讓助理在不複製儲存庫、也不反覆執行文字搜尋的情況下,理解技術堆疊中開源函式庫的符號、呼叫關係與型別階層時使用。適合以 C#、TypeScript、Python、Java、Rust 或 PHP 為主的專案。
執行需求
需要可連線至遠端 MCP 端點的網路存取,並在用戶端設定中以 HTTP 連線該端點。不需要本機套件、API 金鑰或環境變數。
安裝前請注意
查詢會傳送至第三方託管服務;其說明指出會記錄彙總的查詢次數(符號、專案與工具名稱)以決定索引成長,但不記錄程式碼內容或個人識別資訊。多檔案正規表達式搜尋需啟用付費層級選項。部分語言與查詢類型有已知限制。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 xmp4 — Semantic code knowledge for your stack,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/ai.example4%2Fxmp4/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "xmp4-semantic-code-knowledge-for-your-st": {
      "type": "http",
      "url": "https://mcp.example4.ai/mcp"
    }
  }
}

README

xmp4

Stop grepping library source.

Your AI gets the compiler's view of 856 OSS libraries via MCP.

[live] [registry] [license] [MCP] [repos] [vs GitMCP]

Real callers. Real source. Real hierarchy. In 3 tool calls.

→ Landing page · → Benchmark whitepaper · → Connect in 30 seconds


The 30-second pitch

Your AI coding agent is burning tokens grepping OSS libraries it will barely use. xmp4 is a hosted MCP server that pre-indexes 856 popular open-source libraries with SCIP — the semantic code format Sourcegraph uses — and serves them through 17 tools. No clone. No grep. No false positives.

text
ASK: "Who calls Flask.wsgi_app in the flask repo and what does it do?"
with grep + local clone:  git clone flask/flask          ~40 MB,   ~2 min  grep -rn "wsgi_app" .          200+ matches, mostly noise  cat src/flask/app.py | sed ... read 1000+ lines to find the body  filter false positives         model spends tokens deciding what's real  ──────────────────────────────────────  total:                         ~15,000 tokens + disk + wall time
with xmp4:  xmp4_info(symbol_name="Flask",    file_path="src/flask/app.py")         → signature,  20 tok  xmp4_source(symbol_name="wsgi_app", file_path="src/flask/app.py")       → body,      180 tok  xmp4_callers(symbol_name="wsgi_app", file_path="src/flask/app.py")      → 1 caller,   50 tok  ──────────────────────────────────────  total:                                                                    ~250 tokens
xmp4 is 60× cheaper here — and every result is SCIP-resolved, not text-matched.

The measured numbers (4 big OSS libs · reproducible)

Same realistic question on spring-boot · tokio · django · efcore: "give me the signature, body, and real callers of X."

xmp4grep + cloneGitMCPContext7
Total tokens (same question)1 5582 97865 629—
vs xmp41×1.9× more42× morecan't answer
Returns real source body?✅✅ noisy✗ file paths only✗ curated docs only
Semantic callers?✅✗✗✗
Type hierarchy?✅✗✗✗
Setup cost0GBs of clone00

GitMCP and Context7 look cheaper per call because they return less. To reach the same answer, GitMCP balloons to 42× more tokens — and still can't produce the semantic caller list. Context7 can't at any cost. Full whitepaper with Python harness →

Connect in 30 seconds

jsonc
// Claude Code / Cursor / Claude Desktop — project `.mcp.json` or client config{  "mcpServers": {    "xmp4": {      "type": "http",      "url": "https://mcp.example4.ai/mcp"    }  }}

(The ready-to-paste config also lives at .mcp.json in this repo.)

Teach Claude how to use xmp4 (optional but recommended)

Install the xmp4 skill once per version — Claude will pick the cheapest tool path automatically (tests_for + view over grep):

bash
# Claude Codemkdir -p ~/.claude/skills/xmp4 && \  curl -sfL https://example4.ai/xmp4-skill.md -o ~/.claude/skills/xmp4/SKILL.md
# Other clients: just tell Claude to read the URL when using xmp4 tools#   https://example4.ai/xmp4-skill.md

Restart your client. Then try (every step verified live 2026-04-24):

"Using xmp4, find the Flask class in flask/Flask and list its usages."

You should see Type Flask src/flask/app.py:81 and 165 usages across 33 result pages. One semantic call per question. Zero grep loops.

Setup for Cursor · Claude Desktop · Continue · Windsurf → docs/connect-instructions.md

The 17 tools

Full reference with live examples

Semantic core (where the value lives) xmp4_projects · xmp4_search · xmp4_info · xmp4_usages · xmp4_callers · xmp4_callees · xmp4_hierarchy · xmp4_outline · xmp4_source · xmp4_tests_for · xmp4_deps · xmp4_symbol_at

Convenience xmp4_view (raw file excerpt by line range) · xmp4_grep (server-side regex when semantics isn't enough)

Meta xmp4_guide (returns a versioned skill pointer to https://example4.ai/xmp4-skill.md — fetch once per version and save as a local Claude Code skill; embeds a minimal cheatsheet as offline fallback) · xmp4_server (version + stats)

Language coverage

Tier 1 — full coverage contract
C# · TypeScript · Python · Java · Rust · PHP

Tier 2 — best-effort, documented quirks
Go · JavaScript · Dart · Ruby · C++

Every known limitation — empty hierarchy.base on TS/Rust/Java/PHP, Python cross-module usages under-count, C# explicit-interface-impl dotted-name behaviour — is listed verbatim in docs/tiers-and-quirks.md. We'd rather set expectations correctly than have a reviewer find a gap and assume the whole thing is inflated.

Coverage grows by demand, not by guesswork

The index currently holds 856 repositories / 15 921 SCIP-indexed projects. We add new libraries based on two signals, combined:

  1. Aggregate query logs — symbol names and project filters, no PII, no user code. If many AI agents search for a library we don't have, we see it.
  2. Your request — file a repo-request issue with the GitHub URL, the language, and one concrete query you want to run. A single user request + downstream query demand almost always means indexed within days.

A public /stats/top-missing endpoint is planned — full transparency on what drives the growth loop.

Privacy — short version

  • ✓ We log: aggregate query counts (symbol/project/tool names, coarse timestamps) to grow the index by demand.
  • ✗ We don't log: the contents of your codebase · personal identifiers · request bodies beyond declared tool parameters.
  • Standard nginx access logs kept 7 days for abuse prevention, then purged. Not joined with query tallies.

Full detail → docs/privacy.md.

Status

What's in this repository

PathPurpose
docs/connect-instructions.md5 MCP clients, proof-of-life sequence, troubleshooting
docs/tool-reference.md17 tools with live-verified examples and workflow rules
docs/tiers-and-quirks.mdLanguage tier matrix + every known limitation, verbatim
docs/privacy.mdWhat we log, what we don't, GDPR contact
docs/request-repo.mdHow the demand-driven queue actually works
.mcp.jsonReady-to-paste MCP client config (type: http, URL)
skills/xmp4/SKILL.mdClaude Code skill — workflow, cost budget, grep policy, common mistakes
html/xmp4-skill.mdSame skill, served publicly at https://example4.ai/xmp4-skill.md
server.jsonOfficial MCP Registry manifest (DNS-authed ai.example4/xmp4)
glama.jsonGlama catalog auto-index hook
.github/ISSUE_TEMPLATE/Bug · feature-request · request-repo templates

Related

  • LSAI protocol — open spec for semantic code intelligence in AI agents.
  • SCIP — the semantic code format xmp4 is built on (Sourcegraph-developed, BSD-3).
  • Model Context Protocol — the open transport spec xmp4 speaks.

License

Apache 2.0 for this documentation repository — see LICENSE. The hosted mcp.example4.ai endpoint is free for personal and commercial use (TOS link pending).

Commercial licensing or self-hosted deployment enquiries → open a GitHub issue labelled commercial on this repo.


Made with semantic intelligence instead of grep.

SCIP · MCP · LSAI

來源:README.md,提交 58594e8

工具

16

xmp4_callees

Find direct callees (methods called by) a symbol in a project. Navigate step-by-step by calling xmp4_callees again on interesting results.

輸入參數docspageproject必填file_pathpage_sizesymbol_name必填output_format

xmp4_callers

Find direct callers of a symbol in a project. Navigate step-by-step by calling xmp4_callers again on interesting results.

輸入參數docspageproject必填file_pathpage_sizesymbol_name必填output_format

xmp4_deps

List external dependencies of a project.

輸入參數pageproject必填page_sizeoutput_format

xmp4_grep

Server-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).

輸入參數pagepattern必填project必填file_globfile_pathpage_sizemax_resultscase_sensitive

xmp4_guide

Usage guide for xmp4 tools — read this first to learn the correct workflow

無需輸入參數。

xmp4_hierarchy

Get type hierarchy (base, interfaces, derived) for a symbol in a project.

輸入參數docspageproject必填file_pathpage_sizesymbol_name必填output_format

xmp4_info

Get detailed information about a symbol in a project.

輸入參數docspageproject必填file_pathpage_sizesymbol_name必填output_format

xmp4_outline

Get outline (all symbols) for a file in a project.

輸入參數pageproject必填file_path必填page_sizeoutput_format

xmp4_projects

Search and browse projects by language and name. Use this first to discover projects, then use other tools with the repo name.

輸入參數pagerepoquerylanguagepage_size

xmp4_server

Get server information, version, and capabilities

無需輸入參數。

xmp4_source

Extract source code for a symbol in a project.

輸入參數docspageproject必填file_pathpage_sizesymbol_name必填output_format

xmp4_symbol_at

LSP-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.

輸入參數linecolumnproject必填file_path必填

xmp4_tests_for

Find 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.).

輸入參數docspageproject必填file_pathpage_sizesymbol_name必填output_format

xmp4_usages

Find all usages/references of a symbol in a project.

輸入參數docspageproject必填file_pathpage_sizesymbol_name必填output_format

xmp4_view

Read 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.

輸入參數project必填to_linefile_path必填from_line

版本歷史

1
  1. v1.2.6最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Example4 整合