Skip to main content

Set up the cifuzz MCP server

Experimental

The cifuzz MCP server integration is experimental. It requires a state-of-the-art agentic coding model with strong tool-usage and code-generation capabilities, such as Claude Opus 4.6, GPT-5.3 Codex, Gemini 3.1 Pro, or later. Using a less capable model can lead to significantly worse results than the cifuzz spark workflow.

The cifuzz MCP server lets AI coding assistants run cifuzz commands directly from the development environment. It exposes deterministic tools - project setup, candidate identification, test execution, coverage, and findings - through the Model Context Protocol. The AI agent uses its own context awareness to handle creative tasks like writing fuzz test implementations, while cifuzz handles the fuzzing infrastructure. It provides two MCP tools: cifuzz for executing commands and cifuzz-usage for retrieving the API reference and usage information.

Prerequisites

How it works

Your AI coding assistant launches cifuzz mcp as a subprocess and communicates over stdio. Two tools become available: cifuzz for running commands with arguments, and cifuzz-usage for retrieving the API reference. The agent typically calls cifuzz-usage first to learn the available commands, then orchestrates them to set up projects, find candidates, run tests, and review Findings.

Setup

Select your AI coding assistant below and follow the configuration instructions.

Add the following to .mcp.json in your project root for a shareable project-level configuration:

.mcp.json
{
"mcpServers": {
"cifuzz": {
"command": "cifuzz",
"args": ["mcp"]
}
}
}

For user-level configuration, add the same block to ~/.claude/settings.json.

Alternatively, run the following command:

claude mcp add cifuzz -- cifuzz mcp

Available tools

The following commands are accessible through the MCP server:

CommandDescription
cifuzz initSet up a project for use with cifuzz
cifuzz candidatesIdentify functions suitable for fuzz testing
cifuzz createCreate a new fuzz test stub
cifuzz runBuild and execute fuzz tests
cifuzz coverageGenerate coverage reports
cifuzz findingList and review Findings

Typical workflow

tip

The agent handles fuzz test creation using its own context awareness of your codebase, which can produce better results than automated generation. The cifuzz-usage tool provides the FUZZ_TEST API reference the agent needs to write correct harnesses.

A typical agent-driven fuzz testing session follows these steps:

  1. The agent calls cifuzz-usage to learn the available commands and FUZZ_TEST API.
  2. The agent runs cifuzz init to set up the project.
  3. The agent runs cifuzz candidates to identify functions suitable for fuzz testing.
  4. The agent creates a fuzz test file and implements the test harness using its understanding of your codebase.
  5. The agent runs cifuzz run <test-name> to execute the fuzz test.
  6. The agent reviews Findings with cifuzz finding and generates coverage reports with cifuzz coverage.