From 301c1849f88159fbd778ee19393506d7a14d0cc9 Mon Sep 17 00:00:00 2001 From: nblog <503407184@qq.com> Date: Wed, 12 Nov 2025 14:44:33 +0800 Subject: [PATCH 1/2] feat: add initial project configuration with python version and script entry point --- .python-version | 1 + bridge_mcp_hydra.py | 6 +++++- pyproject.toml | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .python-version create mode 100644 pyproject.toml diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..2c07333 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11 diff --git a/bridge_mcp_hydra.py b/bridge_mcp_hydra.py index 590a3c0..6ff6802 100644 --- a/bridge_mcp_hydra.py +++ b/bridge_mcp_hydra.py @@ -2106,7 +2106,7 @@ def functions_set_comment(address: str, comment: str = "", port: int = None) -> # ================= Startup ================= -if __name__ == "__main__": +def main(): register_instance(DEFAULT_GHIDRA_PORT, f"http://{ghidra_host}:{DEFAULT_GHIDRA_PORT}") @@ -2123,3 +2123,7 @@ if __name__ == "__main__": signal.signal(signal.SIGINT, handle_sigint) mcp.run(transport="stdio") + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..45e340a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,21 @@ +[project] +name = "ghydramcp" +version = "0.1.0" +description = "AI-assisted reverse engineering bridge: a multi-instance Ghidra plugin exposed via a HATEOAS REST API plus an MCP Python bridge for decompilation, analysis & binary manipulation" +readme = "README.md" +requires-python = ">=3.11" +dependencies = [ + "mcp==1.6.0", + "requests==2.32.3", +] + +[project.scripts] +ghydramcp = "bridge_mcp_hydra:main" + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["."] +only-include = ["bridge_mcp_hydra.py"] From f4212b8666be1b1c48da2eb9d8b48cdd5f828ebf Mon Sep 17 00:00:00 2001 From: nblog <503407184@qq.com> Date: Wed, 12 Nov 2025 15:30:31 +0800 Subject: [PATCH 2/2] feat: update project version to 2.0.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 45e340a..770d69b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ghydramcp" -version = "0.1.0" +version = "2.0.0" description = "AI-assisted reverse engineering bridge: a multi-instance Ghidra plugin exposed via a HATEOAS REST API plus an MCP Python bridge for decompilation, analysis & binary manipulation" readme = "README.md" requires-python = ">=3.11"