> ## Documentation Index
> Fetch the complete documentation index at: https://docs.taskadmin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect an agent

> Give an AI agent the TaskAdmin tools.

## What the agent needs

1. The address: `https://api.taskadmin.ai/mcp`
2. An [API key](https://docs.taskadmin.ai/guides/api-keys.md), in its environment as `TASKADMIN_API_KEY`
3. A client that can call a remote MCP server over HTTP with an `Authorization` header

## As a remote MCP server

Most agent runtimes take a remote MCP server as an address plus headers. The shape is usually close to this. Check your runtime's own documentation for the exact keys.

```json theme={null}
{
  "mcp": {
    "servers": {
      "taskadmin": {
        "url": "https://api.taskadmin.ai/mcp",
        "headers": {
          "Authorization": "Bearer ${TASKADMIN_API_KEY}"
        }
      }
    }
  }
}
```

The endpoint has no sessions and no stream, so it needs nothing kept open.

## Without an MCP client

The endpoint is plain JSON over HTTP. An agent that can run a shell command or make an HTTP request can call a tool directly:

```sh theme={null}
curl -s https://api.taskadmin.ai/mcp \
  -H "Authorization: Bearer $TASKADMIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "list_tool_calls",
      "arguments": { "from": "2026-11-01", "to": "2026-11-30" }
    }
  }'
```

The tool's answer is JSON text in `result.content[0].text`.

## What to tell the agent

Put these in the agent's instructions or skill:

* Call `get_context` first. It says which agents the key reads and what today's date is.
* Answer from what the tools return. Say plainly when they return nothing.
* These tools only read. Never say you changed the website agent.
* Give the conversation link instead of pasting a transcript.
* Repeat a visitor's name, email or phone number only when the person asking needs that lead.
* Messages older than 60 days are gone. Say so instead of guessing.
* Never print the API key.

## Check it works

Ask the agent: "What can you read from TaskAdmin?" It should name your organization and its agents. Then look at the key's record in the dashboard. The request is there.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.