Zig Docs MCP server
✓ OfficialProvides up-to-date Zig programming language standard library and builtin function documentation in Markdown format for AI clients.
Also known as zig-wasm/zig-mcp, @iflow-mcp/zig-wasm-zig-mcp
- Stars
- 175
- Tools
- 4
- Downloads, 30 days
- 28
- Latest version
- —
- Last commit
- Mar 23, 2026
- License
- MIT
What is Zig Docs MCP?
Zig Docs provides up-to-date Zig programming language standard library and builtin function documentation in Markdown format for AI clients. It exposes 4 tools, such as list_builtin_functions, get_builtin_function, search_std_lib.
Summary generated from the project's README
About Zig Docs MCP server
Accessing up-to-date Zig programming language documentation directly within your AI client is what this server enables. It provides the standard library and builtin function details in Markdown format, which helps reduce token usage compared to standard HTML outputs. Developers can use this to ensure their AI coding assistants have accurate context regarding the specific version of Zig they are using.
Users can configure the server to pull documentation from their locally installed Zig compiler by default or fetch it from ziglang.org using remote mode. When running locally, the server uses the zig std command to match your current environment. If using remote mode, you can specify exact versions like 0.14.1 or the master branch and set update policies such as daily or startup. The server works with clients like Claude Desktop, Claude Code, Roo Code, and Augment Code through npx or bunx commands.
What you can do with it
- 1Discovering available builtin functionsAsk the AI to list all available Zig builtin functions to understand what the compiler provides.
- 2Searching the standard libraryFind specific types, functions, or constants within the Zig standard library by name.
- 3Retrieving detailed item documentationGet comprehensive information including signatures, parameters, and errors for a specific standard library item.
- 4Examining implementation source codeRequest the full source file for a specific standard library declaration to see how it is implemented.
Written from the project's README. Every use case is checked against a quote from it.
How to install Zig Docs MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Zig Docs MCP in Claude Code
$ claude mcp add zig-mcp -- npx -y @iflow-mcp/zig-wasm-zig-mcpInstall Zig Docs MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"zig-mcp": {
"command": "npx",
"args": [
"-y",
"@iflow-mcp/zig-wasm-zig-mcp"
]
}
}
}Install Zig Docs MCP in VS Code
.vscode/mcp.json
{
"servers": {
"zig-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@iflow-mcp/zig-wasm-zig-mcp"
]
}
}
}Install Zig Docs MCP in VS Code CLI
$ code --add-mcp '{"name":"zig-mcp","type":"stdio","command":"npx","args":["-y","@iflow-mcp/zig-wasm-zig-mcp"]}'Install Zig Docs MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"zig-mcp": {
"command": "npx",
"args": [
"-y",
"@iflow-mcp/zig-wasm-zig-mcp"
]
}
}
}Install Zig Docs MCP in Codex
$ codex mcp add zig-mcp -- npx -y @iflow-mcp/zig-wasm-zig-mcpInstall Zig Docs MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.zig-mcp] command = "npx" args = ["-y", "@iflow-mcp/zig-wasm-zig-mcp"]
Install Zig Docs MCP in Gemini CLI
$ gemini mcp add -s user zig-mcp npx -- -y @iflow-mcp/zig-wasm-zig-mcpInstall Zig Docs MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"zig-mcp": {
"command": "npx",
"args": [
"-y",
"@iflow-mcp/zig-wasm-zig-mcp"
]
}
}
}Zig Docs MCP tools 4
Detected from the READMElist_builtin_functionsget_builtin_functionsearch_std_libget_std_lib_item
| list_builtin_functions | — | |
| get_builtin_function | — | |
| search_std_lib | — | |
| get_std_lib_item | — |
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablezig-wasm/zig-mcp is public and reachablegithub.com/zig-wasm/zig-mcp ↗Pass
- Package names this repository as its source@iflow-mcp/zig-wasm-zig-mcp, zig-mcp name zig-wasm/zig-mcp as sourcenpmjs.com/package/@iflow-mcp/zig-wasm-zig-mcp ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-03-23github.com/zig-wasm/zig-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @iflow-mcp/zig-wasm-zig-mcp, zig-mcpPass
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model4 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubZig Docs MCP
Model Context Protocol (MCP) server that provides up-to-date documentation for the Zig programming language standard library and builtin functions.
It uses the same approach as Zig's official autodoc (ziglang.org) by reading STD lib source files directly through a WASM module. However instead of returning HTML, it outputs Markdown which significantly reduces token usage.
By default, the server uses your locally installed Zig compiler to serve documentation, ensuring you always get docs that match your actual Zig version. It can also fetch documentation from ziglang.org if needed.
[!TIP] Add
use zigdocsto your prompt if you want to explicitly instruct the LLM to use Zig docs tools. Otherwise, LLM will automatically decide when to utilize MCP tools based on the context of your questions.
Tools
list_builtin_functions- Lists all available Zig builtin functions. Builtin functions are provided by the compiler and are prefixed with '@'. The comptime keyword on a parameter means that the parameter must be known at compile time. Use this to discover what functions are available, then use 'get_builtin_function' to get detailed documentation.get_builtin_function- Search for Zig builtin functions by name and get their documentation, signatures, and usage information. Returns all matching functions ranked by relevance.search_std_lib- Search the Zig standard library for declarations by name. Returns a list of matching items with their fully qualified names. Use this to discover available types, functions, and constants in the standard library.get_std_lib_item- Get detailed documentation for a specific standard library item by its fully qualified name (e.g., "std.ArrayList.init"). Returns comprehensive documentation including function signatures, parameters, errors, examples, and source code. Setget_source_file: trueto retrieve the entire source file where the item is implemented.
Commands
The CLI provides flexible options for version control and update management:
# Start MCP server
zig-mcp --doc-source local
# Use specific Zig version from ziglang.org instead of local Zig
zig-mcp --doc-source remote --version 0.14.1
# Enable automatic daily updates
zig-mcp --doc-source remote --update-policy daily
# Update documentation without starting MCP server (only for remote)
zig-mcp update --version 0.15.1
# Start local web server to view documentation
zig-mcp view --version 0.15.1
Version options --version:
master(default) - Latest development version from Zig's master branch0.14.1,0.14.0, etc. - Specific Zig release versions
Update policies --update-policy:
manual(default) - No automatic updates, manual control onlydaily- Check for documentation updates once per daystartup- Update documentation every time the server starts
Documentation sources --doc-source:
local(default) - Use your locally installed Zig compiler's documentation server (zig std)remote- Download documentation from ziglang.org
Documentation Sources
Local Mode (Default)
The server automatically uses your local Zig installation to serve documentation via zig std. This ensures:
- Documentation always matches your installed Zig version
- No network requests needed for standard library docs
- Faster response times
Remote Mode
When using --doc-source remote, documentation is fetched from ziglang.org and cached in platform-specific directories:
- Linux:
~/.cache/zig-mcp/ - macOS:
~/Library/Caches/zig-mcp/ - Windows:
%LOCALAPPDATA%\zig-mcp\
Installation
The installation examples below use the local documentation source by default. In local mode, docs are served by your installed Zig via zig std, requiring no network and matching your actual Zig version. This is the recommended setup for most users. For downloading docs from ziglang.org instead, see Remote Documentation (Optional) below.
Claude Code
Using npx (Node.js)
claude mcp add zig-docs -- npx -y zig-mcp@latest
Using bunx (Bun)
claude mcp add zig-docs -- bunx zig-mcp@latest
Roo Code
- Click the MCP button in Roo Code
- Select "Edit Global MCP" or "Edit Project MCP"
- Add the configuration from the JSON template below
Augment Code
Navigate to Settings → MCP Servers → Add Server and use the JSON template below.
Claude Desktop
Add the JSON configuration below to your MCP settings file.
JSON Configuration Template
Node.js:
{
"mcpServers": {
"zig-docs": {
"command": "npx",
"args": ["-y", "zig-mcp@latest"]
}
}
}
Bun:
{
"mcpServers": {
"zig-docs": {
"command": "bunx",
"args": ["zig-mcp@latest"]
}
}
}
Remote Documentation (Optional)
If you prefer downloading documentation from ziglang.org instead of using your local Zig, enable remote mode explicitly and choose a version:
Using npx (Node.js)
claude mcp add zig-docs -- npx -y zig-mcp@latest --doc-source remote --version master
Using bunx (Bun)
claude mcp add zig-docs -- bunx zig-mcp@latest --doc-source remote --version 0.14.1
Node.js (remote):
{
"mcpServers": {
"zig-docs": {
"command": "npx",
"args": ["-y", "zig-mcp@latest", "--doc-source", "remote", "--version", "master"]
}
}
}
Bun (remote):
{
"mcpServers": {
"zig-docs": {
"command": "bunx",
"args": ["zig-mcp@latest", "--doc-source", "remote", "--version", "0.14.1"]
}
}
}
Zig Docs MCP questions
How do I add Zig Docs MCP to Claude Code?
Run claude mcp add zig-mcp -- npx -y @iflow-mcp/zig-wasm-zig-mcp in your terminal. Add --scope user to make it available in every project.
How do I add Zig Docs MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Zig Docs MCP provide?
It exposes 4 tools, including list_builtin_functions, get_builtin_function, search_std_lib, get_std_lib_item.
How can I ensure the documentation matches my installed Zig version?
By default, the server uses your locally installed Zig compiler to serve documentation via 'zig std'.
Can I use documentation from a specific Zig version?
Yes, you can specify a version using the --version flag, such as '0.14.1' or 'master'.
Does the server support automatic updates?
Yes, you can enable automatic daily updates using the --update-policy daily command.
How do I get the source code for a standard library item?
You can retrieve the entire source file where an item is implemented by setting get_source_file to true.