Skip to main content
The Model Context Protocol (MCP) is an open standard that allows AI agents—such as Copilot, Claude Code, Cursor, Gemini, ChatGPT and others—to securely interact with external tools and services. For Wokwi users, MCP enables seamless integration between AI assistants and embedded simulation.

Wokwi MCP Server

The Wokwi CLI includes an experimental MCP server that allows AI agents to interact with Wokwi’s simulation and testing capabilities. This enables AI agents to:

Simulate Complex Systems

Run simulations of embedded systems with multiple components

Run Automated Tests

Execute automated tests on embedded projects

Monitor Serial Output

Monitor the serial console output and logs in real-time

Interact with Hardware

Interact with virtual hardware components during simulation

Configuration

To configure your AI agent to use the Wokwi MCP server, add the following to your agent’s MCP configuration:
{
  "servers": {
    "Wokwi": {
      "type": "stdio",
      "command": "wokwi-cli",
      "args": ["mcp"],
      "env": {
        "WOKWI_CLI_TOKEN": "${input:wokwi-cli-token}"
      }
    }
  }
}

Authentication

You will need a valid Wokwi CLI token to use the MCP server. You can generate a token in the Wokwi CI Dashboard.
1

Generate Token

Navigate to the Wokwi CI Dashboard and create a new API token.
2

Configure Environment

Set the WOKWI_CLI_TOKEN environment variable to the token value in your MCP configuration.
3

Test Connection

Verify the connection by running a simple simulation command through your AI agent.
The MCP server is currently experimental and the API may change in future versions. Please report any issues or feedback to the Wokwi team.
For more information about the Model Context Protocol, visit the MCP documentation.

Build docs developers (and LLMs) love