Repository navigation
feat(web): agent-driven MCP connect for Claude Code and Codex #34579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
wSedlacek
wants to merge
2
commits into
pingdotgg:main
from
wSedlacek:agent/openrig-agent-onboarding
+285
−5
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import { describe, expect, it } from "vite-plus/test"; | ||
|
|
||
| import { | ||
| claudeCodeConnectPrompt, | ||
| claudeCodeMcpCommands, | ||
| codexConnectPrompt, | ||
| codexMcpCommands, | ||
| } from "./agentConnectPrompt"; | ||
|
|
||
| const MCP_URL = "https://prod-a1.t3coderelay.com/mcp?x=1"; | ||
|
|
||
| describe("agent connect prompts", () => { | ||
| it("embeds the MCP URL in Claude Code and Codex commands", () => { | ||
| expect(claudeCodeMcpCommands(MCP_URL)).toEqual([ | ||
| `claude mcp add --transport http t3 ${MCP_URL}`, | ||
| "claude mcp login t3", | ||
| ]); | ||
| expect(codexMcpCommands(MCP_URL)).toEqual([ | ||
| `codex mcp add t3 --url ${MCP_URL}`, | ||
| "codex mcp login t3", | ||
| ]); | ||
| }); | ||
|
|
||
| it("gives each agent a pasteable prompt with add, login, and confirm steps", () => { | ||
| const claude = claudeCodeConnectPrompt(MCP_URL); | ||
| expect(claude).toContain(MCP_URL); | ||
| expect(claude).toContain("claude mcp add --transport http t3"); | ||
| expect(claude).toContain("claude mcp login t3"); | ||
| expect(claude).toContain("--no-browser"); | ||
| expect(claude).toContain("claude mcp list"); | ||
| expect(claude).toContain("t3_project_list"); | ||
| expect(claude).toContain("reload"); | ||
|
|
||
| const codex = codexConnectPrompt(MCP_URL); | ||
| expect(codex).toContain(MCP_URL); | ||
| expect(codex).toContain("codex mcp add t3 --url"); | ||
| expect(codex).toContain("codex mcp login t3"); | ||
| expect(codex).toContain("--no-browser"); | ||
| expect(codex).toContain("codex mcp list"); | ||
| expect(codex).toContain("configured servers"); | ||
| expect(codex).toContain("t3_project_list"); | ||
| expect(codex).toContain("reload"); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /** Copy-paste prompts and CLI commands so Claude Code or Codex can connect T3 over MCP. */ | ||
|
|
||
| export function claudeCodeMcpCommands(mcpUrl: string): readonly string[] { | ||
| return [`claude mcp add --transport http t3 ${mcpUrl}`, "claude mcp login t3"]; | ||
| } | ||
|
|
||
| export function codexMcpCommands(mcpUrl: string): readonly string[] { | ||
| return [`codex mcp add t3 --url ${mcpUrl}`, "codex mcp login t3"]; | ||
| } | ||
|
|
||
| export function claudeCodeConnectPrompt(mcpUrl: string): string { | ||
| return [ | ||
| "Connect this T3 Code environment over MCP so you can use its tools from this session.", | ||
| "Tell me what you will run before you change any MCP config, then:", | ||
| "", | ||
| ...claudeCodeMcpCommands(mcpUrl).map((command) => `- \`${command}\``), | ||
| "", | ||
| "If login opens a browser, wait for me to approve the sign-in page.", | ||
| "If there is no browser, use `claude mcp login t3 --no-browser`, give me the URL, and paste the final URL back when asked.", | ||
| "When `claude mcp list` shows `t3` as connected, try a read-only T3 tool such as `t3_project_list` in this session.", | ||
| "If those tools are not available yet, tell me to reload or start a new Claude Code session, then confirm again.", | ||
| "Only when a T3 tool works here, say you are ready and ask what I want to do in T3 Code.", | ||
| ].join("\n"); | ||
| } | ||
|
|
||
| export function codexConnectPrompt(mcpUrl: string): string { | ||
| return [ | ||
| "Connect this T3 Code environment over MCP so you can use its tools from this session.", | ||
| "Tell me what you will run before you change any MCP config, then:", | ||
| "", | ||
| ...codexMcpCommands(mcpUrl).map((command) => `- \`${command}\``), | ||
| "", | ||
| "If login opens a browser, wait for me to approve the sign-in page.", | ||
| "If there is no browser, use `codex mcp login t3 --no-browser`, give me the URL, and paste the final URL back when asked.", | ||
| "`codex mcp list` only shows configured servers; when it lists `t3` with OAuth, try a read-only T3 tool such as `t3_project_list` in this session.", | ||
| "If those tools are not available yet, tell me to reload or start a new Codex session (or check `/mcp` for active servers), then confirm again.", | ||
| "Only when a T3 tool works here, say you are ready and ask what I want to do in T3 Code.", | ||
| ].join("\n"); | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify the installation scope.
A project-scoped install does not make the skill available in other projects. The installer offers that scope, so the commands do not guarantee “any” session. Add
--globalto both commands, or explain the scope choice. (github.com)