g1t/apps/docs/src/data/agents.ts
Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look | 1 | /** |
| 2 | * How each coding agent connects to g1t's MCP server, from each agent's own | |
| 3 | * documentation for adding a remote MCP server. The site's copy is | |
| 4 | * `apps/web/app/lib/agent-setup.ts`; keep the two in step. | |
| 5 | */ | |
| 6 | ||
| 7 | export const MCP_URL = 'https://mcp.g1t.sh'; | |
| 8 | ||
| 9 | export type AgentSetup = { | |
| 10 | label: string; | |
| 11 | /** The file the snippet goes in, or null for a terminal command. */ | |
| 12 | file: string | null; | |
| 13 | lang: 'sh' | 'json' | 'toml'; | |
| 14 | code: string; | |
| 15 | /** What to do after; Markdown is not parsed, `code` in backticks is. */ | |
| 16 | then: string; | |
| 17 | }; | |
| 18 | ||
| 19 | const json = (value: unknown) => JSON.stringify(value, null, 2); | |
| 20 | ||
| 21 | export const AGENTS: AgentSetup[] = [ | |
| 22 | { | |
| 23 | label: 'Claude Code', | |
| 24 | file: null, | |
| 25 | lang: 'sh', | |
| 26 | code: `claude mcp add --transport http g1t ${MCP_URL}`, | |
| 27 | then: 'Then run `/mcp` in Claude Code and choose g1t to sign in through your browser.', | |
| 28 | }, | |
| 29 | { | |
| 30 | label: 'Codex', | |
| 31 | file: null, | |
| 32 | lang: 'sh', | |
| 33 | code: `codex mcp add g1t --url ${MCP_URL}\ncodex mcp login g1t`, | |
| 34 | then: 'The login opens your browser to sign in to g1t.', | |
| 35 | }, | |
| 36 | { | |
| 37 | label: 'OpenCode', | |
| 38 | file: 'opencode.json', | |
| 39 | lang: 'json', | |
| 40 | code: json({ | |
| 41 | $schema: 'https://opencode.ai/config.json', | |
| 42 | mcp: { g1t: { type: 'remote', url: MCP_URL, enabled: true } }, | |
| 43 | }), | |
| 44 | then: 'OpenCode signs you in through your browser when it first connects; `opencode mcp auth g1t` starts it by hand.', | |
| 45 | }, | |
| 46 | { | |
| 47 | label: 'Cursor', | |
| 48 | file: '.cursor/mcp.json', | |
| 49 | lang: 'json', | |
| 50 | code: json({ mcpServers: { g1t: { url: MCP_URL } } }), | |
| 51 | then: 'Use `~/.cursor/mcp.json` for every project. Cursor signs you in through your browser when it first connects.', | |
| 52 | }, | |
| 53 | ]; | |
| 54 | ||
| 55 | /** The same, with a bearer token instead of signing in through the browser. */ | |
| 56 | export const AGENTS_WITH_TOKEN: AgentSetup[] = [ | |
| 57 | { | |
| 58 | label: 'Claude Code', | |
| 59 | file: null, | |
| 60 | lang: 'sh', | |
| 61 | code: `claude mcp add --transport http g1t ${MCP_URL} \\\n --header "Authorization: Bearer $G1T_TOKEN"`, | |
| 62 | then: '', | |
| 63 | }, | |
| 64 | { | |
| 65 | label: 'Codex', | |
| 66 | file: '~/.codex/config.toml', | |
| 67 | lang: 'toml', | |
| 68 | code: `[mcp_servers.g1t]\nurl = "${MCP_URL}"\nbearer_token_env_var = "G1T_TOKEN"`, | |
| 69 | then: '', | |
| 70 | }, | |
| 71 | { | |
| 72 | label: 'OpenCode', | |
| 73 | file: 'opencode.json', | |
| 74 | lang: 'json', | |
| 75 | code: json({ | |
| 76 | $schema: 'https://opencode.ai/config.json', | |
| 77 | mcp: { | |
| 78 | g1t: { | |
| 79 | type: 'remote', | |
| 80 | url: MCP_URL, | |
| 81 | oauth: false, | |
| 82 | headers: { Authorization: 'Bearer {env:G1T_TOKEN}' }, | |
| 83 | }, | |
| 84 | }, | |
| 85 | }), | |
| 86 | then: '', | |
| 87 | }, | |
| 88 | { | |
| 89 | label: 'Cursor', | |
| 90 | file: '.cursor/mcp.json', | |
| 91 | lang: 'json', | |
| 92 | code: json({ mcpServers: { g1t: { url: MCP_URL, headers: { Authorization: 'Bearer ${env:G1T_TOKEN}' } } } }), | |
| 93 | then: '', | |
| 94 | }, | |
| 95 | ]; |