Skip to main content

Production-grade MCP server for fal.ai generative media workflows

Project description

Genvoy MCP

Genvoy is a production-grade MCP server for fal.ai media workflows.

It gives AI agents a safe, structured interface to:

  • discover fal.ai models,
  • estimate cost,
  • generate media,
  • compare outputs across models,
  • save outputs to local disk and optionally copy into a repo path.

Genvoy is built for local MCP usage first (BYOK: bring your own key).

What Genvoy Does

Core tools:

  1. search_models - find model IDs before generating (example: search flux).
  2. get_schema - see exactly which inputs a model accepts before calling it.
  3. estimate_cost - check likely cost first so you can decide to proceed or not.
  4. generate - create one output from one prompt and save it to a file path.
  5. generate_batch - create multiple variations on the same model in one call.
  6. generate_compare - run one prompt across multiple models to compare results.
  7. get_job_status - check progress for a previously submitted async request.
  8. cancel_job - stop a queued/running request you no longer want.

Resources:

  1. genvoy://models - quick read-only snapshot of model metadata.
  2. genvoy://recent - quick read-only snapshot of recent usage (Admin key required).

Compatibility bridge tools (added by FastMCP ResourcesAsTools transform):

  1. list_resources - lets clients discover resources even without native resource UI.
  2. read_resource - fetch resource content directly by URI.

Installation Modes

Mode A: Local Source (development)

Run directly from this repo:

uv run python -m genvoy.server

Mode B: Local Installed Package (still local)

Install package locally:

uv tool install .

Then run:

genvoy

Mode C: Published Package via PyPI (still local by default)

After publishing, users can install and run locally (uvx genvoy or local install).

Important: publishing to PyPI does not mean a shared hosted server. It still runs on each user's machine unless you deploy and host a central server yourself.

Local vs Hosted Model

Local MCP (current project focus)

  • each user runs Genvoy locally,
  • each user sets their own FAL_KEY,
  • billing is on each user's fal account.

Hosted shared MCP (optional future architecture)

  • one centralized server serves many users,
  • server key(s) are managed by you,
  • billing and multi-tenant auth become your operational responsibility.

Genvoy currently targets Local MCP.

Requirements

  • Python >=3.11
  • uv
  • fal.ai API key in environment

Optional:

  • fal.ai Admin API key scope if you need genvoy://recent / usage history.

Configuration

Create .env in repo root:

FAL_KEY="Key your_fal_key_here"

If you provide a key without Key prefix, Genvoy auto-normalizes it.

MCP Client Configuration

Use your client's MCP config to run local source:

{
  "mcpServers": {
    "genvoy": {
      "command": "C:\\Users\\HP\\Documents\\DAVID.DEV\\genvoy-mcp\\.venv\\Scripts\\python.exe",
      "args": ["-m", "genvoy.server"],
      "env": {
        "PYTHONPATH": "C:\\Users\\HP\\Documents\\DAVID.DEV\\genvoy-mcp",
        "FAL_KEY": "Key your_fal_key_here"
      }
    }
  }
}

Output Path Behavior (Important)

Genvoy resolves relative output paths from the MCP process working directory (cwd).

What this means:

  • in some IDEs, relative outputs may land in the IDE artifact/workspace folder,
  • not automatically in your project repo root.

Use one of these patterns when you want deterministic placement:

  1. set MCP cwd to your project root,
  2. pass explicit absolute output_path / repo_path,
  3. pass relative repo_path only when cwd is your repo root.

Security behavior:

  • path traversal outside allowed root is blocked with PATH_TRAVERSAL_BLOCKED.

Quick Validation Flow

In your MCP-enabled IDE, run:

  1. search_models for flux
  2. get_schema for fal-ai/flux/dev
  3. estimate_cost for count 1
  4. generate with an output_path
  5. list_resources then read_resource for genvoy://models

If using Admin scope key: 6. read_resource for genvoy://recent

Tool Contract Snapshot

search_models

  • inputs: query, optional category, optional cursor
  • compatibility alias: optional page (mapped to cursor)

get_schema

  • input: model_id

estimate_cost

  • input: model_id, optional count (default 1)

generate

  • input: model_id, prompt, output_path, optional repo_path, optional params
  • output: includes output_path, repo_path, media_type, cost_usd, duration_ms

generate_batch

  • input: model_id, prompt, count, output_dir, optional repo_dir, optional params
  • output: files[] and failed[]

generate_compare

  • input: model_ids[], prompt, output_dir, optional repo_dir, optional params
  • output: files[] and failed[]

get_job_status

  • input: request_id, model_id

cancel_job

  • input: request_id, model_id

Reliability and Safety

  • queue-first fal.ai execution (queue.fal.run)
  • SSE status stream with polling fallback
  • rate-limit mapping (RATE_LIMITED)
  • queue start timeout mapping (QUEUE_START_TIMEOUT)
  • usage scope mapping (ADMIN_KEY_REQUIRED)
  • non-blocking I/O (httpx async + aiofiles)
  • output filename collision handling (_1, _2, ...)

Development Commands

uv run ruff check .
uv run mypy genvoy
uv run pytest --cov --cov-report=term-missing

Documentation Map

License

MIT

Project details


Download files

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

Source Distribution

genvoy-0.1.0.tar.gz (119.9 kB view details)

Uploaded Source

Built Distribution

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

genvoy-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file genvoy-0.1.0.tar.gz.

File metadata

  • Download URL: genvoy-0.1.0.tar.gz
  • Upload date:
  • Size: 119.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for genvoy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d9356aee04600c5f75312cdb08e72351efa82a25ef5819c71fae89418e58dd5
MD5 88d1a5d264afc679d89a4a17a6422cc7
BLAKE2b-256 1757ded44d734102fdf45b2be68e29e8cef0276986c8c2fef41e9f427d344026

See more details on using hashes here.

Provenance

The following attestation bundles were made for genvoy-0.1.0.tar.gz:

Publisher: publish.yml on duvtant/genvoy-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file genvoy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: genvoy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for genvoy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f939a96c709c06de828f7e145d58b0b57c9c1165e58a888ab0f2db0bb0e9dbe3
MD5 6e350912c005db33aabf2e0395579acf
BLAKE2b-256 d74e96ac47ab822774e3f4da5b9d63a159cd0a748db3be0dfd3f8de4f434bd57

See more details on using hashes here.

Provenance

The following attestation bundles were made for genvoy-0.1.0-py3-none-any.whl:

Publisher: publish.yml on duvtant/genvoy-mcp-server

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page