Build and host a Discord bot with Claude Code
One command adds Bot-Hosting to Claude Code. It deploys your Discord bot from the terminal, reads the real logs and fixes crashes.
How to connect Claude Code to Bot-Hosting
One command- Run the command in your terminal, outside a Claude session.
- Start Claude Code, type
/mcp, pick bot-hosting and choose Authenticate. - Sign in to Bot-Hosting in the browser window that opens, then ask away.
Steps checked in Claude Code on November 5, 2026.
Common Claude Code issues and fixes
What people run into most when they add Bot-Hosting, and how to get past it.
Bot-Hosting shows Needs authentication or Failed in /mcp
Needs authentication is normal before your first sign-in. Run /mcp, select bot-hosting and choose Authenticate, or run claude mcp login bot-hosting in your shell. For Failed to connect, run claude mcp get bot-hosting to see the error and check the server URL.
The sign-in browser does not open over SSH
Connect with ssh -t and run claude mcp login bot-hosting. With no local browser it prints the sign-in URL: open it on your own computer, sign in, then paste the full redirect URL from the address bar back at the prompt. Add --no-browser to force this.
Bot-Hosting is missing when I open another project
Without --scope user, claude mcp add saves at local scope, which loads only in that project. Run claude mcp remove bot-hosting --scope local, then add it again with --scope user. When a name exists in several scopes, local wins, then project, then user.
What your AI can do
Everything you do in the dashboard, asked in plain words.
Build and host your bot
It creates the deployment, writes the code, installs the packages and starts it.
Find and fix crashes
It reads the logs, explains why the bot stopped and fixes the file or the setting.
Manage the rest
Files, environment variables, packages, domains and resources, on request.
Stay in control
Secret variables stay masked, backups can be restored, and you can disconnect the AI at any time.
Try asking
Copy a request, paste it to your AI and watch it work.
Deploy this folder to a new Bot-Hosting deployment and start it.
My bot on Bot-Hosting crashed. Read the logs, fix the code here and deploy again.
Check that DISCORD_TOKEN is set as a secret variable on Bot-Hosting, then restart the bot.
Questions, answered.
Should I add Bot-Hosting at user or project scope?
User scope saves it in ~/.claude.json and loads it in all your projects. Project scope writes a .mcp.json file you can commit for your team. Each teammate approves it on first use, then signs in from /mcp with their own Bot-Hosting account.
How do I sign out or remove Bot-Hosting from Claude Code?
Run claude mcp logout bot-hosting to clear the stored sign-in, then claude mcp remove bot-hosting --scope user to delete the entry. To cut access on the Bot-Hosting side, revoke the app in your dashboard under Developer, then My apps.
Does Bot-Hosting work in the Claude Code VS Code extension?
Yes. The extension and the CLI share the same MCP configuration, so a server added with claude mcp add shows up there too. Type /mcp in the chat panel to check its status or manage the OAuth sign-in.
Is it free?
Yes. The MCP server comes with every Bot-Hosting account, free plan included. What your AI can create stays within your plan, like in the dashboard.
Other AI tools
Same account, same tools. Connect as many as you like.