Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I didn't want a stranger's code holding my Discord bot token, so I wrote my own MCP server

Описание и применение

Автор создал собственный сервер MCP для управления Discord‑ботом, чтобы не доверять токену стороннему коду. Сервис, работающий в Docker, предоставляет 67 инструментов с настройками безопасности и подробными сообщениями об ошибках.

Задача

The author needed a Discord bot management tool that did not expose the bot token to third‑party code, while still providing a wide range of administrative functions.

Результат

The self‑hosted MCP server provides 67 Discord management tools, strict safety settings, and clear error reporting, allowing the author to manage a real Discord server without exposing the bot token to external code.

Рабочий процесс

  • 1. Create a Discord bot with desired permissions. 2. Pull the discord‑mcp Docker image. 3. Store the bot token in a .env file. 4. Add the MCP server to Claude Code with the docker run command. 5. Optionally set READ_ONLY=true to inspect the server before enabling write tools.
  • 6. Use the MCP client to invoke tools such as audit_permissions, export_template, apply_template, etc.
  • 7. Monitor logs for permission errors or rate‑limit issues.
  • 8. Adjust configuration (READ_ONLY, ALLOWED_GUILD_IDS, DISABLED_TOOLS) as needed.

Доказательства

I wanted Claude Code to manage my Discord server. Create channels, sort out roles, clean up messages, check the audit log, the boring admin stuff.

Источник

Every one of them needs your bot token. My bot has admin-level permissions on a server with real people in it.

Источник

It's small enough to read end to end, it runs locally in Docker, and it only does what I put in it.

Источник

Three settings narrow down what the bot can do beyond its Discord permissions: READ_ONLY, ALLOWED_GUILD_IDS, DISABLED_TOOLS.

Источник

The first release with write tools came after a release that was only safety rails.

Источник

The README walks through that.

Источник

  • Дата записи: 2026-11-02T03:44:00.557Z