Package Exports
- @prologue-ai/mcp
- @prologue-ai/mcp/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@prologue-ai/mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@prologue-ai/mcp
MCP (Model Context Protocol) server for Prologue AI. Lets AI agents generate images, video, audio, music, 3D, and more — using your org's credit balance.
Quick start
1. Get an API key
Open your org settings in Prologue (Settings > API Keys tab) and create a key. You'll see a key like sk-org-abc123... — copy it.
2. Add to your agent
Cursor — add to .cursor/mcp.json (use -y so npx does not prompt):
{
"mcpServers": {
"prologue": {
"command": "npx",
"args": ["-y", "@prologue-ai/mcp@latest"],
"env": {
"PROLOGUE_API_KEY": "sk-org-...",
"PROLOGUE_BASE_URL": "https://prologue.ai"
}
}
}
}When installing from the Cursor Marketplace as a plugin, Cursor merges the bundled mcp.json from this package; set PROLOGUE_API_KEY (and optionally PROLOGUE_BASE_URL for local dev) in your environment or MCP UI.
Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"prologue": {
"command": "npx",
"args": ["-y", "@prologue-ai/mcp@latest"],
"env": {
"PROLOGUE_API_KEY": "sk-org-..."
}
}
}
}Claude Code / any MCP client — same pattern: set the command and PROLOGUE_API_KEY env var.
Available tools
| Tool | Description |
|---|---|
list_models |
List available models. Filter by category (text-to-image, text-to-video, etc.) or search. |
get_model_schema |
Get input fields for a model. Pass model_ref from list_models (opaque prg_… id). |
get_model_pricing |
Estimated credits for a model (org pricing). Pass model_ref. |
generate |
Submit a job. Pass model_ref and input. Returns result or request_id for async jobs. |
enhance_prompt |
Enhance or rewrite a prompt. Can generate scripts, strategies, creative briefs. |
creative_enhance_image |
Analyze an image URL and return a creative, model-ready text prompt (enhanced_prompt). Use with generate + an image-to-image model_ref to apply the look. |
check_status |
Poll async jobs. Pass request_id and the same model_ref you used in generate. |
check_credits |
Check your org's credit balance. |
upload_file |
Prepare a file URL for use as generation input. |
Example workflow
Agent: list_models({ category: "text-to-image" })
→ Each model: model_ref (prg_…), label, description, credits_estimate
Agent: get_model_schema({ model_ref: "prg_…" })
→ JSON schema: prompt, aspect_ratio, num_images, etc.
Agent: generate({
model_ref: "prg_…",
input: { prompt: "a cat in a spacesuit", aspect_ratio: "16:9" }
})
→ Returns { images: [{ url: "https://..." }], creditsUsed: 10 }For long-running jobs (video, 3D):
Agent: generate({ model_ref: "prg_…", input: { prompt: "..." } })
→ { status: "queued", request_id: "abc-123" }
Agent: check_status({ request_id: "abc-123", model_ref: "prg_…" })
→ { status: "completed", video: { url: "https://..." } }Org API keys must use model_ref from GET /api/generate/models (with the same Bearer key). Raw provider paths are rejected for those requests.
Environment variables
| Variable | Required | Description |
|---|---|---|
PROLOGUE_API_KEY |
Yes | Your org API key (starts with sk-org-) |
PROLOGUE_BASE_URL |
No | API base URL (defaults to https://prologue.ai) |
PROLOGUE_MCP_ICON_URL |
No | URL shown as the MCP server logo in clients that support serverInfo.icons (defaults to https://prologue.ai/prologue-icon.svg) |
Logo / icon in Cursor
Cursor’s MCP list uses a letter placeholder for many custom servers. The Model Context Protocol allows the server to send optional icons during the connection handshake (initialize → serverInfo). This package now declares an icon pointing at your public Prologue mark (override with PROLOGUE_MCP_ICON_URL if needed).
Whether you see it depends on Cursor version and whether it renders serverInfo.icons for stdio servers. Official entries like Stripe/Supabase are often bundled in the app with their own artwork, which is why they always look polished. There is no separate icon field in mcp.json for arbitrary image uploads today—use the protocol icons URL (or a marketplace listing, if you publish there).
Credits
All generations deduct credits from your org wallet. Check your balance with check_credits and top up from the Prologue dashboard.
With type: "balance" (the default), GET /api/credits returns total balance plus org fields: nonExpiringBalance, monthlyRemaining, monthlyAllocation, autoTopupEnabled, autoTopupPackCredits, autoTopupPoolCredits, gaugeMode (monthly | auto_topup), and autoTopupRemainingPercent (set when the UI would show “auto top-up remaining”).
Cursor plugin layout (this repo)
This package follows the Cursor plugin template layout so it can be submitted to the Cursor Marketplace:
| Path | Purpose |
|---|---|
.cursor-plugin/plugin.json |
Plugin manifest (name, displayName, logo, mcpServers → mcp.json) |
mcp.json |
Default MCP server definition (npx -y @prologue-ai/mcp@latest + env placeholders) |
assets/logo.svg |
Marketplace / UI logo |
At the repository root (monorepo):
| Path | Purpose |
|---|---|
.cursor-plugin/marketplace.json |
Registers the plugin and points source at Model-gen/mcp-server |
Validate before submitting to Cursor:
# from repository root (Prologue-Gen2)
pnpm validate:cursor-plugin
# or: node scripts/validate-cursor-plugin.mjsSubmission: see Publish a Cursor Marketplace Plugin and the template README (email kniparko@anysphere.com or Slack per current Cursor docs).
Publish to npm
Prerequisites:
- An npmjs.com account logged in locally (
npm login). - The
@prologue-aiscope must exist and your user must have publish rights (create the org on npm or adjustnameinpackage.jsonif you use another scope).
From this directory:
pnpm install # or npm install
npm run build
npm publish --access publicprepublishOnly runs npm run build automatically. After publish, npx -y @prologue-ai/mcp@latest matches the plugin mcp.json in this package.
Development
cd Model-gen/mcp-server
pnpm install
pnpm buildWhy node dist/index.js prints nothing
The server speaks MCP over stdio (JSON-RPC on stdin/stdout). It is meant to be started by Cursor, Claude Desktop, or the MCP Inspector — not used as an interactive CLI.
To debug tools manually:
cd Model-gen/mcp-server
pnpm dlx @modelcontextprotocol/inspector node dist/index.jsSet PROLOGUE_API_KEY (and optionally PROLOGUE_BASE_URL) in the environment before starting the inspector, or configure them in the inspector UI if supported.
License
MIT