communication
Discord MCP Integration for OpenAI Agents SDK
Connect Discord to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Discord to OpenAI Agents SDK
Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.
Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with
--write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.
Discord MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"mcpServers": {
"kosmokrator-discord": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=discord",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=discord --write=deny Why Use KosmoKrator Here
Expose only Discord instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Discord Tools Visible to OpenAI Agents
OpenAI Agents sees stable MCP tool names generated from the Discord integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__discord__discord_list_channels | discord.discord_list_channels | Read | List all channels in a Discord guild. Returns channel IDs, names, types, and topics. |
integration__discord__discord_get_channel | discord.discord_get_channel | Read | Get information about a Discord channel by its ID. Returns the channel's ID, name, type, topic, and other properties. |
integration__discord__discord_send_message | discord.discord_send_message | Write | Send a message to a Discord channel. Supports text content and rich embeds. Returns the sent message ID and channel ID. |
integration__discord__discord_list_messages | discord.discord_list_messages | Read | Get messages from a Discord channel. Supports pagination with before/after and limit. Returns message IDs, content, author info, and timestamps. |
integration__discord__discord_list_guilds | discord.discord_list_guilds | Read | List guilds the current Discord user is a member of. Returns guild IDs, names, icons, and owner status. Use limit, before, and after for pagination. |
integration__discord__discord_get_guild | discord.discord_get_guild | Read | Get information about a Discord guild by its ID. Returns the guild's ID, name, icon, description, member count, and other properties. |
integration__discord__discord_get_current_user | discord.discord_get_current_user | Read | Retrieve the currently authenticated Discord user. Returns the user's ID, username, discriminator, and avatar. Useful for identifying which account or token is in use. |