Skip to main content

Install

go get github.com/agnostai/agnost-go/agnost

Integrate

Call agnost.Track after adding your tools, before serving:
import "github.com/agnostai/agnost-go/agnost"

// your existing server setup...

err := agnost.Track(s, "your-org-id", &agnost.Config{
    Endpoint:      "https://api.agnost.ai",
    DisableInput:  false,
    DisableOutput: false,
})
if err != nil {
    log.Printf("analytics init failed: %v", err)
}

server.ServeStdio(s)
Get your org ID from app.agnost.ai.

Options

FieldTypeDefaultDescription
Endpointstringhttps://api.agnost.aiAPI endpoint
DisableInputboolfalseSkip tracking tool inputs
DisableOutputboolfalseSkip tracking tool outputs
IdentifyfuncnilReturn user identity from request context
LogLevelstring"info"debug, info, warning, error

What appears in Agnost

  • Tools for MCP tool invocations.
  • Raw logs for every tracked call.
  • Errors when a tool call fails.

Verify

Call one MCP tool from your client, then open app.agnost.ai. Check Raw logs first, then Tools.

Troubleshooting

  • Call agnost.Track after adding tools and before serving.
  • Confirm the org ID is correct.
  • Use DisableInput / DisableOutput if tool args or results are sensitive.