Local Provider
Provider name: local
What It Does #
The local provider writes uploaded files on the Discord MCP host and returns a public URL for them.
This is useful when you want generated files to stay under your own control instead of being stored by an external upload service.
Typical Use Case #
Use local when you want the Discord MCP to:
- generate an image
- save the final file locally
- return a URL under your own domain or under the built-in
/uploads/...route
What You Can Configure #
Provider fields:
directory(optional, absolute path, default/app/uploads/{app_id})public_url(optional, must contain{filename})length(optional, random name length from6to32, default6)
Provider selection settings that can point to local:
image_uploaderdefault_image_uploaderuploaderdefault_uploader
In normal use, applications can only override length.
How It Resolves Paths #
- If
directorycontains{app_id}, the Discord MCP replaces it. - If
directorydoes not contain{app_id}, the Discord MCP uses it as-is. - If
public_urlis omitted, the Discord MCP builds a URL from the current site base URL and/uploads/{app_id}/{filename}.
Example with defaults:
- file path:
/app/uploads/123456789012345678/abC23d.png - returned URL:
https://mcp.dis.gg/uploads/123456789012345678/abC23d.png
Filename Behavior #
When X-Current-Message is provided, this provider names files after the
message snowflake:
- format:
{message_id}-{count}.{ext}(e.g.1485939749880594594-1.png) countstarts at1and increments until an unused name is found- multiple images generated in the same request get sequential numbers
When X-Current-Message is not provided, a random name is used instead:
- the random part uses a reduced character set without ambiguous characters
lengthcontrols the random part length- if a generated name already exists, the Discord MCP generates another one instead of overwriting the file
In both cases, the extension is derived from the content type when possible.
Important Notes #
directorymust be writable by the API process- the built-in
/uploads/...route only serves files that actually exist - invalid paths and traversal attempts are rejected