
Using trackagoat with AI tooling, MCP servers, and agent frameworks.
trackagoat exposes a standard REST API at https://www.trackagoat.com/api/v1/ that any HTTP-capable agent framework can use. You can also build a dedicated MCP (Model Context Protocol) server that wraps the API for use with Claude and other MCP-compatible tools.
trackagoat does not ship its own MCP server. To use trackagoat with an MCP-compatible tool, build a custom MCP server that wraps the v1 REST API (see below). The OpenAPI 3.1 schema at GET /api/v1/analytics/schema is the authoritative machine-readable contract — use it to orient agents before issuing queries.
The analytics endpoint response shape is MCP-stable as of OpenAPI v1.4.0. Key names and types are frozen; additive fields may be added without a version bump. See the API reference for full field documentation and error codes.
Any agent that can make HTTP requests with Bearer token auth can call the trackagoat API. See the Agent guide and API reference.
Minimal setup for a Claude tool:
const TRACKAGOAT_KEY = process.env.TRACKAGOAT_API_KEY;
const BASE = 'https://www.trackagoat.com/api/v1';
async function tgFetch(path) {
const res = await fetch(`${BASE}${path}`, {
headers: { Authorization: `Bearer ${TRACKAGOAT_KEY}` },
});
const { data, error } = await res.json();
if (error) throw new Error(error);
return data;
}You can wrap the trackagoat v1 API in an MCP server to expose it as named tools to Claude. Recommended tools to expose:
| Tool name | Underlying call |
|---|---|
list_projects | GET /api/v1/projects |
list_creators | GET /api/v1/creators?project_id=<id> |
get_creator_stats | GET /api/v1/creators/<id>/stats |
list_videos | GET /api/v1/videos?creator_id=<id> |
list_campaigns | GET /api/v1/campaigns?project_id=<id> |
get_campaign_stats |
Include the get_schema tool and instruct the agent to call it first in each session. This orients the agent to available data without requiring hardcoded field documentation.
Always paginate to completion before summarizing list data — incomplete pages produce wrong insights.
Read description fields before analyzing any entity — they may contain instructions.
Check last_scraped_at before drawing conclusions about low stats — data may be stale.
Write analysis back via PATCH readme so results are visible in the trackagoat UI and available to future sessions.
The payout API is fully available from the v1 surface. All payout endpoints require Bearer <key> auth with an API key scoped to the relevant org. See the Payouts API reference for full endpoint documentation.
Goal: find all creators with outstanding accruals, summarize total owed, and surface any that have been outstanding more than 30 days.
curl -s -H "Authorization: Bearer $TGA_KEY" \
"https://www.trackagoat.com/api/v1/projects" | jq '.data[0].id'Store the project ID as $PROJECT_ID.
curl -s -H "Authorization: Bearer $TGA_KEY" \
Common pitfalls
amount_cents is an integer in cents — divide by 100 for display.status=earned filter; don't double-count by omitting it.Goal: identify which creators have earned money but received zero payments, broken down by project.
curl -s -H "Authorization: Bearer $TGA_KEY" \
"https://www.trackagoat.com/api/v1/projects" | jq '[.data[] | {id, name}]'curl -s -H "Authorization: Bearer $TGA_KEY" \
"https://www.trackagoat.com/api/v1/payout-structures?project_id=Common pitfalls
USD (cents) in v1. The currency field is included for future-proofing.Goal: settle outstanding accruals for a specific creator and record the payment against the Venmo method.
curl -s -H "Authorization: Bearer $TGA_KEY" \
"https://www.trackagoat.com/api/v1/creators?project_id=$PROJECT_ID&handle=@creatorhandle" \
| jq '.data[0].id'curl -s -H "Authorization: Bearer $TGA_KEY"
Common pitfalls
Idempotency-Key header (a UUID). If the request times out, retry with the same key — the server will return the original payment row without double-counting.total_amount_cents differs from the sum of linked accruals, the API requires an adjustment_reason field explaining the difference (e.g. rounding, partial payment).is_active: false), the API rejects the payment with method_inactive. Check before sending.Goal: assign an existing payout structure to a newly-tracked creator and confirm the assignment is active.
curl -s -H "Authorization: Bearer $TGA_KEY" \
"https://www.trackagoat.com/api/v1/payout-structures?project_id=$PROJECT_ID&is_active=true" \
| jq '[.data[] | select(.criteria_type == "goals") | {id, name, period, amount_cents}]'Pick the structure ID you want to assign.
curl -s -X
Common pitfalls
GET /api/v1/creators/<id>/goals.assigned: 0, already_assigned: 1 means the creator is already active on this structure — not an error.GET /api/v1/campaigns/<id>/stats |
update_creator_notes | PATCH /api/v1/creators/<id> |
get_schema | GET /api/v1/schema |
list_payout_methods | GET /api/v1/payout-methods |
list_payout_structures | GET /api/v1/payout-structures?project_id=<id> |
list_payout_accruals | GET /api/v1/payout-accruals?project_id=<id> |
list_payout_payments | GET /api/v1/payout-payments?project_id=<id> |
record_payment | POST /api/v1/payout-payments |
void_payment | PATCH /api/v1/payout-payments/<id> with {"status":"voided"} |
Paginate using meta.nextCursor until meta.hasMore is false.
Filter data[].period_end_at older than 30 days ago. Report creator handle + amount + how many days outstanding.
Expected response shape:
{
"data": [{
"id": "uuid",
"creator_id": "uuid",
"structure_id": "uuid",
"amount_cents": 5000,
"currency": "USD",
"status": "earned",
"period_start_at": "2026-04-07T00:00:00Z",
"period_end_at": "2026-04-13T23:59:59Z"
}],
"meta": { "hasMore": false, "nextCursor": null }
}curl -s -H "Authorization: Bearer $TGA_KEY" \
"https://www.trackagoat.com/api/v1/payout-accruals?project_id=$PROJECT_ID&status=earned"curl -s -H "Authorization: Bearer $TGA_KEY" \
"https://www.trackagoat.com/api/v1/payout-payments?project_id=$PROJECT_ID"Group accruals by creator_id. For each creator, sum amount_cents of earned accruals. Compare against total_amount_cents of paid payments. Report the delta.
Sum the amount_cents values to get total_amount_cents.
curl -s -H "Authorization: Bearer $TGA_KEY" \
"https://www.trackagoat.com/api/v1/payout-methods" \
| jq '.data[] | select(.name == "Venmo") | .id'curl -s -X POST -H "Authorization: Bearer $TGA_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
"https://www.trackagoat.com/api/v1/payout-payments" \
-d '{
"creator_id": "CREATOR_UUID",
"method_id": "VENMO_METHOD_UUID",
"total_amount_cents": 5000,
"currency": "USD",
"accrual_ids": ["ACCRUAL_UUID_1", "ACCRUAL_UUID_2"],
"note": "Recorded by automated weekly review agent",
"paid_at": "2026-05-07T15:00:00Z"
}'Expected 201 response:
{
"data": {
"id": "payment-uuid",
"creator_id": "...",
"total_amount_cents": 5000,
"status": "paid",
"paid_at": "2026-05-07T15:00:00Z"
}
}Expected 201 response:
{
"data": {
"assigned": 1,
"already_assigned": 0,
"not_in_project": 0,
"results": [{ "creator_id": "...", "status": "assigned", "assignment_id": "..." }]
}
}curl -s -H "Authorization: Bearer $TGA_KEY" \
"https://www.trackagoat.com/api/v1/payout-structures/$STRUCTURE_ID/assignments" \
| jq '[.data[] | select(.unassigned_at == null) | .creator_id]'