kuna_mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kuna_mcpDecompile function sub_187d0 from /bin/ls"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kuna_mcp
kuna_mcp is a Python MCP server for targeted binary analysis with
Kuna. It exposes Kuna through MCP's
Streamable HTTP transport, so MCP clients communicate with it using JSON-RPC at
http://127.0.0.1:8000/mcp by default.
The project and Python package are named kuna_mcp; the installed shell command
uses the conventional executable spelling kuna-mcp.
Whole-binary decompilation is deliberately not exposed. Large binaries can take a long time and produce far more context than an AI can use safely.
MCP tools
list_functions— list functions as structured JSON, with pagination when Kuna returns a JSON list.decompile_function— decompile one function by name or hexadecimal VMA.decompile_functions— decompile a bounded list concurrently and return one response. Individual failures are preserved alongside successful results.
The server does not expose decompile-all or decompile-project.
Related MCP server: GhidraMCP
Release status
The current release is 0.1.0: the first usable version of kuna_mcp. The
server, installer, real Kuna integration, and HTTP transport are functional,
but the public MCP tool schemas may still evolve before the 1.0.0
compatibility milestone.
Install
Requirements are Python 3.10+, a Rust toolchain, make, and git.
./install.shThe installer initializes the Kuna submodule, runs make binaries and
make specs, creates .venv, and installs this package. Kuna's executable is
expected at kuna/decompiler/target/release/kuna and its specifications at
kuna/specs.
For Python-only development (using an existing Kuna installation):
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'Run over HTTP
.venv/bin/kuna-mcpOptions and their environment equivalents:
--host KUNA_MCP_HOST default: 127.0.0.1
--port KUNA_MCP_PORT default: 8000
--path KUNA_MCP_PATH default: /mcpExample:
.venv/bin/kuna-mcp --host 0.0.0.0 --port 8080The default loopback binding is intentional. If you bind to a public or shared
interface, put the server behind authentication and TLS; every authenticated
client can request reads of binaries allowed by KUNA_ALLOWED_BINARY_ROOTS.
Connect an MCP client to http://127.0.0.1:8000/mcp. The server uses stateless
Streamable HTTP with JSON responses; the MCP SDK performs initialization,
JSON-RPC validation, tool discovery, input-schema validation, and response
framing.
Use with an MCP client
Start kuna-mcp, then register the following Streamable HTTP endpoint in your
MCP client:
http://127.0.0.1:8000/mcpFor clients that accept JSON server configuration, the entry normally has this shape (the surrounding configuration filename varies by client):
{
"mcpServers": {
"kuna": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}Once connected, ask the client to list functions before requesting targeted decompilation. For example:
List the first 50 functions in /bin/ls with Kuna.
Decompile function sub_187d0 from /bin/ls.
Decompile addresses 0x187d0 and 0x18940 from /bin/ls in one request.The same flow can be exercised with the MCP Python client:
import asyncio
from mcp import Client
async def main():
async with Client("http://127.0.0.1:8000/mcp") as client:
functions = await client.call_tool(
"list_functions",
{"binary_path": "/bin/ls", "offset": 0, "limit": 10},
)
print(functions.structured_content)
asyncio.run(main())MCP Inspector
With Node.js available, start the server and connect the MCP Inspector to the URL above:
npx -y @modelcontextprotocol/inspectorConfiguration and limits
All values are read when the server starts.
Variable | Default | Purpose |
|
| Kuna executable |
|
| Compiled SLEIGH specifications |
| project root, | Allowed input roots, separated by |
|
| Timeout for each Kuna process |
|
| Maximum functions in one batch |
|
| Maximum simultaneous Kuna processes |
|
| Maximum stdout bytes per Kuna call |
Set the allow-list to every directory containing binaries the MCP may inspect:
KUNA_ALLOWED_BINARY_ROOTS=/samples:/opt/firmware .venv/bin/kuna-mcpResolved paths must remain below one of those roots, so symlinks cannot escape the allow-list. Kuna is always launched without a shell.
Example tool arguments
List functions:
{
"binary_path": "/bin/ls",
"mode": "auto",
"offset": 0,
"limit": 500
}Decompile by name:
{
"binary_path": "/bin/ls",
"function": "sub_187d0"
}Decompile several addresses in one request:
{
"binary_path": "/bin/ls",
"functions": ["0x187d0", "0x18940"],
"by_address": true,
"mode": "reliable"
}Test
Install the development dependencies and run the fast test suite:
.venv/bin/pip install -e '.[dev]'
.venv/bin/pytest -qThese tests use a controlled fake Kuna executable and an in-memory MCP client, so they validate command construction, pagination, validation, partial batch failures, structured MCP results, and exposed tool names without requiring a Kuna rebuild.
To test the relevant Kuna CLI surface itself:
source "$HOME/.cargo/env"
cargo test --manifest-path kuna/decompiler/Cargo.toml \
-p kuna-cli --test decompile_all_cliEnd-to-end HTTP test
Terminal 1:
.venv/bin/kuna-mcpTerminal 2:
.venv/bin/python scripts/http_smoke_test.py \
--url http://127.0.0.1:8000/mcp \
--binary /bin/lsThe smoke test connects through HTTP, initializes MCP/JSON-RPC, discovers the tools, lists functions with the real Kuna executable, and decompiles the first non-header function by address. A successful run exits with status zero.
Only analyze binaries you are legally authorized to inspect.
https://github.com/user-attachments/assets/47458d03-e454-43ab-acc8-2a4e57a201de
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceMCP server for reverse engineering that enables interaction with IDA Pro for analysis tasks such as decompilation, disassembly, and memory engagement reports.2446MIT
- Alicense-qualityDmaintenanceAn MCP server that allows LLMs to autonomously reverse engineer applications by exposing Ghidra's functionality, including decompiling binaries, analyzing code, and renaming methods and data.Apache 2.0
- Alicense-qualityDmaintenanceMCP server that integrates Ghidra for binary analysis, enabling decompilation, disassembly, and advanced reverse engineering tasks through Claude Code.13MIT
- Alicense-qualityAmaintenanceA multi-backend MCP server that exposes binary analysis capabilities from IDA Pro and Ghidra, allowing LLMs to directly drive reverse-engineering tools via natural language.138Apache 2.0
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
An MCP server for deep research or task groups
MCP server for Klever blockchain smart contract development.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pwn2dav/kuna_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server