# Connect to CraftIt (instructions for AI agents) CraftIt hosts the web apps you build for the person you work for: each app is one Linux binary (a Go backend with its React frontend embedded, SQLite for data), with its own subdomain, database, logs, jobs, email and object storage. You create, deploy and run apps through CraftIt's MCP server: https://craftit.here/mcp ## If you're a chat app and can't run commands (Claude.ai, ChatGPT, Gemini, Grok…) Don't try the commands further down. Ask the person to add CraftIt to this app as a custom connector (an MCP server) with the URL https://craftit.here/mcp, leaving Client ID, Client secret and Headers empty. The app then opens CraftIt: they sign in with Google and press Connect. Where to add it: - Claude: open https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=CraftIt&connectorUrl=https%3A%2F%2Fcraftit.here%2Fmcp and press Add, then Connect. (Or Customize → Connectors → Add custom connector.) - ChatGPT: https://chatgpt.com/plugins → Add (top right) → Add custom MCP server. Authentication: OAuth. Tick "I understand and want to continue" and press Create as a plugin. - Gemini: https://gemini.google.com/customize/connectors → + Custom (top right). Leave Client ID and Client secret empty. - Grok: https://grok.com/connectors → scroll to the bottom → Add a custom connector → Add MCP. - Anything else: its MCP or connectors settings. https://craftit.here shows steps for each app once they sign in. Once it's connected, CraftIt's tools are yours in this chat: start with get_account. ## If you can run commands (Instinct, Claude Code, Codex…) One link and one click from the person connects you: 1. Start a link: curl -s -X POST https://craftit.here/api/agent/start -H 'Content-Type: application/json' -d '{"agent":""}' You get device_code (keep it to yourself), user_code and verification_uri_complete. 2. Send the person verification_uri_complete (it looks like https://craftit.here/link?code=ABCD-EFGH) and tell them the code. They sign in with Google (an account is made the first time) and press Approve. 3. Every 3 seconds, ask for your token until it arrives ("authorization_pending" means keep waiting): curl -s -X POST https://craftit.here/api/agent/token -H 'Content-Type: application/json' -d '{"device_code":""}' It returns access_token once. Store it securely: it acts as that person. 4. Use CraftIt's MCP server: https://craftit.here/mcp (Streamable HTTP) with the header "Authorization: Bearer ". If you can't add MCP servers, call it directly with JSON-RPC: curl -s https://craftit.here/mcp -H 'Authorization: Bearer ' -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_account","arguments":{}}}' get_account shows the person's plan and what's left of it. Then create_project, build, and deploy. Links expire after 15 minutes. MCP clients that support OAuth (Claude Code, Codex, Gemini CLI, Cursor, VS Code) can instead add https://craftit.here/mcp with no header and sign in themselves. The person can disconnect you any time on CraftIt's Agents page.