Agents

Connect Codex, ChatGPT, and API agents

Codex reads a local config file. API agents attach Artifact as a tool on each request.

Codex

Add the artifact server to ~/.codex/config.toml and paste the agent instructions into AGENTS.md in the project, or into ~/.codex/AGENTS.md for every project. Restart Codex after you save.

~/.codex/config.toml

[mcp_servers.artifact]
url = "https://app.artifactcomputing.com/mcp"
http_headers = { Authorization = "Bearer YOUR_ARTIFACT_TOKEN" }

OpenAI and ChatGPT API agents

Add Artifact to the tools array of each Responses API request, and put the agent instructions in the request’s instructions field. Integrations shows the block with your token filled in. ChatGPT workflows that can call an HTTP MCP server use that same tool.

Anthropic API

Add the MCP server and toolset on each Messages API request, and send the anthropic-beta header the Integrations page names. Put the agent instructions in the system field.

Grok and the xAI API

Add Artifact to the tools array of each xAI Responses API request. The tool uses your token as authorization and allows the five Artifact tools. Put the agent instructions in the system or instructions message.

API examples in this article use YOUR_ARTIFACT_TOKEN on purpose. Copy the configured block from Integrations so the live token is not retyped.