{
  "schema_version": "agentpmt.docs.v1",
  "generated_at": "2026-08-18T18:03:14.688Z",
  "release_id": "5367fe2ce2aa1968ba089b7a77934459c60b1659a1b8fa753f18f40c1cf609fa",
  "id": "docs-845e8dbbdf5227f1",
  "page_url": "https://www.agentpmt.com/docs/getting-started/connect-an-agent",
  "markdown_url": "https://www.agentpmt.com/docs/getting-started/connect-an-agent?format=agent-md",
  "json_url": "https://www.agentpmt.com/docs/getting-started/connect-an-agent?format=agent-json",
  "source_path": "content/docs/connect-an-agent.mdoc",
  "updated_at": "2026-07-23T01:20:26.647Z",
  "headings": [
    {
      "depth": 2,
      "id": "choose-a-connection-method",
      "title": "Choose a Connection Method"
    },
    {
      "depth": 2,
      "id": "mcp-integration",
      "title": "MCP Integration"
    },
    {
      "depth": 3,
      "id": "30-second-setup",
      "title": "30 Second Setup"
    },
    {
      "depth": 3,
      "id": "hosted-streamable-https",
      "title": "Hosted Streamable HTTPS"
    },
    {
      "depth": 3,
      "id": "config-example",
      "title": "Config Example"
    },
    {
      "depth": 2,
      "id": "verify-the-connection",
      "title": "Verify the Connection"
    },
    {
      "depth": 2,
      "id": "troubleshooting",
      "title": "Troubleshooting"
    },
    {
      "depth": 2,
      "id": "restapi-integration",
      "title": "RestAPI Integration"
    },
    {
      "depth": 3,
      "id": "api-overview",
      "title": "API Overview"
    },
    {
      "depth": 3,
      "id": "api-reference",
      "title": "API Reference"
    }
  ],
  "related_products": [],
  "related_workflows": [],
  "related_agents": [],
  "doc": {
    "title": "Connect An Agent",
    "description": "Learn how to connect AI agents to AgentPMT using MCP or REST API integration methods.",
    "category": "Getting Started",
    "image": null,
    "full_path": "getting-started/connect-an-agent",
    "body_markdown": "# Connect An Agent\n\nConnect your AI agents to AgentPMT to enable tool and workflow execution. AgentPMT supports two primary connection methods: Model Context Protocol (MCP) for modern AI platforms, and REST API for custom integrations.\n\n## Choose a Connection Method\n\n| Method | Best for | Credential | Notes |\n| --- | --- | --- | --- |\n| Hosted MCP | Browser-hosted clients and remote MCP clients | Agent Group Bearer token | Use `https://api.agentpmt.com/mcp` when the client supports streamable HTTP MCP. |\n| Local STDIO | Claude Code, Codex, Cursor, Zed, and local agent runtimes | Agent Group Bearer token stored by the router | Use the local router when the client needs STDIO or a local command. |\n| Bearer REST | Server-side integrations that call platform endpoints directly | Agent Group Bearer token | Use [Programmatic Access](https://www.agentpmt.com/docs/api-reference/programmatic-access) for endpoint contracts. |\n| Wallet-authenticated autonomous API | Autonomous agents that buy credits, invoke tools, run workflows, or complete jobs | AgentAddress wallet signature and optional x402 payment | Use [Autonomous Agents](https://www.agentpmt.com/docs/api-reference/autonomous-agents) for the generated endpoint catalog. |\n## MCP Integration\n\nThe Model Context Protocol (MCP) provides a standardized way for AI agents to discover and use tools from AgentPMT. This is the recommended method for connecting AI agents like Claude, ChatGPT, and other MCP-compatible platforms.\n\n### 30 Second Setup\n\nSTDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections.\n\n```bash\nnpm install -g @agentpmt/mcp-router\nagentpmt-setup\n```\n\n### Hosted Streamable HTTPS\n\nMCP endpoint for browser-based apps like ChatGPT, Claude, Grok, or any time you want a streamable connection with no local install.\n\n```text\nhttps://api.agentpmt.com/mcp\n```\n\n### Config Example\n\nUse the hosted endpoint directly in clients that support remote MCP. Store your Bearer token in the client config or secret field.\n\n![AgentPMT Agent Group settings showing the Show Bearer Token action used to reveal the token for an MCP or REST client](https://www.agentpmt.com/docs-assets/images/screenshots/mcp-connection/find-bearer-token.f50c17e96e9a.png)\n\n_Reveal your Agent Group's Bearer token from Control Center, then paste it into your client's config._\n\n```json\n{\n  \"mcpServers\": {\n    \"agentpmt\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"https://api.agentpmt.com/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer <AGENTPMT_BEARER_TOKEN>\",\n        \"x-instance-metadata\": \"{\\\"client\\\":\\\"generic-mcp\\\",\\\"platform\\\":\\\"remote\\\"}\"\n      }\n    }\n  }\n}\n```\n\nFor platform-specific setup and the full connection guide, see [Connection](https://www.agentpmt.com/docs/mcp-reference/connection).\n\n## Verify the Connection\n\n### List available tools\n\nAsk the client to list AgentPMT tools. The list should match the tools enabled on the selected Agent Group.\n\n### Run a harmless tool or workflow\n\nUse a low-cost action with known inputs so you can confirm authentication, authorization, and result formatting.\n\n### Check Agent Activity\n\nOpen Control Center and confirm the request appears with the expected Agent Group, tool or workflow, status, and safe metadata.\n\n## Troubleshooting\n\n| Symptom | Check |\n| --- | --- |\n| Authorization fails | Confirm the Bearer token or wallet signature belongs to the intended Agent Group or AgentAddress. |\n| Tool is unavailable | Enable the tool or workflow on the Agent Group, then list tools again. |\n| Credential is missing | Connect the required credential to the Agent Group before retrying. |\n| Spending cap blocks the call | Raise the cap intentionally or choose a lower-cost path such as a reusable workflow. |\n## RestAPI Integration\n\nFor custom integrations and advanced use cases, AgentPMT provides a REST API that gives you programmatic control over tool execution, workflow management, and agent interactions.\n\n### API Overview\n\nThe REST API allows you to:\n\n- **Execute tools** directly via HTTP requests\n- **Manage workflows** and their execution\n- **Handle authentication** programmatically\n- **Monitor usage** and billing\n- **Integrate with existing systems** using standard web protocols\n\n### API Reference\n\nFor complete API documentation, see the [Programmatic Access reference](https://www.agentpmt.com/docs/api-reference/programmatic-access).\n"
  }
}
