Community Go SDK for the Caido web proxy. Type-safe GraphQL client with domain-specific packages for requests, intercept, replay, findings, scopes, and more. Powers the Caido MCP server.

Source: caido-community/sdk-go

Architecture

Your Go Code  -->  sdk-go  -->  GraphQL (genqlient)  -->  Caido Instance (port 8080)

Built on Khan/genqlient for compile-time type safety. Every GraphQL query/mutation has a corresponding Go function with typed inputs and outputs.

Install

go get github.com/caido-community/sdk-go

Auth

Two options, same as the MCP server:

Personal Access Token:

client, err := caido.NewClient("http://localhost:8080", caido.WithPAT("your-token"))

OAuth device flow:

client, err := caido.NewClient("http://localhost:8080", caido.WithOAuth())

Domain Packages

The SDK is organized by Caido feature area:

PackageWhat it covers
requestsProxy history — list, get, filter with HTTPQL
interceptIntercept queue — list, forward, drop, toggle
replayReplay sessions — list sessions, get entries, send
findingsSecurity findings — create, list, delete, export
scopesTarget scopes — list, create
projectsProject management — list, select
environmentsEnvironment variables — list, select
workflowsWorkflow automation — list, run, toggle
tasksBackground tasks — list, cancel
filtersSaved filter presets — list
usersUser/auth info
pluginsPlugin management

Usage

package main
 
import (
    "context"
    "fmt"
 
    "github.com/caido-community/sdk-go"
)
 
func main() {
    client, err := caido.NewClient(
        "http://localhost:8080",
        caido.WithPAT("your-token"),
    )
    if err != nil {
        panic(err)
    }
 
    // List recent proxy requests filtered by host
    requests, err := client.Requests.List(context.Background(), &sdk.RequestFilter{
        HTTPQL: `req.host.eq:"target.com"`,
    })
    if err != nil {
        panic(err)
    }
 
    for _, r := range requests {
        fmt.Printf("%s %s -> %d\n", r.Method, r.Path, r.Response.StatusCode)
    }
}

HTTPQL

Caido’s query language for filtering requests:

req.host.eq:"example.com"
req.method.eq:"POST"
req.path.cont:"/api/"
resp.code.gte:400
resp.body.cont:"error"

Operators: eq, neq, cont, ncont, gte, lte, gt, lt. Combine with AND / OR.

Relationship to MCP Server

The Caido MCP Server is the primary consumer of this SDK. If you’re building custom Go tooling against Caido (scripts, integrations, CI pipelines), use the SDK directly. If you want AI assistant access, use the MCP server which wraps the SDK with tool definitions and credential management.

Use caseUse
AI assistant integrationCaido MCP Server
Custom Go scripts/toolssdk-go directly
One-off proxy queriesCaido CLI (built on sdk-go)