Connect to a Trinity instance and configure MCP server. Authenticates via email OTP, provisions an MCP API key, and writes `.mcp.json` — no CLI installation required.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Connect to a Trinity instance and configure MCP server. Authenticates via email OTP, provisions an MCP API key, and writes `.mcp.json` — no CLI installation required.
disable-model-invocation
false
user-invocable
true
allowed-tools
Read, Write, Edit, Bash, AskUserQuestion
metadata
{"version":"1.3","created":"2026-05-27T00:00:00.000Z","author":"Ability.ai","changelog":["1.3: Next steps carry the deploy sequence — add the instance GitHub token (Settings → GitHub token) before /trinity:onboard, which deploys an agent from its GitHub repo","1.2: Explain the silent no-code failure mode — email OTP only reaches whitelisted addresses and the API 200s identically for unknown ones (anti-enumeration #186); self-signup is default-OFF (#1274) — so guide users to admin whitelisting instead of resend loops","1.1: Idempotent reconnect (PHASE 0) — when a valid profile already exists, (re)write `.mcp.json` in the current directory from the stored profile without an email round-trip, instead of just reporting 'already connected'. connect is now the single writer of `.mcp.json` that /trinity:onboard, /trinity:sync, and /trinity:loop delegate to","1.0: Initial version — connect to a Trinity instance via email OTP, provision an MCP API key, and write .mcp.json, with no CLI installation required"]}
/trinity:connect
ℹ️ First, set expectations: before anything else, print one short line with this skill's version and its most recent change — the top entry of metadata.changelog above — e.g. connect vX.Y — recent: <summary>. Then proceed.
Connect to a Trinity instance and configure MCP server. No CLI installation required.
Trigger
User wants to:
Connect to Trinity for the first time
Set up Trinity MCP integration
Authenticate with a Trinity instance
"connect to trinity", "trinity login", "set up trinity"
If 200 (profile valid): ensure .mcp.json in the current directory is present and correct before reporting done./trinity:connect is the single writer of .mcp.json — /trinity:onboard, /trinity:sync, and /trinity:loop delegate here rather than writing it themselves, so a valid profile must still (re)materialize the file for the current agent directory:
Derive the MCP URL and write the trinity server block from the stored profile's instance_url + mcp_api_key, exactly as in PHASE 6 — no email round-trip needed. If the file was already present and identical, leave it.
Report: "Already connected to {instance_url}. .mcp.json [written / refreshed / already current]. Reconnect with /mcp if it just changed. Run /trinity:connect --force to re-authenticate or switch instances." Then skip to PHASE 7 (verify) — do not re-run the email flow.
Expected: 200 OK (empty response or {"status": "sent"})
If error:
404: "This Trinity instance doesn't have email auth enabled. Contact your admin."
422: "Invalid email format."
Other: Show error detail
Tell user: "Verification code sent to {EMAIL}. Check your inbox (and spam folder)."
If no code arrives within ~2 minutes: the most likely cause is that {EMAIL} is not on the instance's whitelist — the API deliberately returns the same 200 for unknown emails (anti-enumeration, trinity#186), so a missing email is the only signal. The fix is admin-side: an instance admin adds the email to the whitelist, or the operator enables self-signup (PUBLIC_ACCESS_REQUESTS_ENABLED, default OFF since trinity#1274 — POST /api/access/request returns 403 until it's opted in). Tell the user exactly that instead of looping on resend.
Connected to Trinity at {INSTANCE_URL}
Profile: {PROFILE_NAME}
User: {USER.email} ({USER.role})
MCP: Configured in .mcp.json
Next steps:
1. Restart Claude Code to load the MCP server
2. Add your GitHub token on the instance (Settings → GitHub token — fine-grained
PAT, Contents: Read). Agents deploy by cloning their GitHub repo; private
repos need this, public repos don't.
3. Run /trinity:onboard from an agent directory to deploy it from its repo
4. Use mcp__trinity__list_agents to see your agents
Error Handling
Error
Response
Instance unreachable
"Cannot reach {URL}. Check the URL and your network connection."
Email not sent
"Failed to send verification email. Is this email registered on this Trinity instance?"
Invalid code
"Code invalid or expired. Would you like a new code?"
MCP key failed
"Logged in but couldn't provision MCP key. You can still use the Trinity CLI."
Config write failed
"Couldn't write to ~/.trinity/config.json. Check permissions."
Notes
Credentials are stored in ~/.trinity/config.json
The JWT token expires (check exp claim) but MCP API key is long-lived
Multiple profiles are supported - run again with a different URL to add another instance