Skip to main content

Fraime MCP Server

MCP server exposing the Fraime API to agentic workflows, built directly on top of the Fraime SDK's FraimeClient — which already is this server's entire data-access layer, so there's no separate repository/service indirection here: model.py holds the MCP tool schema, main.py holds the routing logic and the server itself.

Prerequisites

  • Python 3.11+
  • A running Fraime API instance (see api/README.md)
  • An MCP client to talk to this server (Claude Code, Claude Desktop, or anything else that speaks MCP over stdio)

Install

Option 1 — pip / uvx

pip install fraime-mcp
# or, to run it without installing into any project env:
uvx fraime-mcp

Pulls in fraime-sdk from PyPI automatically as a dependency.

Option 2 — from a local clone (development)

make install-mcp   # from repo root
# or
make install       # from mcp/

Creates .venv inside mcp/, installs fraime-sdk from the local ../sdk checkout, then installs this package.

Run

make run-mcp   # from repo root
# or
make run       # from mcp/

Runs the server over stdio (the standard MCP transport for locally-launched servers) — it won't print anything and will just wait for a client to connect; that's normal, not a hang.

Configuring an MCP client

Point your client at the installed console script. For Claude Code / Claude Desktop style config:

{
  "mcpServers": {
    "fraime": {
      "command": "/absolute/path/to/fraime/mcp/.venv/bin/fraime-mcp",
      "env": {
        "FRAIME_BASE_URL": "http://127.0.0.1:8000",
        "FRAIME_API_KEY": "your-api-key"
      }
    }
  }
}

command depends on how you installed it: the path above is for the local-clone install (Option 2). For a pip install fraime-mcp into your own venv, point command at that venv's bin/fraime-mcp instead; for uvx, use "command": "uvx", "args": ["fraime-mcp"].

FRAIME_API_KEY is only needed if the API has AUTH_API_KEY set — see api/README.md.

Tools

generate_video

Generates one video. Every parameter the API's /generate endpoint accepts is exposed, with rich field descriptions so an agent can fill it in without prior knowledge of the schema — shared prompt fields (subject, action, scene, camera, lighting, style, negative_prompt), the video-type-specific extras (dialogue, voice_tone, text_overlay, aspect_ratio, audio_reference, tempo_bpm, text_content, transitions), generation params (duration_s, fps, resolution, seed, num_inference_steps), and the model/performance knobs (model, reference_urls, vram_safety_margin, low_memory_decode, cpu_offload).

Fields that don't apply to the chosen video_type are simply ignored; two fields that are actually required for specific types (audio_reference for music_video, text_content for motion_graphics) return a clear tool error if missing, rather than a confusing failure downstream.

If the API has CLOUD_S3_OUTPUT_BUCKET configured (see api/README.md), the result's video_path will be null and s3_bucket, s3_key, and a presigned s3_url will be populated instead — otherwise those three are null and video_path points to the file on the API host as usual.

list_video_types

Returns every video_type and which extra fields it uses on top of the shared base — derived directly from the SDK's own typed field classes, so it can't drift out of sync with what generate_video actually accepts. Meant to be called first when an agent isn't sure which fields a given type needs.

get_models_config

Returns the model catalog the API host auto-selects from when generate_video is called without an explicit model — every catalog model's capabilities, VRAM requirements, license, and preferred_for video types, plus the capability requirements each video_type imposes on that selection. Backed by the API's GET /config/models via the SDK's get_models_config().

get_rules_config

Returns the prompt-structure rules the API enforces per video_type — the field guidance and evaluation criteria shared by every type, plus each type's own style guidance, extra fields, and additional criteria. Useful for an agent to see what makes a prompt score well before calling generate_video. Backed by the API's GET /config/rules via the SDK's get_rules_config().

Configuration reference

Env var Default What it controls
FRAIME_BASE_URL http://127.0.0.1:8000 Base URL of the Fraime API to call
FRAIME_API_KEY none Sent as Authorization: Bearer <key> if set

Both are read by the underlying FraimeClient — see sdk/README.md for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fraime_mcp-1.0.1.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fraime_mcp-1.0.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file fraime_mcp-1.0.1.tar.gz.

File metadata

  • Download URL: fraime_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for fraime_mcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1261b8cff597c16ccbdd4f44a377f13eb437189f4f8c89f3460463c199fb2ada
MD5 217139efaa4c70327d80fc49fa650d70
BLAKE2b-256 75449e71edcc18ed4720ef2db81b70507d09511194215fbff541af34d30d968f

See more details on using hashes here.

File details

Details for the file fraime_mcp-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: fraime_mcp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for fraime_mcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34402e1b34d0eff684ea6ced1138114097d6b291b4a406fce03ab67e773653c2
MD5 48b1dd129edddcdbfa8546879ea0796a
BLAKE2b-256 44504e310a3b4f20d9413ad44facca94eff569c4eed5fd83f36dd2357834d6b7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page