home / mcp / zignet mcp server

ZigNet MCP Server

MCP server for Zig — AI-powered code generation, debugging, and documentation

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "fulgidus-zignet": {
      "command": "npx",
      "args": [
        "-y",
        "zignet"
      ],
      "env": {
        "ZIG_DEFAULT": "0.15.2",
        "ZIGNET_TOP_P": "0.9",
        "ZIG_SUPPORTED": "0.13.0,0.14.0,0.15.2",
        "ZIGNET_GPU_DEVICE": "0",
        "ZIGNET_GPU_LAYERS": "35",
        "ZIGNET_MODEL_PATH": "~/.zignet/models/qloRA-ggml",
        "ZIGNET_TEMPERATURE": "0.7",
        "ZIGNET_CONTEXT_SIZE": "4096",
        "ZIGNET_MODEL_AUTO_DOWNLOAD": "true"
      }
    }
  }
}

ZigNet MCP Server lets you work with Zig code inside your MCP client, offering fast, local analysis, formatting, and documentation powered by a fine-tuned language model. It integrates directly into your chat or editor workflow so you can check syntax, format code, and look up Zig concepts without leaving your environment.

How to use

You use ZigNet by configuring it as an MCP server in your MCP client and then invoking its tools from chat or editor commands. The server exposes core capabilities for Zig code analysis, formatting, and documentation lookup, which you access by issuing plain-language requests like analyze Zig code for syntax or formatting a snippet.

How to install

Install ZigNet by enabling the MCP server in your client. The following steps assume you have Node.js and npm or npx available on your system.

# 1) Ensure you have Node.js and npm
node -v
npm -v

# 2) Start ZigNet via npx (will download and cache on first use)
npx -y zignet

# 3) If you want to pass GPU or other environment options, you can set them before running
export ZIGNET_GPU_DEVICE=0
npx -y zignet

Configuration and environment

Configure ZigNet in your MCP client to ensure the server runs with the right command and optional environment variables. The following configuration shows how ZigNet is typically registered as an MCP server.

{
  "mcpServers": {
    "zignet": {
      "command": "npx",
      "args": ["-y", "zignet"]
    }
  }
}

GPU and advanced options

If you are using a multi-GPU system, you can select the target GPU(s) via environment variables before starting ZigNet. You can also customize several runtime parameters that affect model loading and inference. These settings help you balance performance and resource usage.

Common environment variables you may set include the GPU device, model path, and context size. See below for the complete list of environment variables mentioned for ZigNet usage.

Tool usage overview

ZigNet provides four primary tools you can request from your MCP client: analyze_zig for syntax and type checking, compile_zig for formatting and validation, get_zig_docs for documentation lookup, and suggest_fix for intelligent code suggestions.

Troubleshooting

If ZigNet does not respond on first run, let it download required Zig versions on demand and cache them for subsequent sessions. Ensure your MCP client is configured to communicate via the MCP protocol and that the command and arguments are provided exactly as shown in the configuration snippet.

Available tools

analyze_zig

Analyze Zig code for syntax errors, type mismatches, and semantic issues using the official Zig compiler.

compile_zig

Format Zig code with zig fmt, validate syntax, and enforce best practices.

get_zig_docs

AI-powered Zig documentation lookup for language features and idioms.

suggest_fix

AI-powered intelligent code fix suggestions for Zig errors with multiple options.