A Model Context Protocol (MCP) server for integrating FilmLight's FLAPI with Claude Desktop and other LLMs.
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.
- 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
- 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
-
connect_to_flapi()
: Establish connection to FilmLight API -
list_rules()
: View and understand system rules -
filmlight_gateway(operation, params)
: Execute FLAPI operations
-
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
-
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
-
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
The easiest way to use the FilmLight FLAPI MCP Server is with NPX:
npx -y @digitalintermediate/flapi-mcp-server@latest
- 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
# 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={}
)
# 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"
}
)
# 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"
}
)
# Get guidance on how to perform a complex operation
plan_operation(
operation="Scene.create",
params={}
)
If you encounter issues with the MCP server:
-
Connection issues: Ensure the FLAPI server is running and accessible
nc -z localhost 1985
-
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__)"
-
Running correctly but getting errors: Check rules with
list_rules()
to understand constraints
-
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
-
Contributions are welcome! Please ensure:
- All new tools follow the existing patterns
- Include comprehensive documentation
- Add appropriate rules for new functionality
- Provide tests for workflow templates
MIT License