MCP server

Connect ngram over MCP

ngram is a native Model Context Protocol server, so Claude, Cursor, Cline and any MCP-aware client can create videos, check status and read credits as tool calls. Point at the hosted endpoint or run it locally over stdio.

Overview

The Model Context Protocol is an open standard for connecting AI assistants to external tools. ngram exposes every public endpoint as an MCP tool with a typed schema the agent reads at connect time, so there is no glue code to write. There are two ways to connect: the hosted HTTP endpoint (recommended) or a local stdio process.

Connect to the hosted server

Point your MCP client at https://mcp.ngram.com and authenticate with Authorization: Bearer ngs_…. That is the entire setup — nothing to install. Create a key first in Settings → API keys.

Run it locally over stdio

Desktop clients that launch a local process can run the official package with npx and read the key from the environment. The package @ngramdata/mcp-server ships a single executable named ngram-mcp-server. It is distributed through GitHub Packages, so most teams prefer the hosted endpoint above unless they specifically need a local stdio process.

{
  "mcpServers": {
    "ngram": {
      "command": "npx",
      "args": ["-y", "--package=@ngramdata/mcp-server", "ngram-mcp-server"],
      "env": {
        "NGRAM_API_KEY": "ngs_your_key"
      }
    }
  }
}

Set NGRAM_API_KEY before launching. To target a staging or self-hosted ngram, override NGRAM_PUBLIC_API_BASE_URL (it defaults to https://www.ngram.com).

Tool catalog

Every ngram endpoint maps to a discrete tool. The agent reads the typed schema for each at connect time, so it can pick the right one without a docs lookup mid-conversation.

Account

  • get_account — return the authenticated ngram account.
  • get_credits_remaining — return the credit balance and plan.

Catalog

  • list_voices, list_styles, list_aspect_ratios, list_durations — the options a render can use.
  • list_animation_modes, list_scenarios, list_brand_kits — resolve modes, presets and your brand kits.

Videos

  • create_video_from_text and create_video_from_url — start a render from a prompt or a source URL.
  • prepare_video then create_video — preview the resolved settings, then confirm and generate.
  • get_video_status, list_videos, cancel_video — track, list and stop renders.

Images

  • create_image, edit_image, get_image_status, list_images — generate and edit images the same way.

Example prompts

Once connected, just ask in plain language — the agent picks the right tool:

  • "Make a 30-second product teaser for our pricing page and tell me when it's done."
  • "How many credits do I have left?"
  • "List my last five videos and their status."

MCP server FAQ

Ready to build?

Create a key in Settings and make your first call in minutes. The same key works across the REST API, MCP, Zapier, and n8n.