Examples

This page collects small companion projects that show how to use Dis.gg MCP in real integrations.

The examples are kept in separate repositories so they can be copied, run, and adapted independently from this documentation site.

Discord.js AI Bot #

Xenthys/ExampleBot is a minimal Discord.js bot that uses the OpenAI SDK and connects Dis.gg MCP as a remote MCP server.

It demonstrates how to:

  • reply when the bot is mentioned in a Discord server,
  • allow owner-only direct messages,
  • fetch Discord application owners from the Discord API,
  • pass current Discord context with X-Current-* headers,
  • restrict guild context with safe X-Target-* defaults,
  • compute X-Permission-Bits from the permissions shared by the user and bot,
  • delegate conversation history to the AI provider.

The example can run with native npm commands or Docker Compose.

Relevant documentation:

More examples can be added here later.