Skip to content

MCP

Vein serves an MCP endpoint at /mcp, on the same listener as the admin dashboard ([admin] in vein.toml). It needs the admin Cargo feature, on by default.

  • A loopback bind (127.0.0.1, the default) is open to local agents.
  • Any other bind needs [admin] trusted_networks (CIDR blocks or addresses), a bearer token (VEIN_ADMIN_MCP_TOKEN), or both. With both set, a request needs both: the network check and the token.
  • Everyone outside trusted_networks gets 403.

Read-only, scoped to whichever registries this build serves. Each registry’s resources need that registry’s Cargo feature (gems, crates, npm); a build without crates has no vein://crates/... resources at all.

  • vein://search/{registry}/{query} - the registry’s own ranking, or vein’s name catalog when the registry is out of reach.
  • vein://{registry}/{name} - a package’s newest releases, plus a prerelease newer than all of them.
  • vein://{registry}/{name}/versions - every version. vein://{registry}/{name}/versions/{version} - one of them.
  • vein://{registry}/{name}/versions/{version}/readme - its README. vein://{registry}/{name}/versions/{version}/api - an outline of its API.
  • vein://{registry}/{name}/versions/{version}/api/{path} - one part of that outline: a Ruby class or method, a Rust module or item, a .d.ts file.
  • Gem versions also take a -{platform} suffix for native builds (1.16.0-x86_64-linux) and a vein://gems/{name}/versions/{version}/sbom resource with the CycloneDX document.
  • vein://quarantine - versions held back by the release delay policy, and when each becomes installable.
  • vein://stats - a summary of the whole cache.

A package nobody fetched yet is looked up through the proxy (and cached) on first read, so its data is the registry’s own.

Code-context tools mount next to the resources once [code_context] provider names one. GitHits is the provider today (needs the githits feature): search, read, grep, and list across public repositories, plus package health, changelogs, and vulnerability data. [code_context] tools narrows which of the provider’s tools are offered; left out, all of them are.

[code_context]
provider = "githits"
[code_context.githits]
token_file = "~/.config/vein/githits.token"
# or set VEIN_GITHITS_TOKEN directly