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 fileoutput_dir(required): Directory for decompiled scriptstimeout(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 fileclass_names(required): List of class names (e.g.,['com.example.Main'])output_dir(required): Directory for extracted classestimeout(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 fileoutput_dir(required): Directory for extracted assetsasset_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 SWFoutput_path(required): Path for deobfuscated SWFlevel(optional): Deobfuscation level -traps,deadcode,max(default:max)timeout(optional): Timeout in seconds (default: 60)
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:
--ffdec-pathCLI arg /FFDEC_PATHenv var- Previously auto-downloaded JAR (
~/.ffdecmcp/ffdec.jar) - Common install locations and PATH
- 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
- FFDec: https://github.com/jindrapetrik/jpexs-decompiler
- FFDec CLI Docs: https://github.com/jindrapetrik/jpexs-decompiler/wiki/Commandline-arguments
- Model Context Protocol: https://modelcontextprotocol.io
- FastMCP: https://github.com/jlowin/fastmcp
License
MIT License - see LICENSE file for details
Contributing
Contributions welcome! Please open an issue or PR on GitHub.
Metadata
Release files for ffdecmcp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ffdecmcp-0.1.2.tar.gz | 18.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ffdecmcp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.1 kB
Release files / ffdecmcp-0.1.2.tar.gz
| Download URL | ffdecmcp-0.1.2.tar.gz |
|---|---|
| Size | 18.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3384d0f7035458eb2d2d98d055d8758265a0d7326fbdc0c8a5ca485a30bc1417
|
|
BLAKE2b-256 checksum How to use checksums |
def6d4f9f6f23b4c7e4134ae2ba4e36d02013fa1dc1226c124541466aebef301
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"20.04","id":"focal","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ffdecmcp-0.1.2-py3-none-any.whl
| Download URL | ffdecmcp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b1bd2c29758197aa90f2146c4cb77c7e35b0897c74f1ad0e1bee622544782e4
|
|
BLAKE2b-256 checksum How to use checksums |
1ea945950585bf6d48c3063b296f42b47552c7910a80a05546d0077c81a3ab71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"20.04","id":"focal","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ffdecmcp 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.