Using AI Coding Agents

This guide explains how to connect AI coding agents such as Claude Code, OpenAI Codex, OpenCode, Cursor, ... to Hexabot through MCP, then use Hexabot-specific skills to generate actions and workflows.

1. What this setup gives you

The setup combines two layers:

  • Agent skills give the coding agent procedural knowledge about how to write Hexabot actions and workflows.

  • Hexabot MCP gives the coding agent live access to Hexabot through:

http://localhost:3000/api/mcp

Vercel Skills are reusable instruction packages for coding agents, and the npx skills CLI supports installing skills for several agents, including Claude Code, Codex, OpenCode, Cursor, and many others. (GitHub)

2. Prerequisites

You need:

  • Node.js + npx

  • Hexabot API running locally

  • A Hexabot account with access to the profile page

  • At least one AI coding agent installed

Start Hexabot normally, then open:

http://localhost:3000/profile

Generate an MCP token from your profile page.

Store it as an environment variable instead of hardcoding it in config files:

For Windows PowerShell:

3. Install the Hexabot skills

Install the two Hexabot skills:

Verify the installation:

4. Configure MCP by AI coding tool

4.1 Claude Code

Claude Code supports MCP servers over HTTP and lets you configure them globally, per user, or per project. Project-scoped MCP servers are stored in a .mcp.json file, and Claude Code supports environment variable expansion in url and headers, which is useful for keeping tokens out of the repository. (Claude)

Create a file at the root of your Hexabot workspace:

Add:

Then run:

Inside Claude Code:

Use /mcp to verify that the hexabot server is connected. Claude Code also supports adding HTTP MCP servers from the CLI with claude mcp add --transport http. (Claude)

Alternative CLI setup


4.2 OpenAI Codex CLI

Codex stores user-level configuration in:

You can also add project-specific configuration in:

Codex supports MCP server configuration in TOML, including HTTP MCP server URLs and bearer tokens loaded from environment variables. (OpenAI Developers)

Add this to ~/.codex/config.toml or .codex/config.toml:

Then run Codex from your Hexabot project:

Example prompt:


4.3 OpenCode

OpenCode uses JSON/JSONC configuration. You can define MCP servers under the mcp key, either globally in:

or per project in:

OpenCode remote MCP servers use type: "remote", url, optional headers, and an enabled flag. It also supports disabling OAuth auto-detection when using API-key-style bearer tokens. (OpenCode)

Create or update opencode.json:

Verify:

Then prompt OpenCode:


4.4 Cursor

Cursor supports MCP servers through .cursor/mcp.json for project configuration or ~/.cursor/mcp.json for global configuration. Cursor’s MCP docs show remote servers configured with url and optional headers, and it supports environment interpolation such as ${env:NAME} in url and headers. (Cursor)

Create:

Add:

Then in Cursor:

  1. Open Cursor Settings.

  2. Go to MCP / Model Context Protocol.

  3. Confirm that hexabot is listed.

  4. Enable it if needed.

  5. Open Agent mode and ask Cursor to use Hexabot MCP.

Example prompt:


4.5 Windsurf / Cascade

Windsurf Cascade supports MCP through the Cascade MCP settings and the raw config file:

For remote HTTP MCP servers, Windsurf uses serverUrl or url, plus optional headers. It also supports environment interpolation in serverUrl, url, and headers. (Windsurf Docs)

Open Windsurf settings, then go to:

Or edit the raw config file:

After saving, refresh the MCP servers in Windsurf.

Example prompt:


4.6 VS Code + GitHub Copilot Chat

VS Code stores MCP configuration in:

or in the user profile. VS Code uses a top-level servers object, not mcpServers, and supports HTTP MCP servers with type: "http", url, and headers. It also supports inputs for sensitive values such as API keys and tokens. (Visual Studio Code)

Create:

Add:

Then:

  1. Save .vscode/mcp.json.

  2. Click Start in the MCP config file.

  3. Open Copilot Chat.

  4. Select Agent mode.

  5. Confirm the MCP tools are visible from the tools menu.

GitHub’s MCP setup docs describe this flow: save the MCP config, start the server, open Copilot Chat, select Agent mode, and inspect available tools. (GitHub Docs)

4.7 Cline

Cline stores MCP settings in:

Cline supports local stdio MCP servers and remote servers configured with url, headers, disabled, and optional tool approval settings. (Cline Documentation)

Open Cline’s MCP settings:

Add:

Then ask Cline:

For Cline, prefer storing this in the user-level Cline settings rather than committing it to the project repository.


5. Suggested prompts for building Hexabot actions and workflows

Generate a new action

Generate a new workflow

Review an existing workflow

Generate action + workflow together


Use this workflow when asking an AI coding agent to build Hexabot automation:


7. Security recommendations

Keep MCP tokens out of Git. Prefer environment variables, input prompts, or user-level config files. VS Code, Cursor, Claude Code, and Windsurf all provide mechanisms to avoid hardcoding secrets in project files. (Visual Studio Code)

Use a dedicated Hexabot MCP token for AI coding tools. If the token is leaked, revoke it from the Hexabot profile page and generate a new one.

Treat MCP tools as powerful integrations. MCP authorization is strongly recommended when servers access user-specific data, perform audited operations, or expose administrative capabilities. (Model Context Protocol)

For shared repositories, commit only safe config templates, for example:

Never commit:


8. Troubleshooting

The agent cannot see Hexabot tools

Check that Hexabot is running:

Then restart or refresh the MCP server from your agent.

For VS Code, use:

VS Code provides MCP commands for listing servers, opening configuration, browsing resources, and resetting cached tools. (Visual Studio Code)

Authentication fails

Check that the token is exported:

Then regenerate the token from:

Cursor or Windsurf does not load the server

Check the config file location:

Cursor supports both project and global MCP config files; Windsurf uses ~/.codeium/windsurf/mcp_config.json. (Cursor)

Codex does not load the server

Check the TOML file:

Then ensure the server block is named correctly:

OpenCode does not authenticate

Run:

If you use a bearer token instead of OAuth, keep:

OpenCode supports debugging MCP authentication and disabling OAuth auto-detection for API-key-style servers. (OpenCode)


For Hexabot documentation, I would present Claude Code, Codex, OpenCode, Cursor, and Windsurf as first-class examples, then add VS Code Copilot and Cline as secondary MCP-compatible setups.

The simplest “golden path” is:

Then configure the agent with:

Once connected, the user can prompt:

Last updated

Was this helpful?