AGZ Rust MCP

io.github.ugur-murat-alt由 GitHub 帳號 ugur-murat-alt 發布v0.4.0更新於 Nov 3, 2026

Bounded, source-write-free Rust correctness tools grounded in Cargo and rustc output.

發布方自己的服務:rust.wiki

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

面向 Rust 開發的本機 MCP 伺服器:檢視 Cargo 工作區、搜尋原始碼、執行檢查、測試與二進位檔,並取得以編譯器為依據的診斷。

可以做什麼
  • 檢視 Cargo 工作區、清單、鎖定檔與特性,並搜尋或讀取有長度上限、附行號的原始碼片段
  • 執行有界的 Cargo check、Clippy、測試、文件與完整閘門,並依精確名稱編譯或執行指定測試
  • 以字面參數、逾時與有界輸出執行指定的二進位檔或範例
  • 在 crates.io 上核對 crate,並從快取、本機原始碼或 docs.rs 解析精確版本的文件
  • 透過 Rust Analyzer 的懸停、定義、參照、實作、符號與呼叫階層進行程式碼導覽
  • 產生不寫入工作區的重新命名、重構、變更集與修復套件,並提供效能剖析、稽核、解釋與驗證分析
適用情境
適合助理在 Rust 或 Cargo 專案中工作時使用,需要真實的編譯器與測試回饋而非猜測:盤點工作區、定位程式碼、執行單一測試、解析相依 API,或在不更動檔案的前提下準備重構。
執行需求
以 stdio 啟動的本機程序(或僅限回送位址的 HTTP 端點)。可透過 cargo install agz-rust-mcp 安裝,需 Rust 1.91.0 或更新版本,也可使用 Linux x86_64、macOS arm64、Windows x86_64 的預先編譯封裝。需以 --allow-root 指定專案絕對路徑;可選用 AGZ_RUST_MCP_* 環境變數或 TOML 設定檔調整限制與工具集。查詢 crates.io 與 docs.rs 需要網路存取。
安裝前請注意
伺服器不會修改工作區原始碼,但它不是作業系統沙箱:建置腳本、測試、程序巨集、本機 rustdoc 以及被啟用的 Rust Analyzer 工作區程式碼都以伺服器使用者的權限執行,若需要該隔離邊界請使用容器或系統沙箱。測試與二進位檔會以專案程式碼的平常副作用執行。本機遙測記錄預設開啟。Cargo 操作可能耗時較長,受逾時與預算限制。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 AGZ Rust MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

AGZ Rust MCP

[CI] [crates.io] [License: MIT]

English | Türkçe

An AGZ Yazılım product. agz-rust-mcp is a standalone MCP server with stdio and Streamable HTTP transports for general-purpose Rust development grounded in Cargo and rustc. Discover a project offline, collect focused source context and compiler diagnostics, select individual tests, and run binaries/examples. Exact-version dependency docs, Rust Analyzer navigation and write-free change/refactor packages support deeper work.

Everyday workflow

The same workflow works with a library, CLI, service or multi-package Cargo workspace. No framework-specific project structure or particular MCP client is required.

NeedTool call
Map packages, declared targets, features and dependencies without compilingworkspace(action="inspect")
Locate code and read bounded, numbered sourceworkspace(action="search", query="parse_record"), then workspace(action="read", path="src/lib.rs", line=1, lineCount=80)
Get fresh compiler diagnosticscheck(target="check", options={"packages":["my_crate"]})
Discover actual test namestest(action="list", packages=["my_crate"])
Run one library test by its full nametest(action="run", packages=["my_crate"], cargoTarget={"kind":"lib"}, filter="tests::parses_record", exact=true)
Compile tests without executing themtest(action="compile", packages=["my_crate"])
Execute a binary or examplerun(package="my_crate", target={"kind":"example","name":"demo"}, args=["input.json"], timeoutMs=30000)
Resolve an unfamiliar dependency APIdocs with its exact version; api for deeper resolution/probing

Pass an absolute dir for the active project when the client starts elsewhere. A function is exercised through a test or executable example. run is a typed Cargo runner; program arguments remain literal, including spaces and shell metacharacters. Tests and applications execute project code with its ordinary side effects. Empty selections return NO_TESTS, not a passing test verdict.

