1.0.30 • Published 8 months ago

@digitalintermediate/flapi-mcp-server v1.0.30

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

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

1.0.30

8 months ago

1.0.29

8 months ago

1.0.28

8 months ago

1.0.27

8 months ago

1.0.26

8 months ago

1.0.25

8 months ago

1.0.24

8 months ago

1.0.23

8 months ago

1.0.22

8 months ago

1.0.21

8 months ago

1.0.20

8 months ago

1.0.19

8 months ago

1.0.18

8 months ago

1.0.17

8 months ago

1.0.16

8 months ago

1.0.15

8 months ago

1.0.14

8 months ago

1.0.13

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago