How to Connect Action Gateway Toolspublic

Last verified 28 Sep 2026

Action Gateway gives applications and AI agents governed access to tens of thousands of tools through a managed MCP endpoint or SDK. See What You Can Build for example use cases of Action Gateway with Harness Runtime.

An Action Gateway session gives you an MCP endpoint (URL) with the tools and permissions you choose. Add the URL to your MCP client and authenticate with DigitalOcean to use those tools. You can create the session in the Control Panel or with DigitalOcean’s Python or TypeScript SDK.

For a guided setup with one read-only tool, use the Action Gateway Quickstart. Harness Runtime integration is documented separately in Connect Action Gateway to Harness Runtime.

Prerequisites

  • Access to Action Gateway.
  • A stable actor ID associated with the provider connections this session should use.

Some tools, including Exa web search and web fetch, require a positive prepaid balance. Prepayment is not required for every tool.

Connect an External MCP Client

Use the session URL with a client that supports remote Streamable HTTP MCP servers, such as a coding agent, OpenClaw, Hermes, or ChatGPT. Authentication setup and support for approval prompts depend on the client.

  1. Create an Action Gateway session in the Control Panel with the required actor, tools, and permission policy.
  2. Copy the session’s MCP endpoint.
  3. Register the URL as a Streamable HTTP MCP server in your client.
  4. Authenticate with DigitalOcean through your client’s browser sign-in flow.
  5. Restart the client or reload its MCP configuration if required, then confirm the server connects.

In the following commands, replace <action-gateway-session-mcp-url> with the copied endpoint.

For Codex, add the server and start browser sign-in:

codex mcp add action-gateway --url "<action-gateway-session-mcp-url>"
codex mcp login action-gateway

For Claude Code, add the server:

claude mcp add --transport http action-gateway "<action-gateway-session-mcp-url>"

In Claude Code, run /mcp, select action-gateway, and follow the browser sign-in prompts.

For calls that use ask, your client must support gateway approval; a connected MCP server does not by itself guarantee inline approval prompts.

Create a Session Using an SDK

Create a DigitalOcean personal access token authorized for Action Gateway in your team and make it available locally as DIGITALOCEAN_TOKEN. Do not paste the token into an agent conversation or commit it to source control.

The following examples create a session with one selected, read-only tool and explicit permissions for search and invocation. Replace <actor-id> with your stable actor ID. The printed URL is the endpoint to register with an MCP client.

Install PyDo:

pip install pydo

Create action_gateway_session.py with the following content:

import os

from pydo.action_gateway import ActionGatewayClient

gateway = ActionGatewayClient(token=os.environ["DIGITALOCEAN_TOKEN"])
session = gateway.session.create(
    actor_id="<actor-id>",
    tools=["digitalocean_size-list"],
    permissions={
        "default_action": "deny",
        "rules": [
            {"tool": "action_search", "action": "allow"},
            {"tool": "action_invoke", "action": "allow"},
            {"tool": "digitalocean_size-list", "action": "allow"},
        ],
    },
)
print(session.url)

Run the file to create the session and print its MCP URL:

python action_gateway_session.py

Install the DoTs build that includes Action Gateway support in your TypeScript project:

npm install @digitalocean/[email protected]

Add the following session creation code to your application and run it with your project’s TypeScript tooling:

import { ActionGatewayClient } from "@digitalocean/dots/action_gateway";

const gateway = new ActionGatewayClient({
  apiKey: process.env.DIGITALOCEAN_TOKEN!,
});
const session = await gateway.session.create({
  actorId: "<actor-id>",
  tools: ["digitalocean_size-list"],
  permissions: {
    defaultAction: "deny",
    rules: [
      { tool: "action_search", action: "allow" },
      { tool: "action_invoke", action: "allow" },
      { tool: "digitalocean_size-list", action: "allow" },
    ],
  },
});
console.log(session.url);

Find Tools in a Large Catalog

Use action_search to discover tools within the session’s selected catalog, then action_invoke to run one with its documented arguments. Search results do not expand permissions.

To access a third-party provider, authorize a connection for the session’s actor. To reuse a versioned collection of tools, create a Toolbelt.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.