hexforge-mcp
Click on "Deploy 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., "@hexforge-mcpevaluate 0x1000 + 0x200"
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.
hexforge-mcp
专为二进制安全 / 逆向工程场景打造的十六进制计算 MCP 服务器。让 AI 大模型把精确计算交给工具完成,不再靠"心算"做地址运算、进制转换和位操作。
特性
机器字语义:所有运算按 2^bits 取模回绕,模拟真实 CPU 寄存器溢出
双解释输出:每个结果同时给出 hex / 无符号十进制 / 有符号十进制 / 二进制
输入宽容:接受
0x41、4142、41 42、\x41\x42等常见格式安全求值:表达式基于 AST 白名单解析,杜绝代码注入
零依赖启动:只需 Python ≥ 3.10 和
mcp包
Related MCP server: mcp-capstone
工具一览
工具 | 用途 | 示例 |
| 算术/位运算表达式( |
|
| 进制转换(hex/dec/bin/oct),可选位宽有符号解释 |
|
| 循环移位 ROL / ROR |
|
| 字节序翻转(大小端互换) |
|
| 数值打包为字节(u8 |
|
| 字节解包为数值(pack 的逆操作) |
|
| 循环密钥 XOR(Shellcode 解码、混淆字符串还原) |
|
| 地址对齐(向上/向下/检查) |
|
evaluate 语义说明
/与//均为无符号整除(操作数按无符号机器字处理)>>为逻辑右移;<<移位超位宽时结果为 0(回绕语义)一元
-x等价于(-x) & mask,~x等价于mask ^ xbits参数 1~4096,默认 64
安装与配置
依赖:Python ≥ 3.10,pip install mcp(本项目仅用此一个依赖)。
Claude Desktop
在 claude_desktop_config.json 中加入:
{
"mcpServers": {
"hexforge": {
"command": "python",
"args": ["path/to/hexforge-mcp/hexforge_mcp/server.py"]
}
}
}Kimi Code / 其他 MCP 客户端
同上,command 为 python,args 指向 hexforge_mcp/server.py 的绝对路径即可。也可以在仓库根目录使用模块方式启动:
{
"mcpServers": {
"hexforge": {
"command": "python",
"args": ["-m", "hexforge_mcp.server"],
"cwd": "path/to/hexforge-mcp"
}
}
}安装为命令后也可以使用:pip install . 然后 command 填 hexforge-mcp。
开发与测试
# 单元测试(66 个用例)
python -m pytest -q
# 端到端冒烟测试:通过 stdio 真实启动 server 并调用工具
python tests/smoke_client.py项目结构
hexforge-mcp/
├── hexforge_mcp/
│ ├── core.py # 纯计算逻辑(不依赖 mcp,可独立测试)
│ └── server.py # FastMCP 入口,将 core 包装为 8 个 MCP 工具
├── pyproject.toml
└── README.mdLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
MCP server for hex.pm and hexdocs.pm: search, inspect, compare, and audit Elixir packages
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceEnables AI assistants to perform autonomous binary analysis, malware inspection, firmware analysis, and reverse engineering workflows through a production-ready Python MCP server connected to the ImHex hex editor.23-
- AlicenseNot gradedqualityCmaintenanceMCP server that provides disassembly and reverse engineering capabilities via the Capstone framework, supporting multiple architectures.MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server providing deterministic base conversions (binary, hex, octal, decimal, base64) for AI agents, eliminating hallucination risks in low-level data processing.83-
- FlicenseAqualityDmaintenanceMCP server providing computation, encoding, and note-taking tools for AI-assisted reverse engineering, including Python scripting in a sandboxed Docker container.18-