2dai-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TWODAI_API_KEY | Yes | Your 2DAI API key | |
| TWODAI_API_BASE | No | API origin override (for self-hosted testing) | |
| TWODAI_PREVIEWS | No | Attach downscaled inline previews to finished generations | 1 |
| TWODAI_ALLOW_ANY_PATH | No | Allow file reads/writes outside the working directory | 0 |
| TWODAI_WAIT_BUDGET_MS | No | How long a generation call blocks before degrading to a queueId | 45000 |
| TWODAI_PREVIEW_MAX_SIDE | No | Longest edge of those previews, in px | 512 |
| TWODAI_IDEMPOTENCY_WINDOW_MS | No | Window in which an identical re-submit is treated as a retry, not a new charge | 30000 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_accountA | Show the connected 2DAI account: available credit, tier, and the API key's label, scopes and spend cap. Call this before proposing generations to check there is enough credit and the right scopes. |
| generate_imageA | Generate an image on the 2DAI account from a text prompt. This SPENDS the account's credit. Returns the finished creation when it lands within the wait budget, otherwise a queueId to poll with check_generation. Style and quality default to "auto" (the server picks by tier). |
| generate_with_refsA | Generate an image conditioned on existing creations. This SPENDS the account's credit. Four tools: "face-ref" keeps a face identity across new scenes (1-6 refs), "character-ref" keeps a whole character consistent (1-6 refs), "style-transfer" extracts the STYLE of the refs (1-3) and applies it to the prompt, "smart-edit" EDITS refs[0] following the prompt as the edit instruction (up to 3 extra support refs, 4 total). Reference ids come from earlier generations, upload_image or list_creations. Returns the finished creation within the wait budget, else a queueId for check_generation. |
| generate_videoA | Animate an existing still creation into a short clip. This SPENDS the account's credit — video costs several times an image. Takes ~1-3 minutes, so it usually returns a queueId to collect with check_generation rather than the finished clip. Durations: 5, 6.5 or 7.5 seconds (7.5 is tier-gated). |
| generate_similarA | Re-run an existing creation — the SERVER re-derives the original tool's parameters (prompt, style, quality, dimensions, references) from the stored row and submits a fresh generation. This SPENDS the account's credit at the usual price. The natural "make more like this one" verb: no parameters to reconstruct. Raw uploads and wallpaper-resize outputs can't be re-derived and are refused. Rapid identical calls within ~5s are deduplicated server-side, never double-charged. |
| generate_wallpaperA | Expand an existing creation into a wallpaper format — the original content is preserved and the surroundings are painted outward to fill the new shape. This SPENDS the account's credit: the price follows the chosen dimension, and quality is fixed at Ultra (there is no quality knob on this tool). Dimensions: "standard", "photo", "widescreen", "ultrawide" — unknown values are rejected. Optional extra refs and a prompt steer the newly painted areas. Returns the finished creation within the wait budget, else a queueId for check_generation. |
| check_generationA | Look up a generation by its queueId — the one returned when a generate_* call outlived its wait budget. Reports whether it is still running, and returns the finished creation once it lands. Costs nothing. |
| cancel_generationA | Cancel a generation that is still WAITING in the queue — its charge is refunded and the queue slot freed. Only works before processing starts: once a worker has picked the job up it cannot be aborted, and this returns an explanation with the current status instead. Costs nothing. |
| upload_imageA | Upload a local image (or base64 bytes) to the 2DAI cloud drive so it can be used as a reference for generation ("use THIS image"). Free, but the file goes through the platform's moderation pass — NSFW beyond the account's ceiling is rejected. Max 10 MB; jpeg/png/webp. Paths must stay inside the working directory unless the server was started with TWODAI_ALLOW_ANY_PATH=1. |
| download_creationA | Fetch a creation's media. With savePath the FULL-RESOLUTION asset is written to disk (the right extension is appended automatically) and the path is returned. Without savePath a downscaled preview image is returned inline so the model can look at it — full bytes never go through the context window. Write paths must stay inside the working directory unless TWODAI_ALLOW_ANY_PATH=1. |
| list_creationsA | Page through the account's creations, newest first — or pick ONE at random with random=true. Filter MODES are mutually exclusive: folderId ("root" for ungrouped) / trashed=true; an activity lens; a smart collection ("faces", "videos", "crop", "alpha", or "favorites" = creations inside starred folders); or sharedFolderId for a folder another user shared with this account. Cross-cutting filters combine with any mode: search (whole words over description + tags, trailing * makes a prefix), sort, hideFiled, and usedRef= for creations BUILT FROM that creation. Paginate by passing back nextBeforeDate (newest-first only) or with page. Rows carry nsfwFlagged/nsfwRate so you can apply your own content safeguards on top of the platform's. Each row has a viewUrl — the browser link to give the user (opens in their signed-in 2DAI drive). Costs nothing. |
| browse_feedA | Page through the 2DAI public feed — what creators across the platform have published, newest first. Useful for inspiration and trend scans. Rows belong to OTHER accounts (isOwner: false, prompts hidden); you can like them with organise_creation. NSFW-flagged rows are excluded unless includeNsfw is set, and every row carries nsfwFlagged so you can apply your own safeguards. Costs nothing. |
| list_foldersA | Page through the account's folders (collections). Use the folderId with list_creations to see a folder's contents, or with organise_creation to move something into it. Costs nothing. |
| manage_folderA | Folder CRUD plus sidebar organisation on the account's cloud drive (needs the "manage" scope; "list-groups" only needs "read"). "create" needs a title (optionally a groupId to create it inside a group). "rename" updates title and/or description. "delete" removes the folder — its creations detach to the drive root by default, or go to trash with trashContents=true; never a permanent delete. "set-favorite" stars/unstars a folder (starred folders feed the "favorites" smart collection). "set-poster" pins a creation as the folder cover (null clears it). "move-to-group" files the folder under a sidebar group (null detaches). Groups are the collapsible sidebar sections: "create-group" / "rename-group" take a title, "delete-group" only detaches its folders, "list-groups" shows them all. |
| organise_creationA | Organise creations on the cloud drive (needs the "manage" scope). "move" needs a folderId (or "root" to ungroup). "trash" is reversible; "restore" undoes it. "like"/"unlike" SET the like state — idempotent, a repeat is harmless, and any public creation can be liked too. "batch-trash"/"batch-restore" act on up to 100 ids in one call (reversible, like their single-creation forms). "delete" is PERMANENT, stays one creation per call by design, and only works on a creation already in trash — trash it first, and only delete when the user explicitly asked for permanent removal. |
| publish_creationA | Flip ONE creation's public visibility (needs the "publish" scope). Publishing puts it on the 2DAI public feed. Only the account's own AI generations can go public — raw uploads and NSFW-flagged creations are refused by the platform. Unpublish always works on a public row. Publish only when the user explicitly asked. |
| get_statsA | One consolidated read of the account's activity: creation counts and streak, storage use, generation volume and spend over a 30 or 90 day window (split by day, tool and origin), plus the most-used references, styles and keywords. The first line is a ready-made summary; the JSON block has the detail. Numbers come from a server-side cache — its age is reported, and a stale cache refreshes itself in the background. Costs nothing. |
| get_wallet_statusA | Read-only wallet snapshot: $2DAI token balance, USD credit, and the account's effective tier with the four signals it is derived from (explicit assignment, staking watermark, 24h hold watermark, live wallet value — the highest wins). Also flags any in-flight withdrawal, swap or staking lock. Needs the opt-in "finance" scope on the API key (enabled in the dashboard's key settings). No tool on this server can move money. |
| get_lockA | Read-only view of the account's staking lock: none, active (with time remaining), or expiring-soon (under 24 hours left). Needs the opt-in "finance" scope on the API key (enabled in the dashboard's key settings). Locks are managed in the dashboard, never here. |
| get_wallet_historyA | Read-only money history for the account. kind = "transactions" (deposits, withdrawals and swaps, newest first, paged), "balance" ($2DAI balance chart points over a window of days), "credit" (USD-credit chart points), or "sources" (where credit came from and went over a window: accrued, bonuses, swapped in, spent on generations). Needs the opt-in "finance" scope on the API key (enabled in the dashboard's key settings). |
| get_token_priceA | The cached $2DAI/USD quote. Works with the ordinary "read" scope — no finance scope needed. The quote is served from a cache and never triggers a live refresh, so treat it as indicative: the staleness is included so you can judge how current it is. Costs nothing. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/2DAICommunity/2dai-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server