Docs

Search G2X User Guide

Find a guide by task or topic. Use the arrow keys to choose a result.

Home
Docs home
Guides
  • Install the GovCon CLI
  • GovCon CLI commands
  • Use the GovCon CLI with coding agents
  1. Docs
  2. Use the GovCon CLI with coding agents

Use the GovCon CLI with coding agents

Give Claude Code, Cursor or Codex G2X research tools through the CLI's local MCP server and agent skill.

On this page
  • Add G2X to your coding agent
  • Add the agent skill
  • Hosted instead of local

Add G2X to your coding agent

govcon mcp serve runs an MCP server on your computer, and your coding agent starts it for you. It gives your agent the G2X research tools that only read, so nothing it does changes your G2X account, and it uses your sign-in from govcon login. Sign in first.

govcon mcp add sets it up. Here is what it prints for each agent (govcon 0.3.4):

Claude Code

Terminal
$ govcon mcp add claude
Connect G2X to Claude Code for all your projects:
  claude mcp add --scope user govcon -- govcon mcp serve
govcon mcp serve uses your sign-in from `govcon login`, so sign in first. Nothing secret is written into the host's configuration.

Cursor

Terminal
$ govcon mcp add cursor

This adds the server to ~/.cursor/mcp.json. Add --print to see the entry without changing anything:

{  "mcpServers": {    "govcon": {      "command": "govcon",      "args": [        "mcp",        "serve"      ]    }  }}

Codex

Terminal
$ govcon mcp add codex
Connect G2X to Codex:
  codex mcp add govcon -- govcon mcp serve
Or add this to ~/.codex/config.toml:
[mcp_servers.govcon]command = "govcon"args = ["mcp", "serve"]
govcon mcp serve uses your sign-in from `govcon login`, so sign in first. Nothing secret is written into the host's configuration.

If your agent can't find govcon, replace govcon in its settings with the full path that which govcon prints.

OptionMeaning
<host>claude, cursor, or codex
--printOnly print the configuration; change nothing
--directConnect the host straight to the G2X MCP server with a G2X sign-in, for hosts G2X has enabled

Add the agent skill

Install the G2X skill for Claude Code, Codex, or Cursor. The skill teaches your agent when and how to use govcon:

Terminal
$ govcon skills install --host claude,codex,cursor$ govcon skills list$ govcon skills install --global
OptionMeaning
--host <claude,codex,cursor>Hosts to install for. Default: every host with a folder in the target location.
--globalInstall into your home folder instead of the current project

Claude Code reads skills from .claude/skills. Codex and Cursor read them from .agents/skills.

Hosted instead of local

To use G2X from an AI agent in the browser, or to let an agent save work to your account, connect your AI agent to G2X's hosted server instead.

PreviousGovCon CLI commandsNextBuild with the G2X MCP server

On this page

  • Add G2X to your coding agent
  • Add the agent skill
  • Hosted instead of local

Share this guide