Build and host a Discord bot with VS Code
Add Bot-Hosting to VS Code in one click and let GitHub Copilot deploy your Discord bot, read the real logs and fix crashes.
How to connect VS Code to Bot-Hosting
One click- Click the button: VS Code opens the Bot-Hosting server page. Click Install.
- When VS Code asks to sign in, click Allow, then sign in to Bot-Hosting.
- Open Copilot Chat, pick Agent and ask away. The Bot-Hosting tools are listed under Chat: Open Customizations, then Tools.
Needs GitHub Copilot in VS Code.
Steps checked in VS Code on November 5, 2026.
Prefer editing the config file?
Common VS Code issues and fixes
What people run into most when they add Bot-Hosting, and how to get past it.
VS Code says Cannot have more than 128 tools per request
VS Code allows 128 tools per chat request, and Bot-Hosting adds more than 70 on top of the built-in ones. Turn off tools or servers you don't need in Chat: Open Customizations > Tools (or Configure Tools in a Local session), or set github.copilot.chat.virtualTools.threshold.
Bot-Hosting needs authentication but VS Code never opens sign-in
Update VS Code, since 1.143 to 1.145 fixed sign-in for the default Copilot harness. Run MCP: List Servers, pick bot-hosting and choose Start Server or Restart Server. If no browser opens, start a chat with Local in Session Target and sign in there.
MCP servers are disabled by my organization in Copilot
On Copilot Business and Enterprise, the MCP servers in Copilot policy is off by default, which blocks every server. Ask your admin to enable it and, if they use an allowlist or registry, to allow the server URL. Copilot Free, Pro and Pro+ accounts are not affected.
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.
Where does VS Code save the Bot-Hosting server config?
VS Code reads it from your profile mcp.json (MCP: Open User Configuration, servers object) or from the Copilot Global file ~/.copilot/mcp-config.json (mcpServers object). For one project, use .vscode/mcp.json or .mcp.json at the workspace root.
Can I use Bot-Hosting with GitHub Copilot Free?
Yes. GitHub lists agent mode and MCP as included in Copilot Free, so you can connect Bot-Hosting without paying for Copilot. Agent requests count against the Free plan monthly limits.
How do I sign out of Bot-Hosting or remove it in VS Code?
Open Chat: Open Customizations, select MCP Servers, and use the menu on bot-hosting to Disable or Uninstall it. Run Authentication: Remove Dynamic Authentication Providers to clear the sign-in, and revoke VS Code in your Bot-Hosting dashboard under Developer, then My apps.
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.