Zig
FreeNot checkedMCP server providing Zig language features (completions, hover info, definitions, references) via integration with the Zig Language Server (zls).
About
MCP server providing Zig language features (completions, hover info, definitions, references) via integration with the Zig Language Server (zls).
README
MCP server providing Zig language features (completions, hover info, definitions, references) via integration with the Zig Language Server (zls).
Works with any MCP-compatible client: AI assistants, IDEs, or coding agents that support the Model Context Protocol.
Quick Setup
1. Install zls
# macOS/Linux
brew install zls
# Windows
scoop install zls
# Or download binary: https://github.com/zigtools/zls/releases
2. Configure Your MCP Client
Add to your MCP settings file:
{
"mcpServers": {
"mcp-zig": {
"command": "npx",
"args": ["-y", "@dungngo4520/mcp-zig"],
"env": {
"WORKSPACE_ROOT": "/path/to/your/zig/project"
}
}
}
}
Common config locations:
- macOS:
~/Library/Application Support/<client>/config.json - Windows:
%APPDATA%\<client>\config.json - Linux:
~/.config/<client>/config.json
Replace <client> with your MCP client's name. Check your client's documentation for exact path.
3. Restart Your MCP Client
You'll have access to 4 new tools:
zig_complete- Code completionszig_hover- Symbol informationzig_goto_definition- Jump to definitionszig_find_references- Find all usages
Usage
Ask natural language questions about your Zig code:
- "What does this function do?"
- "Show me completions here"
- "Where is this defined?"
- "Find all usages of this symbol"
Your AI assistant automatically chooses the right tool.
Troubleshooting
Tools not showing up?
- Verify
zlsis installed:zls --version - Check the config file path for your MCP client
- Restart your MCP client after config changes
- Make sure
WORKSPACE_ROOTpoints to a valid Zig project
Contributing
git clone https://github.com/dungngo4520/mcp-zig.git
cd mcp-zig
npm install
npm run build
License
MIT
Install Zig in Claude Desktop, Claude Code & Cursor
unyly install mcp-zigInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add mcp-zig -- npx -y @dungngo4520/mcp-zigFAQ
Is Zig MCP free?
Yes, Zig MCP is free — one-click install via Unyly at no cost.
Does Zig need an API key?
No, Zig runs without API keys or environment variables.
Is Zig hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Zig in Claude Desktop, Claude Code or Cursor?
Open Zig on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Zig with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
