Skip to main content
Glama

ffdecmcp

MCP (Model Context Protocol) wrapper for JPEXS Free Flash Decompiler (FFDec) - expose SWF decompilation and analysis tools to AI assistants like Claude.

Tools

1. decompile_swf

Decompile all ActionScript code from a SWF file to organized directory structure.

Parameters:

  • swf_path (required): Absolute path to SWF file

  • output_dir (required): Directory for decompiled scripts

  • timeout (optional): Timeout in seconds (default: 60)

2. extract_actionscript

Extract specific ActionScript classes by name (AS3 only). Faster than full decompilation when you only need specific classes.

Parameters:

  • swf_path (required): Absolute path to SWF file

  • class_names (required): List of class names (e.g., ['com.example.Main'])

  • output_dir (required): Directory for extracted classes

  • timeout (optional): Timeout in seconds (default: 60)

3. list_symbols

List all ActionScript classes and symbols in a SWF file. Great for exploring a SWF before full decompilation.

Parameters:

  • swf_path (required): Absolute path to SWF file

Returns: Structured JSON with packages, classes, and total count

4. extract_assets

Extract images, sounds, fonts, shapes, movie clips, and binary data from SWF.

Parameters:

  • swf_path (required): Absolute path to SWF file

  • output_dir (required): Directory for extracted assets

  • asset_types (optional): Types to extract - image, sound, font, shape, movie, binaryData, all (default: ["all"])

  • timeout (optional): Timeout in seconds (default: 60)

5. get_swf_metadata

Extract SWF header information (dimensions, frame rate, compression, etc.). Fast and doesn't require decompilation.

Parameters:

  • swf_path (required): Absolute path to SWF file

Returns: JSON with version, width, height, frame_rate, frame_count, compression

6. deobfuscate

Run FFDec's deobfuscation algorithms to remove obfuscation and anti-decompilation tricks.

Parameters:

  • swf_path (required): Absolute path to obfuscated SWF

  • output_path (required): Path for deobfuscated SWF

  • level (optional): Deobfuscation level - traps, deadcode, max (default: max)

  • timeout (optional): Timeout in seconds (default: 60)

Related MCP server: pyghidra-mcp

Quick Start

Prerequisites: Python 3.10+ and Java (for running the FFDec JAR).

Claude Code

claude mcp add ffdecmcp -- uvx ffdecmcp

That's it. On first run, FFDec will be auto-downloaded if not already installed.

Claude Desktop

Add to your config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "ffdecmcp": {
      "command": "uvx",
      "args": ["ffdecmcp"]
    }
  }
}

Standalone

# Just run it - FFDec will be auto-downloaded to ~/.ffdecmcp/ if needed
uvx ffdecmcp

# Or point to an existing FFDec installation
uvx ffdecmcp --ffdec-path /path/to/ffdec.jar

Installation

No installation is required when using uvx. For a permanent install:

uv pip install ffdecmcp
# or
pip install ffdecmcp

FFDec

FFDec is automatically downloaded on first run if not found. You can also install it manually.

The server finds FFDec in this order:

  1. --ffdec-path CLI arg / FFDEC_PATH env var

  2. Previously auto-downloaded JAR (~/.ffdecmcp/ffdec.jar)

  3. Common install locations and PATH

  4. Auto-download from GitHub

CLI Options

ffdecmcp [--ffdec-path PATH] [--timeout SECONDS]

Option

Env Var

Description

--ffdec-path

FFDEC_PATH

Path to FFDec (JAR, native binary, or WSL path)

--timeout

FFDEC_TIMEOUT

Default timeout in seconds (default: 60)

CLI arguments take precedence over environment variables.

Development

git clone https://github.com/sublimnl/ffdecmcp.git
cd ffdecmcp
uv pip install -e ".[dev]"

Example Usage in Claude

You: Can you analyze this SWF file for me?
Path: C:\Users\foo\game.swf

