# Connect DecisionPing to an AI agent

DecisionPing is a remote MCP server for human notifications, approvals, choices, and text answers. Use it when an autonomous agent must ask a human and wait for an explicit response.

## Required values

- MCP transport: Streamable HTTP
- MCP URL: `https://mcp.decisionping.com/mcp`
- Authentication: `Authorization: Bearer dp_live_your_project_key`
- Agent-readable overview: `https://decisionping.com/llms.txt`
- Complete MCP documentation: `https://decisionping.com/docs/mcp`
- Registry manifest: `https://decisionping.com/server.json`

## Setup procedure

1. Ask the user to sign in at https://app.decisionping.com/.
2. Ask the user to create or open a project and generate a project API key.
3. Store that key securely. Prefer an environment variable named `DECISIONPING_API_KEY`.
4. Configure a remote Streamable HTTP MCP server named `decisionping` with the URL and Bearer header above.
5. Connect and list tools. The server exposes `notify`, `ask_user`, `get_request`, `wait_for_response`, and `cancel_request`.
6. With the user's knowledge, send one harmless confirmation request and wait for the response to verify the integration.

Do not request the user's DecisionPing account password. Do not commit or print the project API key. If the MCP client provides a secure secret prompt or environment-variable integration, use it.

## Generic configuration

```json
{
  "mcpServers": {
    "decisionping": {
      "url": "https://mcp.decisionping.com/mcp",
      "headers": {
        "Authorization": "Bearer ${DECISIONPING_API_KEY}"
      }
    }
  }
}
```

Client configuration schemas differ. Some clients call the root object `mcpServers`, others `servers`, and some use TOML. Preserve the same URL, Streamable HTTP transport, and Authorization header.

## Codex configuration

Put the API key in the environment as `DECISIONPING_API_KEY`, then add:

```toml
[mcp_servers.decisionping]
url = "https://mcp.decisionping.com/mcp"
bearer_token_env_var = "DECISIONPING_API_KEY"
tool_timeout_sec = 130
```

## Recommended verification

Call `ask_user` once with a unique `externalId`, save the returned request ID, then call `wait_for_response`. Treat only `status: answered` as the human decision. If status is still pending, wait again; do not create a duplicate request and do not infer consent.

## Tool selection

- Use `notify` for non-blocking information.
- Use `ask_user` for confirmation, choice, or text input.
- Use `wait_for_response` when work must pause for the human.
- Use `get_request` for a quick status check.
- Use `cancel_request` when the decision is no longer needed.

## REST fallback

If the agent does not support MCP, use `https://api.decisionping.com` with `X-API-Key: dp_live_your_project_key`:

- `POST /v1/requests`
- `GET /v1/requests/{requestId}/status`
- `POST /v1/requests/{requestId}/cancel`