Use agz-rust-mcp --toolset core for a compact catalog of six everyday tools: workspace, check, test, run, docs, and crate_lookup. The default --toolset full preserves every existing tool plus the new additions. Individual --tools-<name> false switches can disable tools further. See the full reference for limits and result states.

Install

bash
# installer script (Linux x86_64): download install.sh and SHA256SUMS from the# latest release, verify the script, then run itbash install.sh
# crates.io (requires Rust 1.91.0 or newer)cargo install agz-rust-mcp --lockedagz-rust-mcp --version

Prebuilt .tar.gz archives with .sha256 files are available for Linux x86_64, macOS arm64, and Windows x86_64. Releases up to 0.2.0 use the legacy agz-rust-coder-* asset names; from 0.3.0 onward the names are agz-rust-mcp-*.

Step-by-step instructions, per-OS notes, checksum verification, and troubleshooting: docs/install.md · Türkçe.

MCP Client Setup

Use the installed executable with any client supporting local stdio MCP. Supply these fields in the client's own server configuration format:

json
{  "command": "agz-rust-mcp",  "args": ["--allow-root", "/absolute/path/to/project"],  "env": {"AGZ_RUST_MCP_SERVER__TOOLSET": "core"}}

For a client that uses HTTP, start the same binary as a local Streamable HTTP server and configure http://127.0.0.1:8787/mcp as its MCP URL:

bash
agz-rust-mcp --transport http --http-bind 127.0.0.1:8787 \  --allow-root /absolute/path/to/project

The HTTP listener is loopback-only. It supports the session lifecycle used by 2025-11-25 clients and the stateless 2026-07-28 protocol. Client-side display prefixes, configuration file locations, and automatic prompt selection belong to the client; the server depends on none of them. The canonical working directory is the default authorized root; client-provided roots can only narrow configured access. See connection details.

Built-in skills

Four offline skills ship inside the executable: agz-rust-workflow, agz-rust-repair, agz-rust-refactor, and agz-rust-performance. They are available immediately through all three standard MCP interfaces:

  • Tools: workspace(action="skills") lists the catalog; workspace(action="skills", skill="agz-rust-workflow") reads a skill.
  • Prompts: prompts/list and prompts/get expose workflow, repair, refactor, and performance.
  • Resources: resources/read exposes agz-rust-mcp://skills/<skill-name>.

A client that only exposes tools can use the complete skill content. Version and SHA-256 metadata identify the exact bundled instructions. No skill installation or separate MCP is required. Optional agz-rust-mcp skills export --dir <new-directory> creates files for clients that also support filesystem skills; existing files are never overwritten. See built-in skills.

Documentation

Read the documentation in this order:

  1. Install and client setup - every install method and client configuration.
  2. Tool and configuration reference - tools, actions, result semantics, and all configuration keys.
  3. Architecture - process model, protocol lifecycle, and authority boundaries.
  4. Validation and benchmark protocol - smokes, gates, and evidence.
  5. Security policy and Contributing.

The bilingual index with the full reading path is docs/README.md / docs/README.tr.md.

Identity

ContractValue
Crate, binary, serveragz-rust-mcp
MCP Registryio.github.agzyazilim/rust-mcp
Source version0.6.0
First release0.1.0
Release tagagz-rust-mcp-v<version>
Rust edition / MSRV2024 / 1.91.0
Rust MCP SDKrmcp 3.8.0
Default / discovered protocol2025-11-25 / 2026-07-28

MCP package ownership marker: mcp-name: io.github.agzyazilim/rust-mcp.

Tools

These are the exact server tool names. Use the names returned by tools/list; a client may display its own namespace or prefix.

