@digitalintermediate/flapi-mcp-server

1.0.30 • Public • Published

FilmLight FLAPI MCP Server

A Model Context Protocol (MCP) server for integrating FilmLight's FLAPI with Claude Desktop and other LLMs.

Overview

The FilmLight FLAPI MCP Server provides a bridge between AI assistants and FilmLight's API (FLAPI) and command-line utilities. It allows AI systems to access and control FilmLight applications such as Baselight through a well-defined protocol, enabling intelligent automation of color grading and post-production workflows.

Key Features

  • Intelligent Workflow Management: Pre-defined workflows guide AI assistants through complex operations
  • Rule-Based System: Dynamically enforces constraints and requirements for operations
  • Proactive Guidance: Suggests appropriate tools and workflows based on user intent
  • Self-Documenting API: All tools and operations provide detailed documentation
  • Robust Error Handling: Comprehensive validation and error messaging
  • Smart Operation Suggestions: Recommends related operations and parameters

New in Version 1.0.28

  • Enhanced Tool Management: Improved implementation of tool usage functions with better suggestions and documentation
  • Workflow Templates: Added support for pre-built workflow templates with parameter validation
  • System Prompt Integration: Incorporated direct system prompt guidance through rulebook
  • Operation Completion: Enhanced autocomplete functionality for operations
  • Server Stability: Fixed critical server startup issues

Core Tools

FLAPI Connection and Operation

  • connect_to_flapi(): Establish connection to FilmLight API
  • list_rules(): View and understand system rules
  • filmlight_gateway(operation, params): Execute FLAPI operations

Discovery and Documentation

  • get_available_classes(): List all FLAPI classes
  • get_class_methods(class_name): View methods for a specific class
  • get_method_signature(class_name, method_name): Get detailed method information
  • get_documentation(command_name, operation, rule_id): Get help on any aspect of the system
  • get_tool_usage(tool_name, partial_operation): Get tool usage help or operation suggestions

Workflow Management

  • get_workflow_templates(): Discover pre-built workflow solutions
  • execute_workflow_template(template_name, params): Run a complete workflow
  • plan_operation(operation, params): Get guidance on complex operations

Rule Management

  • add_rule(rule_id, description, action): Add a new rule
  • edit_rule(rule_id, enabled, description, action): Modify existing rules
  • delete_rule(rule_id): Remove rules

Installation

Quick Start with NPX

The easiest way to use the FilmLight FLAPI MCP Server is with NPX:

npx -y @digitalintermediate/flapi-mcp-server@latest

Prerequisites

  • FilmLight software (Baselight, Daylight, etc.) installed
  • FilmLight Python virtual environment at /Library/Application Support/FilmLight/python/3.10.7-venv
  • FLAPI server running (default port 1985)
  • Node.js version 14.0.0 or higher

Usage Examples

Basic Connection

# Connect to FLAPI
connect_to_flapi()

# View rules and constraints
list_rules()

# Get hostname of the current machine
filmlight_gateway(
    operation="Application.get_hostname",
    params={}
)

Working with Jobs and Scenes

# Get a list of all jobs
filmlight_gateway(
    operation="JobManager.get_job_list",
    params={}
)

# Create a new scene
filmlight_gateway(
    operation="Scene.create",
    params={
        "jobid": "MyJob",
        "scene_name": "MyScene",
        "format": "HD 1080p 25"
    }
)

Using Workflow Templates

# Discover available templates
get_workflow_templates()

# Execute a template
execute_workflow_template(
    template_name="create_basic_job_and_scene",
    params={
        "job_name": "ProjectX",
        "scene_name": "Day1",
        "format": "HD 1080p 24"
    }
)

Intelligent Operation Planning

# Get guidance on how to perform a complex operation
plan_operation(
    operation="Scene.create",
    params={}
)

Troubleshooting

If you encounter issues with the MCP server:

  1. Connection issues: Ensure the FLAPI server is running and accessible

    nc -z localhost 1985
    
  2. Python environment issues: Verify the FilmLight Python environment

    /Library/Application\ Support/FilmLight/python/3.10.7-venv/bin/python3 -c "import flapi; print(flapi.__version__)"
    
  3. Running correctly but getting errors: Check rules with list_rules() to understand constraints

Development

Repository Structure

  • src/flapi_mcp/: Core Python package
    • server.py: Main MCP server implementation
    • rulebook.py: Rule management system
    • workflow_manager.py: Workflow templates and planning
    • flapi_introspection.py: FLAPI class and method introspection
    • resources/: Configuration files and templates

Contributing

Contributions are welcome! Please ensure:

  1. All new tools follow the existing patterns
  2. Include comprehensive documentation
  3. Add appropriate rules for new functionality
  4. Provide tests for workflow templates

License

MIT License

Package Sidebar

Install

npm i @digitalintermediate/flapi-mcp-server

Weekly Downloads

59

Version

1.0.30

License

MIT

Unpacked Size

718 kB

Total Files

36

Last publish

Collaborators

  • jackjonescolour