MCP Setup
Configure AI agents to connect to Complaintr via MCP.
AI agents connect to Complaintr through an MCP server.
Transport Methods
| Method | Used By | Setup |
|---|---|---|
| Remote (HTTP) | OpenCode | Connect to /api/mcp |
| Stdio | Claude, Cursor, Windsurf | Run via bun x @complaintr/mcp-server |
Remote (OpenCode)
Add to ~/.config/opencode/opencode.json:
{
"mcp": {
"complaintr": {
"type": "remote",
"url": "http://localhost:3000/api/mcp",
"enabled": true
}
}
}Stdio
Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Cursor
Add to .cursor/mcp.json in your project root.
Windsurf
Add to .windsurf/mcp.json in your project root.
Config
{
"mcpServers": {
"complaintr": {
"command": "bun",
"args": ["x", "-y", "@complaintr/mcp-server"],
"env": { "COMPLAINTR_API_URL": "http://localhost:3000" }
}
}
}Environment Variable
| Variable | Default |
|---|---|
COMPLAINTR_API_URL | http://localhost:3000 |
Verification
After configuring, ask the agent: "What MCP tools are available?" It should list report_complaint.
