Skip to content

Latest commit

 

History

History
114 lines (79 loc) · 2.11 KB

File metadata and controls

114 lines (79 loc) · 2.11 KB

Getting Started

Quick guide to get the Tetragon MCP Server running.

Quick Start

Development (Recommended)

make dev-setup
make dev-test

Access: http://localhost:30080

Docker

make docker-run

Access: http://localhost:8080

Production

helm install tetragon-mcp install/helm/tetragon-mcp/ \
  --namespace tetragon-mcp \
  --create-namespace

Basic Usage

HTTP Mode

# Health check
curl http://localhost:30080/health

# List resources
curl -X POST http://localhost:30080/mcp/v1/resources/list \
  -H "Content-Type: application/json" -d '{}'

# Query events
curl -X POST http://localhost:30080/mcp/v1/resources/read \
  -H "Content-Type: application/json" \
  -d '{"uri": "tetragon://events", "filters": {"limit": 10}}'

Stdio Mode

# Test stdio mode
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | \
  ./build/tetragon-mcp --stdio

# With config
./tetragon-mcp --stdio --config examples/dev-config.yaml

LLM Integration

./tetragon-mcp --stdio --config /path/to/config.yaml

Multi-Cluster Setup

Create config file:

clusters:
  - name: "prod"
    address: "prod-tetragon.example.com:54321"
    auth:
      type: "tls"
      tls:
        cert_file: "/etc/certs/prod.crt"
        key_file: "/etc/certs/prod.key"
        ca_file: "/etc/certs/ca.crt"

mcp:
  address: ":8080"

events:
  buffer_size: 50000
  retention_seconds: 7200

Run: ./tetragon-mcp --config multi-cluster-config.yaml

Troubleshooting

No Events

  • Check workloads: kubectl get pods -n tetragon-mcp
  • Check logs: kubectl logs -n tetragon-mcp deployment/tetragon-mcp

Connection Issues

  • HTTP: curl http://localhost:30080/health
  • Stdio: Test with echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | ./tetragon-mcp --stdio

Port Access

  • kind: Use http://localhost:30080
  • Port-forward: kubectl port-forward -n tetragon-mcp svc/tetragon-mcp 8080:8080

Next Steps