How to integrate Vercel AI Gateway MCP with Atomic Agent

Connect Atomic Agent to Vercel AI Gateway MCP. List available vercel ai models and specs, generate marketing copy with vercel model, and more using natural language, with authentication handled for you.

Vercel AI Gateway logoVercel AI Gateway
Api Key

Vercel AI Gateway is a unified AI model gateway offering model discovery, inference, generation, and usage APIs. It provides a single, consistent API surface to route and scale model workloads across providers.

22 Tools

Introduction

Atomic Agent is an open-source AI agent that runs on your machine and supports local models through llama.cpp. Connect it to 1,500+ apps through Composio, including Vercel AI Gateway.

This guide uses Atomic Agent's built-in Composio integration. You need Atomic Agent v0.5.6 or later, your own Composio API key, and a Vercel AI Gateway account. See the Atomic Agent documentation for installation instructions.

Also integrate Vercel AI Gateway with

How Atomic Agent connects to Vercel AI Gateway

Atomic Agent connects to Composio's Tool Router over Streamable HTTP MCP. It discovers the tools needed for your request, and Composio handles account authentication.

Execution and account-connection tools follow Atomic Agent's configured approval policy. Review any approval prompt before allowing an action on your connected account.

Connect Vercel AI Gateway to Atomic Agent

  1. Sign up or sign in to the Composio dashboard. Copy your API key.
  2. In Atomic Agent, open the Integrations tab and select Composio. Select API key, press e, paste the key, and press Enter. The tools become available immediately, without a restart.
  3. Ask Atomic Agent to do something in Vercel AI Gateway. It searches Composio for the right tool.
  4. On first use, open the sign-in link returned in the chat. Connect your Vercel AI Gateway account, then return to Atomic Agent to continue.

Headless setup

Add the following line to ~/.atomic-agent/.env, replacing YOUR_COMPOSIO_API_KEY with your key. Start Atomic Agent after saving the file.

bash
COMPOSIO_API_KEY=YOUR_COMPOSIO_API_KEY

What is the Vercel AI Gateway MCP server, and what's possible with it?

The Vercel AI Gateway MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Vercel AI Gateway account. It provides structured and secure access so your agent can perform Vercel AI Gateway operations on your behalf.

Use Vercel AI Gateway from Atomic Agent

With your account connected, ask Atomic Agent to work with Vercel AI Gateway in natural language. You can connect more apps through the same Composio integration as you need them.

Visit the Atomic Agent website or inspect the Atomic Agent source code.

Troubleshooting

Why is my API key rejected?

Copy the key directly from the Composio dashboard. Atomic Agent requires ASCII characters because it sends the key in an HTTP header. Remove any extra characters introduced when copying.

Why are Composio tools unavailable after saving a key?

Check that you use Atomic Agent v0.5.6 or later and that Composio is enabled in your configuration. A "composio": { "enabled": false } setting disables the integration while keeping the saved key on disk.

Does Composio have a free plan?

The Hobby plan includes 100,000 tool calls per month. Composio-managed OAuth apps have a lower included allowance. See Composio pricing for the current limits that apply to your connection.

TOOLS

Supported Tools

Every Vercel AI Gateway action and event your agent gets out of the box.

Compact Response

Compact a long OpenAI Responses conversation into replayable context through Vercel AI Gateway.

Count Message Tokens

Estimate input tokens for Anthropic-format messages, system content, and tools before sending a model request through Vercel AI Gateway.

Create Anthropic Message

Create one non-streaming Anthropic Messages-compatible result through Vercel AI Gateway, with multimodal content, tools, extended thinking, and routing controls.

Create Chat Completion

Create one non-streaming OpenAI Chat Completions-compatible result through Vercel AI Gateway, with multimodal messages, tools, structured output, fallback models, and routing controls.

Create Embeddings

Generate OpenAI-compatible vector embeddings through Vercel AI Gateway for text or token inputs, with optional dimensions and routing controls.

Edit Images

Create edited images from up to 16 HTTPS or base64 data-URL source images and a text instruction.

Evaluate State

Evaluate one shared state against one or more typed choice, score, or boolean questions using an AI Gateway evaluation model.

Generate Images

Generate one or more images from a text prompt through an image-only Vercel AI Gateway model.

Generate Response

Generate one non-streaming OpenAI Responses-compatible result through AI Gateway, with optional instructions, tools, structured output, reasoning, and routing controls.

Generate Speech

Generate spoken audio from text through a Vercel AI Gateway speech model.

Get Credit Balance

Return the connected team's remaining AI Gateway credit balance and lifetime credit usage in USD.

Get Generation

Look up cost, token usage, provider routing, latency, and finish details for one completed Vercel AI Gateway generation.

Get Model

Return detailed capabilities, modalities, limits, tags, and pricing for one exact Gateway model ID.

Get Model Endpoints

Compare provider endpoints serving one Vercel AI Gateway model, including limits, pricing, caching, availability, throughput, and latency.

Get Spend Report

Query aggregated Vercel AI Gateway spend and token usage.

List Model Catalog

List AI Gateway model-to-provider routes and capability tags, with bounded local filtering by model text, provider, or tag.

List TypeSafe Models

List evaluation models available through AI Gateway's TypeSafe-compatible API, including each accepted model name, description, and release date.

Rerank Object Documents

Rank structured object documents by relevance through the Cohere v1 route, using selected rank fields and optionally returning each source document.

Rerank Text Documents

Rerank string documents through the current Cohere v2 compatibility endpoint.

Search Models

Search the AI Gateway model catalog by text, model type, and tags, returning capability and pricing metadata for matching models.

Transcribe Audio

Transcribe base64-encoded recorded audio through a Vercel AI Gateway transcription model.

Evaluate with TypeSafe API

Evaluate one shared state through AI Gateway's TypeSafe-compatible System One API.

FAQ

Frequently asked questions

With a standalone Vercel AI Gateway MCP server, the agents and LLMs can only access a fixed set of Vercel AI Gateway tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Vercel AI Gateway and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. Atomic Agent fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Vercel AI Gateway tools.

Yes, absolutely. You can configure which Vercel AI Gateway scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Vercel AI Gateway data and credentials are handled as safely as possible.

Start with Vercel AI Gateway.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Vercel AI Gateway tool your agent needs.Free to start.

Start building