Connect

Datagoat has one API with two doors: MCP for AI assistants and agents, and REST for code, with Python and TypeScript SDKs on top. Both doors run the same operations and give the same answers. New here? The Quick start takes two minutes.

Get a key

  • To try it: datagoat signup, or POST https://api.datagoat.io/v1/agents/register with no credential. The test key (dgk_test_…) works on the sample records only.
  • For your own data: sign in at https://datagoat.io/keys and create a live key (dgk_live_…). Tick "Can report outcomes" if the key will report results.

Send it as Authorization: Bearer <key>. Keep live keys out of code; use DATAGOAT_API_KEY.

MCP

The server is https://api.datagoat.io/mcp (streamable HTTP). Hosts that support OAuth sign you in (your Datagoat account is created at first sign-in); others take a key as a Bearer header. Once Datagoat is listed in a host's connector directory, you can add it from there instead of pasting the URL.

Host How
Claude Code claude mcp add --transport http datagoat https://api.datagoat.io/mcp
Claude.ai / Claude Desktop Settings → Connectors → Add custom connector → https://api.datagoat.io/mcp
ChatGPT Settings → Apps → Advanced → Developer mode → add the URL
Cursor / VS Code add an HTTP MCP server with the URL
Codex CLI codex mcp add datagoat --url https://api.datagoat.io/mcp --bearer-token-env-var DATAGOAT_API_KEY
n8n MCP Client Tool node → the URL + a Bearer credential
LangGraph MultiServerMCPClient({"datagoat": {"url": "https://api.datagoat.io/mcp", "transport": "http"}})

Then ask: "Using Datagoat on sample:saas_churn, how likely is cust_0001 to churn, and why?" Or try another shape: "In Datagoat's sample:sensor_stream, which machines will fault in the next three days?"

Tools that only read (dg_ask, dg_poll, dg_preflight, dg_drift, dg_evidence, dg_verify, dg_describe) are marked read-only, so hosts can run them without a prompt. dg_add_dataset, dg_report_outcomes and dg_attest write, and dg_delete_dataset is destructive, so hosts ask first.

Agent skill

A drop-in skill teaches a coding agent (Claude Code, Codex and others) when to ask Datagoat, how to pick the question type and shape, and how to report an answer faithfully:

mkdir -p ~/.claude/skills/datagoat-ask
curl -s https://datagoat.io/skills/datagoat-ask/SKILL.md -o ~/.claude/skills/datagoat-ask/SKILL.md

For other agents, put SKILL.md wherever the agent reads skills. The skill uses the MCP server above, so connect that too.

Python and TypeScript

pip install datagoat           # Python 3.9+; CLI: datagoat
npm install @datagoat/sdk      # Node 20+

Both read DATAGOAT_API_KEY. See SDKs.

REST

POST https://api.datagoat.io/v1/<operation> with a JSON body. The OpenAPI document is at https://api.datagoat.io/openapi.json. See API reference.