# Developer tools

Sign in to the sandbox Provenance MCP server with your console account to get sandbox keys, read your sandbox requests and webhook deliveries, and check your integration from your editor's AI.

Your editor's AI can get a sandbox key, read your sandbox requests and check your integration through Provenance MCP. You sign in once with your console account, on the sandbox server, `https://sandbox-mcp.provenanceauth.com`.

**Before you begin:** have a console account with the developer, admin or owner role, and add the sandbox server to your client ([connect a client](https://provenanceauth.com/docs/provenance-mcp/connect.md)).

The developer tools run only on the sandbox. They never read or write live data and never create a live key.

## Sign in

The client opens the console's **Connect an AI app** page the first time it asks for developer access:

1. Sign in to the console if you aren't already. A developer, admin or owner can connect an app; analysts and approvers can't.
2. Check the app's name, where it returns, and the account and environment.
3. Leave **Give you links to create sandbox keys** ticked if you want them, then choose **Connect**.

The connection lasts until you revoke it or leave the account. If your role changes, the next call uses your new role. A connection made to the earlier developer address is refused with a `401`; sign in again.

## Get a sandbox key

Ask your AI for a sandbox key. It calls `create_sandbox_key`, which returns a console link, never a key:

1. Open the link. It works for 15 minutes, once, signed in as you.
2. Check the name, products and expiry (30 days unless you asked for another, up to 90), then choose **Create key**.
3. Copy the key into your `.env` as `PROVENANCE_KEY`. The console shows it once.

The key never passes through the chat, the AI app's history or our request logs. Your AI can ask whether the link was used: it sees `pending`, `created` with the key's prefix and expiry, or `expired`. Keys made this way are listed and revoked in **Developers → API keys** like any other.

## Tools

| Tool | What it does |
| --- | --- |
| `api_read`, `api_write` | Run any public API operation as this connection (find it with `api_search`): sandbox writes run at once; a live key reads only |
| `get_developer_context` | Who the connection is: environment, account, the key or console sign-in and its scopes, your API version and the rate limit; `detailed` adds usage |
| `create_sandbox_key` | A console link where you create a sandbox key (console sign-in only) |
| `list_requests` | Your recent requests from the request log, filtered by status, path and time |
| `get_request` | One request with its bodies, redacted as stored |
| `list_webhook_deliveries` | Your recent webhook deliveries, each attempt with the status your endpoint answered |
| `check_integration` | Fixed checks over your recent sandbox requests and deliveries, each finding with request ids and the fix |
| `verify_token`, `get_policy`, `simulate_policy`, `trace_explain_decision` | Sandbox only: check a token or receipt, read and test your policy, explain a traced model decision |
| The docs tools | The [docs MCP](https://provenanceauth.com/docs/provenance-mcp/docs-mcp.md) tools, forwarded, so one connection is enough |

An API key made with **Developer tools in AI apps** opens these tools too, without a sign-in. A sandbox key lists every tool except the key link; a live key lists the read-only ones.

## Check your integration

Ask your AI to check your integration. `check_integration` reads your sandbox requests and webhook deliveries from the last 24 hours (or a window up to 7 days, or one key's requests) and runs fixed checks; nothing is graded by a model.

| Check | Finds |
| --- | --- |
| Keys | Requests with a revoked or expired key, or a live key sent to the sandbox |
| Scopes and plans | `403` for a scope the key lacks or a plan the account doesn't have |
| Validation | The same `400` on one path and field more than once, with the API's message |
| Idempotency | The same POST body sent again without an `Idempotency-Key`, or one key reused with another body |
| Version | Requests without `Provenance-Version` while your account is pinned to an older version |
| Webhooks | Failing deliveries with your endpoint's response codes; with `probe_webhooks`, an endpoint that accepts a wrong signature |
| Tokens | Verify calls with an expired or changed token |
| Flow | A checkout approval or capture request created and never checked |
| Rate limits | `429`s, and retries sooner than `Retry-After` |

Each finding has a severity, how many requests showed it, up to five request ids, what it means, the fix and a docs link. With no requests in the window it says so. The checks cover the requests your keys send, not the console's own.

The server forwards the docs tools to the docs MCP. If the docs MCP can't be reached, those tools answer `docs_unavailable` and the developer tools keep working.

## Errors you might see

| Symptom | Cause | Fix |
| --- | --- | --- |
| The docs tools answer [`docs_unavailable`](https://provenanceauth.com/docs/platform/errors.md#docs_unavailable) | The server couldn't reach the docs MCP | Retry, or add the docs MCP directly. |
| The key link says it expired or was used ([`key_draft_unavailable`](https://provenanceauth.com/docs/platform/errors.md#key_draft_unavailable)) | Links last 15 minutes and work once, for the member who asked | Ask your AI for a new link and open it signed in as yourself. |
| A tool answers `403` with `insufficient_scope` | You connected without **Give you links to create sandbox keys** | Connect again and leave that box ticked. |
| The consent page says you need another role ([`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)) | Analysts and approvers can't connect an app | Ask an admin for the developer role. |
| `401` on a connection that worked before | It was made to the earlier developer address | Sign in again from your client. |

## See also

- [Provenance MCP](https://provenanceauth.com/docs/provenance-mcp.md): who signs in and what each one sees.
- [Docs MCP](https://provenanceauth.com/docs/provenance-mcp/docs-mcp.md): the docs tools with no sign-in.
- [Validate your code](https://provenanceauth.com/docs/get-started/validate-integration-code.md): the rules `validate_code` checks.
- [Sandbox and test keys](https://provenanceauth.com/docs/get-started/sandbox.md): what a sandbox key reaches.
