Back to .md Directory

Using agent-trace with Windsurf

Shows how to configure Windsurf's MCP server to record tool calls using agent-trace for later replay and analysis.

May 2, 2026
0 downloads
4 views
agent mcp
View source

What this file does

Shows how to configure Windsurf's MCP server to record tool calls using agent-trace for later replay and analysis.

When to use it

  • You use Windsurf and want to debug or audit MCP tool calls
  • You need to replay a sequence of MCP interactions for testing
  • You want to capture MCP traffic without modifying your existing server setup

Assumes this stack

WindsurfMCPagent-tracePythonNode.js

Using agent-trace with Windsurf

How it works

Windsurf reads MCP server config from ~/.codeium/windsurf/mcp_config.json. agent-trace wraps the server command to capture every tool call.

Setup

1. Install agent-trace

# With uv (recommended)
uv tool install agent-strace

# Or with pip
pip install agent-strace

2. Edit your MCP config

Open ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "agent-strace",
      "args": [
        "record",
        "--name", "filesystem",
        "--",
        "npx", "-y", "@modelcontextprotocol/server-filesystem", "/tmp"
      ]
    }
  }
}

3. Use Windsurf normally

All MCP tool calls are captured in .agent-traces/.

4. Replay

agent-strace list
agent-strace replay
agent-strace stats

What's inside

4 setup steps, 2 install commands, 1 JSON config example, 3 replay commands

Change this for your project

  • Replace "/tmp" with the actual directory you want the filesystem server to access
  • Replace "filesystem" with your own MCP server name if different

Where it goes

Save as AGENTS.md in your repository root. Read by Codex, Cursor and other agents that follow the AGENTS.md convention.

Related Documents