MCP toolDefaultPurpose
workspaceenabledRead built-in skills, inspect manifests/lockfiles, search source and read excerpts offline.
testenabledDiscover, compile or run selected tests with exact names, ignored-test controls and bounded execution.
runenabledRun an exact Cargo binary/example with literal arguments, a deadline and bounded output.
checkenabledRun bounded Cargo check, Clippy, tests, docs, or the full gate.
profileenabledAnalyze observed Cargo rebuild behavior and compare bounded build evidence without claiming unmeasured speedups.
auditenabledScan Rust source for bounded static findings.
crate_lookupenabledVerify a crate and optional exact version on crates.io.
docsenabledResolve exact-version docs from cache, local sources, or docs.rs.
contextenabledPrepare, expand, or delta a revision-bound semantic context capsule with per-item reasons.
apienabledResolve an API signature from bounded analyzer evidence or type-check a candidate snippet in an isolated copy of the workspace configuration.
explainenabledExplain macro expansion provenance, trait obligations, or cfg enablement.
verifyenabledPlan or run a bounded feature, target, toolchain, and stage matrix.
symbolenabledRead Rust Analyzer hover data for one symbol.
referencesenabledFind bounded references.
definitionenabledFind the selected definition.
symbolsenabledList symbols in one Rust file.
implementationsenabledFind implementations.
hierarchyenabledTrace a bounded call hierarchy.
renameenabledProduce a verified rename edit package without applying it.
refactorenabledProduce a verified refactor edit package without applying it.
changeenabledCreate, stage, migrate, and validate a revision-bound changeset in server-owned scratch without writing the workspace.
repairenabledAnalyze, try, compare, and minimize compiler-driven repair candidates for a failing change revision without writing the workspace.
workenabledDrive a typed intent through change/validate with explicit gates and budgets, returning honest gate evidence or a bounded single-use handoff.

Every tool returns deterministic structured data plus an equivalent bounded text fallback. External data stays under untrustedData. Expected domain outcomes such as compiler failure, missing crates, or unavailable docs are typed results; invalid input, authorization failure, resource exhaustion, and unavailable semantic infrastructure are protocol errors.

Configuration

Precedence is CLI, then AGZ_RUST_MCP_* environment variables, then the explicit --config TOML file, then defaults. Environment keys use __ between sections, for example AGZ_RUST_MCP_GATE__HARD_TIMEOUT_MS=600000.

KeyDefaultMeaning
server.transportstdioMCP transport: stdio or http.
server.http_bind127.0.0.1:8787Loopback address for the HTTP /mcp endpoint.
server.allow_rootscanonical CWDWorkspace read/command boundary.
server.allow_dependency_rootsemptyExplicit external path-dependency roots.
gate.hard_timeout_ms600000Cargo operation deadline.
gate.scopeshadowValidation target: workspace, shadow, or affected.
gate.cacheautoCache policy: auto, project, or isolated.
rust_analyzer.workspace_codedenyReject RA startup unless workspace code is disabled.
docs.fallbackautoDocumentation source policy.
profile.max_report_bytes4194304Bounded read/store cap for one Cargo timing artifact.
profile.max_runs4Fresh Cargo runs available to one profile call.
profile.compare_samples3Required samples per side before any speed claim.
limits.tool_output_bytes49152Maximum serialized tool result size.
change.max_bytes268435456Maximum captured candidate bytes per changeset.
repair.max_candidates4Candidates one repair action may try.
repair.max_compiles4Cargo validations one repair action may run.
repair.wall_time_ms120000Wall-clock budget for one repair action.
repair.minimize_max_candidates32Compile-evaluated reduction attempts one repair(action=minimize) may try.
repair.minimize_max_compiles16Cargo runs one repair(action=minimize) may execute, including reproduction and export verification.
work.max_candidates4Host candidate revisions one work item may stage.
work.max_compiles12Gate validations one work item may run.
work.wall_time_ms600000Wall-time budget for one work item.
telemetry.enabledtrueBounded local activity records without prompts or source.

profile evidence is bounded: the latest 64 records stay in memory, and persisted timing artifacts under the server-owned profile-evidence directory are pruned after 24 hours or beyond 64 files. The profile result reports this retention policy, so expired evidence is visible instead of silently reused.

Run agz-rust-mcp --help for every CLI field. The complete behavior and default table is in docs/tools.md.

Security

The server does not modify workspace source, but it is not an operating-system sandbox. Cargo build scripts, tests, procedural macros, local rustdoc, and opted-in Rust Analyzer workspace code execute with the server user's authority. Use a container or OS sandbox when that boundary is required. Workspace, dependency, cache, lease, journal, docs, and telemetry paths are canonicalized, bounded, and fail closed, and stdout is reserved for MCP framing. Report vulnerabilities privately as described in SECURITY.md.

Links

License

MIT, Copyright (c) 2026 Ugur Murat Altintas.

來源:README.md,提交 a74794b

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.4.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Rust 整合