Claude will:
1. Use get_swf_metadata to check dimensions, version, etc.
2. Use list_symbols to see what classes are present
3. Use decompile_swf to extract all ActionScript code
4. Analyze the decompiled code and provide insights

References

License

MIT License - see LICENSE file for details

Contributing

Contributions welcome! Please open an issue or PR on GitHub.

Available Tools

6 tools
decompile_swfA

Decompile all ActionScript code from a SWF file.

This tool extracts and decompiles all ActionScript (AS2/AS3) code from a Flash SWF file, organizing the output into a directory structure that mirrors the package hierarchy.

Args: swf_path: Absolute path to the SWF file to decompile output_dir: Directory where decompiled scripts will be saved timeout: Optional timeout in seconds (default: 60)

Returns: Dictionary with: - success: Whether decompilation succeeded - swf_path: Input SWF file path - output_dir: Output directory path - script_count: Number of ActionScript files extracted - message: Success message

Example: >>> decompile_swf("/path/to/game.swf", "/path/to/output") { "success": true, "swf_path": "/path/to/game.swf", "output_dir": "/path/to/output", "script_count": 42, "message": "Successfully decompiled 42 ActionScript files" }

Inputs: swf_path (required), output_dir (required), timeout. Returns: object

deobfuscateA

Deobfuscate a SWF file by removing obfuscation techniques.

This tool runs FFDec's deobfuscation algorithms to remove common obfuscation techniques like dead code, traps, and other anti-decompilation tricks. The output is a cleaner SWF file that's easier to decompile and analyze.

Args: swf_path: Absolute path to the obfuscated SWF file output_path: Path where the deobfuscated SWF will be saved level: Deobfuscation level - 'traps' (remove traps only), 'deadcode' (remove dead code), 'max' (full deobfuscation, default) timeout: Optional timeout in seconds (default: 60)

Returns: Dictionary with: - success: Whether deobfuscation succeeded - input_path: Input SWF file path - output_path: Output SWF file path - level: Deobfuscation level used - message: Success message

Example: >>> deobfuscate("/path/to/obfuscated.swf", "/path/to/clean.swf", level="max") { "success": true, "input_path": "/path/to/obfuscated.swf", "output_path": "/path/to/clean.swf", "level": "max", "message": "Successfully deobfuscated SWF at level 'max'" }

Inputs: swf_path (required), output_path (required), level, timeout. Returns: object

extract_actionscriptA

Extract specific ActionScript classes by name from a SWF file.

This tool selectively extracts only the specified ActionScript classes (AS3 only), which is faster than full decompilation when you only need specific classes.

Args: swf_path: Absolute path to the SWF file class_names: List of fully-qualified class names to extract (e.g., ['com.example.Main', 'com.example.Utils']) output_dir: Directory where extracted classes will be saved timeout: Optional timeout in seconds (default: 60)

Returns: Dictionary with: - success: Whether extraction succeeded - swf_path: Input SWF file path - output_dir: Output directory path - requested_classes: List of requested class names - extracted_files: Number of files extracted - message: Success message

Example: >>> extract_actionscript("/path/to/game.swf", ["com.game.Main", "com.game.Player"], "/path/to/output") { "success": true, "swf_path": "/path/to/game.swf", "output_dir": "/path/to/output", "requested_classes": ["com.game.Main", "com.game.Player"], "extracted_files": 2, "message": "Successfully extracted 2 ActionScript files" }

Inputs: swf_path (required), class_names (required), output_dir (required), timeout. Returns: object

extract_assetsA

Extract images, sounds, fonts, and other assets from a SWF file.

This tool extracts non-code assets from a SWF file, including images, sounds, fonts, shapes, movie clips, and binary data.

Args: swf_path: Absolute path to the SWF file output_dir: Directory where extracted assets will be saved asset_types: Optional list of asset types to extract. Valid types: 'image', 'sound', 'font', 'shape', 'movie', 'binaryData', 'all' (default: ['all']) timeout: Optional timeout in seconds (default: 60)

