dynamic-discord-bot-api-mcp
Provides integration with Discord's HTTP API using bot token authentication, enabling AI agents to search and inspect Discord API endpoints, retrieve component schemas, and execute API calls such as sending messages and uploading files.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dynamic-discord-bot-api-mcpSend a message to channel 123456789012345678"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dynamic-discord-bot-api-mcp
Production-oriented stdio MCP gateway exposing stable Discord HTTP operations that explicitly support bot-token authentication. It installs a checked-in, self-refreshing OpenAPI catalog and exposes exactly five generic tools—never one tool per endpoint.
Discord's OpenAPI specification is a public preview and may be incomplete. This project consumes only stable openapi.json; official Discord documentation remains authoritative.
Scope and architecture
Refresh filters every operation by explicit BotToken security metadata, then applies a small fail-closed classifier for OAuth, interaction-token, webhook-token, Social SDK/lobby, and ambiguous routes. It retains only transitively referenced component schemas. Excluded endpoints cannot be searched, inspected, or called.
Gateway HTTP metadata such as /gateway/bot may remain because it supports bot authentication; Gateway WebSockets and events do not. Also excluded: OAuth exchange, bearer/user authorization, self-bots, Voice WebSocket/RTP, RPC, Activities/Embedded App/Social SDKs, interaction receivers/callbacks, incoming webhook servers, webhook-token execution, preview endpoints, and arbitrary HTTP requests.
Runtime resolves one active local MCP workspace root, reloads its .env before every call, and caches a client only while security-relevant configuration is unchanged. Schema refresh uses validation, atomic rename, concurrent coalescing, and cached fallback. JSON audit events go to stderr without values or secrets.
Related MCP server: discord-mcp
Install
npm install -g dynamic-discord-bot-api-mcp
discord-bot-api-mcpFrom GitHub:
npm install -g github:PrimeUpYourLife/dynamic-discord-bot-api-mcpMCP client configuration:
{"mcpServers":{"discord":{"command":"discord-bot-api-mcp"}}}Codex ~/.codex/config.toml:
[mcp_servers.discord]
command = "discord-bot-api-mcp"Place DISCORD_BOT_TOKEN in active repository .env. Process environment overrides startup-directory .env; active workspace .env overrides both. Multiple, failed, non-local, or non-directory MCP roots fail closed. Catalog tools need no token.
Five tools
discord_search_endpoints: fuzzy search IDs, methods, routes, categories, descriptions, and parameters.discord_get_endpoint: exact canonical ID or OpenAPI operation-ID lookup.discord_get_type: component-schema lookup.discord_call_endpoint: validate and execute a cataloged bot endpoint.discord_refresh_schema: fetch, filter, validate, and atomically install stable schema.
Examples:
{"search":"create message","limit":5}
{"endpoint":"create_message"}
{"endpoint":"POST /channels/{channel_id}/messages","pathParameters":{"channel_id":"123456789012345678"},"body":{"content":"Hello from MCP"}}Upload example:
{"endpoint":"create_message","pathParameters":{"channel_id":"123456789012345678"},"body":{"content":"image"},"files":[{"path":"./uploads/image.png","filename":"image.png","contentType":"image/png"}]}Uploads use payload_json and deterministic files[n] parts/attachment IDs. Paths resolve from active root and must remain within configured realpath roots. Base64 descriptors are also supported.
Validation separates path, query, and body values; handles required fields, nested objects, arrays, enums, nullable values, refs and unions. Snowflakes remain strings. Arrays become repeated query keys. DELETE and centrally classified destructive operations require confirm: true. Optional audit reason is percent-encoded.
Errors are structured (ENDPOINT_NOT_FOUND, ENDPOINT_NOT_ALLOWED, CONFIRMATION_REQUIRED, BOT_TOKEN_MISSING, VALIDATION_ERROR, DISCORD_API_ERROR, REQUEST_ERROR, project-root errors, or SCHEMA_REFRESH_FAILED). Discord numeric codes and nested validation errors are preserved; raw bodies, stack traces, and tokens are not.
Configuration
Variable | Default | Meaning |
| unset | Bot token; calls fail safely when absent |
|
| Fixed API origin |
|
| Comma-separated IDs/operation IDs with |
|
| Per-attempt timeout |
|
| Retry count |
|
| Local global safety rate |
|
| Local burst |
|
| Refresh threshold |
| bundled catalog | Alternate catalog path |
| active root | Platform-delimited upload roots |
|
| Per-file limit |
|
| Validation escape hatch |
|
|
|
Use narrow production allowlists. Caller cannot supply URLs, methods, authorization, or headers. Requests always use configured base URL plus catalog route, Authorization: Bot …, and valid package User-Agent.
Discord response headers and 429 payloads control per-route/bucket and global waits; limits are not hard-coded. Fractional retry_after is honored. 429s retry within configured bound. 5xx and transport retries are limited to safe GET requests, preventing duplicate messages or moderation actions.
Development
npm ci
npm run refresh-schema
npm run check
npm test
npm run buildTests mock network access. Daily workflow refreshes catalog and commits only generated-data changes. Manual publish workflow verifies tag/version and uses npm trusted publishing via GitHub OIDC; prereleases publish under next.
Available Tools
5 toolsdiscord_call_endpointB
Validate and call one cataloged Discord Bot HTTP endpoint.
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| files | No | ||
| reason | No | ||
| confirm | No | ||
| endpoint | Yes | ||
| pathParameters | No | ||
| queryParameters | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds some behavioral context beyond annotations: it indicates that the tool validates the endpoint before calling, and only 'cataloged' endpoints are allowed. However, it does not disclose the confirmation flow, potential side effects of calling, or any authentication/rate-limit considerations. The annotations already indicate non-read-only and open-world semantics, so the bar is lower, but there is room for more detail.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficiently worded sentence that front-loads the action and resource. It is appropriately concise, though given the tool's complexity it might benefit from more detail, but the structure itself is clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having annotations, the description is too sparse for a tool that executes external HTTP calls. It does not explain the purpose of the confirm flag, how files or body are used, what the reason field is for, or what outputs are expected. The absence of an output schema and 0% parameter coverage makes this description insufficient for safe and correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not compensate for the 7 parameters. It only mentions 'endpoint' by name without explaining its significance or the roles of body, files, confirm, reason, pathParameters, or queryParameters. This leaves the agent to infer meanings from parameter names alone, which is inadequate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Validate and call') and the resource ('one cataloged Discord Bot HTTP endpoint'). It distinguishes this tool from siblings by focusing on executing an endpoint rather than searching, retrieving, or refreshing schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives. It does not mention sibling tools or any prerequisites, exclusions, or decision factors. There is no 'use when' or 'instead of' context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
discord_get_endpointARead-only
Return normalized schema for one Discord Bot endpoint.
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, and the description adds 'normalized schema' indicating a read/transform operation. It does not describe behavior for invalid endpoints or pagination, but annotations cover the safety profile, so the description adds modest context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence with no filler. It is front-loaded with the verb and resource, earning every word.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple single-parameter tool with annotations and no output schema, the description is adequate but leaves gaps: no endpoint format guidance and no indication of return structure beyond 'normalized schema.' Sibling names help, but the description itself is minimal.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must explain the 'endpoint' parameter. It only says 'Discord Bot endpoint,' which does not clarify expected format (e.g., path, name, ID). The param name is somewhat self-explanatory but lacks critical detail for correct invocation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Return' and a resource 'normalized schema for one Discord Bot endpoint,' which clearly differentiates from siblings like discord_search_endpoints (search) and discord_call_endpoint (execute). It is concise and unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving a single endpoint's schema, but does not explicitly state when to choose this over siblings. No exclusions or alternatives are named; however, the word 'one' hints at distinct use from search or refresh.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
discord_get_typeCRead-only
Return one normalized Discord OpenAPI component schema.
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the read-only nature is covered. The description adds that it returns a 'normalized' schema and only 'one' schema, which gives some behavioral context. However, it does not describe error handling, what keys are returned, or the effect of an invalid type.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence with no redundancy. It clearly states the core action and object, earning high marks for efficiency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one parameter, no output schema, and minimal annotations, the description is too sparse. The key missing piece is the meaning of the 'type' parameter, and there is no guidance on usage, making the tool difficult to invoke correctly without additional context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema defines a single required 'type' parameter with no description (0% coverage), and the description does not explain what 'type' represents or how to format it. The agent is left to infer that 'type' is the schema type name, which is a significant gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Return' and resource 'normalized Discord OpenAPI component schema', which clearly identifies the tool's function. It distinguishes from siblings like discord_get_endpoint or discord_call_endpoint, though it doesn't explicitly name alternatives. The scope is constrained to a single schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no information on when to choose this tool over alternatives. It does not mention any exclusions, prerequisites, or relationships to sibling tools. The usage context is only implied by the tool's name and description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
discord_refresh_schemaAIdempotent
Fetch, validate, filter, and atomically install stable Discord Bot schema.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate non-readonly, idempotent, and open-world behavior. The description adds valuable context beyond annotations by disclosing that the process involves validation, filtering, and atomic installation, which implies safe replacement without partial states. No contradictions with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence with a clear sequence of verb-led actions, front-loaded with the primary verb 'Refresh' in the tool name and descriptive details. Every word earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless tool with no output schema, the description gives a complete lifecycle of the operation: fetch, validate, filter, and install atomically. It could specify return values or failure modes, but idempotence and open-world hints cover some context. The description is adequate for its simple scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema description coverage is 100%. The baseline for no parameters is 4, and the description does not need to add parameter details since there are none to document.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Fetch, validate, filter, and atomically install') and the specific resource ('stable Discord Bot schema'). It distinguishes itself from sibling tools focused on searching and calling endpoints, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this tool is used to refresh the Discord Bot schema to a stable version, but it does not explicitly state when to use it over alternatives or provide exclusions. No comparable tool is mentioned, so usage context is only inferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
discord_search_endpointsARead-only
Fuzzy-search cataloged Discord Bot HTTP API endpoints.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| search | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the read-only nature is covered. The description adds the 'fuzzy-search' behavior and the fact that it searches a catalog, which is useful context. However, it doesn't disclose result format, sorting, or any limitations of the fuzzy search.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, extremely concise, with the key verb and resource front-loaded. Every word earns its place, making it an efficient statement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity, the description is still incomplete: it omits parameter semantics, return value expectations, and any usage context relative to siblings. With zero schema property descriptions and no mention of search/limit, the agent cannot optimally select or invoke this tool without additional inference.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description never mentions the 'search' or 'limit' parameters. The word 'fuzzy-search' implies the search parameter's role, but 'limit' is entirely unexplained. The description provides no meaningful parameter information beyond what the schema exposes (types/defaults).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'fuzzy-search' and identifies the resource as 'cataloged Discord Bot HTTP API endpoints,' clearly distinguishing it from sibling tools like discord_get_endpoint and discord_call_endpoint by focusing on search over a static catalog.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives. The sibling list is present, but the description doesn't state e.g., 'Use this to discover endpoints before calling them with discord_call_endpoint.' Usage is only implied by the tool name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v1.0.0- First observed
discord_call_endpoint - First observed
discord_get_endpoint - First observed
discord_get_type - First observed
discord_refresh_schema - First observed
discord_search_endpoints
TDQS
Each tool serves a distinct function: searching, fetching endpoint schemas, fetching type schemas, calling endpoints, and refreshing the schema. There is no overlap or ambiguity between them.
All tool names follow a consistent verb_noun pattern with a discord_ prefix, using clear and uniform snake_case. The naming convention is uniform and predictable.
Five tools is an appropriate size for a focused Discord API schema management server. Each tool covers a core operation without unnecessary bloat or sparseness.
The tool set covers the full lifecycle: discovering endpoints, retrieving schemas, calling endpoints, and refreshing the local schema. No critical gaps are apparent for the server's intended purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
One AI endpoint to search and call 22k+ MCP servers; 50+ hosted tools work instantly, no key.
31
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server providing 26 tools for Discord API interactions, enabling message management, moderation, channel operations, and server inspection through Claude Code, Paperclip agents, or other MCP-compatible clients.26MIT
- AlicenseAqualityDmaintenanceMCP server for interacting with Discord via REST API, enabling guild, channel, and message operations using a bot token.7MIT
- AlicenseAqualityBmaintenanceMCP server over the real Discord REST API: 5 read-only tools plus 7 write tools gated off by default behind DISCORD_MCP_ENABLE_WRITE.12MIT
- AlicenseBqualityBmaintenanceA local MCP server that lets AI clients control a Discord bot via Discord's REST API, offering messaging, administration, and moderation tools. Includes safety features such as guild scoping, allowlists, and opt-in write permissions.20MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PrimeUpYourLife/dynamic-discord-bot-api-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server