Returns: Dictionary with: - success: Whether extraction succeeded - swf_path: Input SWF file path - output_dir: Output directory path - asset_types: List of asset types extracted - extracted_count: Number of assets extracted - message: Success message

Example: >>> extract_assets("/path/to/game.swf", "/path/to/output", asset_types=["image", "sound"]) { "success": true, "swf_path": "/path/to/game.swf", "output_dir": "/path/to/output", "asset_types": ["image", "sound"], "extracted_count": 127, "message": "Successfully extracted 127 assets" }

Inputs: swf_path (required), output_dir (required), asset_types, timeout. Returns: object

get_swf_metadataA

Extract metadata from a SWF file's header.

This tool reads the SWF file header to extract basic metadata like dimensions, frame rate, frame count, compression type, and Flash version. This is fast and doesn't require decompilation.

Args: swf_path: Absolute path to the SWF file

Returns: Dictionary with metadata including: - success: Whether extraction succeeded - swf_path: Input SWF file path - version: Flash version number - width: Stage width in pixels - height: Stage height in pixels - frame_rate: Frames per second - frame_count: Total number of frames - compression: Compression type (e.g., 'zlib', 'lzma', 'none') - Additional header fields as available

Example: >>> get_swf_metadata("/path/to/game.swf") { "success": true, "swf_path": "/path/to/game.swf", "version": 10, "width": 800, "height": 600, "frame_rate": 30, "frame_count": 1, "compression": "zlib" }

Inputs: swf_path (required). Returns: object

list_symbolsA

List all ActionScript classes and symbols in a SWF file.

This tool provides an overview of the ActionScript structure without decompiling, showing packages, classes, and the total symbol count. Useful for exploring a SWF before full decompilation.

Args: swf_path: Absolute path to the SWF file

Returns: Dictionary with: - success: Whether listing succeeded - type: ActionScript type (AS2, AS3, or Unknown) - packages: Dictionary mapping package names to class lists - classes: Complete list of fully-qualified class names - total_symbols: Total number of classes found - message: Summary message

Example: >>> list_symbols("/path/to/game.swf") { "success": true, "type": "AS3", "packages": { "com.game": ["Main", "Player", "Enemy"], "com.game.utils": ["Vector2D", "Math"] }, "classes": ["com.game.Main", "com.game.Player", ...], "total_symbols": 5, "message": "Found 5 AS3 classes in 2 packages" }

Inputs: swf_path (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct aspect of SWF analysis (metadata, symbols, deobfuscation, full decompilation, selective extraction, assets). No functional overlap, so an agent can easily choose the right tool.

    Naming Consistency4/5

    Most tools follow verb_noun pattern (e.g., decompile_swf, extract_assets). Only 'deobfuscate' deviates as a single verb, but it is still clear and consistent with the domain.

    Tool Count5/5

    6 tools cover the full SWF analysis workflow from metadata to full decompilation, well-balanced and neither sparse nor bloated.

    Completeness5/5

    The set covers all major SWF analysis needs: metadata, structure listing, deobfuscation, full code decompilation, selective class extraction, and asset extraction. No obvious gaps for standard reverse engineering tasks.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs to autonomously reverse engineer applications by exposing Ghidra's core functionality through MCP tools. Supports decompiling binaries, analyzing code structure, and automatically renaming methods and data.
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Exposes Ghidra reverse engineering capabilities via MCP, enabling LLMs and agents to analyze binaries, decompile, search, and edit programs headlessly or with GUI integration.
      468
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables LLMs to perform JVM bytecode analysis and editing by operating a Recaf workspace through MCP tools. Supports class browsing, decompilation, bytecode manipulation, search, cross-references, and refactoring operations.
      14
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for analyzing Android APK, DEX, or JAR files via a headless jadx engine, enabling LLM agents to query decompiled code, symbols, call graphs, and more.
      2
      GPL 3.0