From f3653b6315f9e75a7df63699a99ef8822617bb38 Mon Sep 17 00:00:00 2001 From: Cain <50669073+CainYzb@users.noreply.github.com> Date: Tue, 2 Sep 2025 17:08:18 +0800 Subject: [PATCH 1/5] fix(get_android_manifest) : TypeError --- jadx_mcp_server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jadx_mcp_server.py b/jadx_mcp_server.py index 775c702..1d7914d 100644 --- a/jadx_mcp_server.py +++ b/jadx_mcp_server.py @@ -11,6 +11,7 @@ import httpx import logging import argparse +import json from typing import List, Union from mcp.server.fastmcp import FastMCP @@ -238,7 +239,10 @@ async def get_android_manifest() -> dict: Returns: Dictionary containing content of AndroidManifest.xml file. """ - return await get_from_jadx("manifest") + manifest = await get_from_jadx("manifest") + if isinstance(manifest, str): + return json.loads(manifest) + return manifest @mcp.tool(name="get_strings", description="Retrieve contents of strings.xml files that exists in application.") async def get_strings() -> dict: From 42956d2d281a484d8539faeb322474857f28635b Mon Sep 17 00:00:00 2001 From: zinjacoder Date: Sat, 6 Sep 2025 20:47:44 +0530 Subject: [PATCH 2/5] feat: custom port option, 3.2.0 --- jadx_mcp_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jadx_mcp_server.py b/jadx_mcp_server.py index 1d7914d..5fcac3b 100644 --- a/jadx_mcp_server.py +++ b/jadx_mcp_server.py @@ -29,15 +29,15 @@ # Initialize the MCP server mcp = FastMCP("JADX-AI-MCP Plugin Reverse Engineering Server") -# To do : implement logic to handle the scenario where port is not available -JADX_HTTP_BASE = "http://127.0.0.1:8650" # Base URL for the JADX-AI-MCP Plugin - # Parse the arguments parser = argparse.ArgumentParser("MCP Server for Jadx") parser.add_argument("--http", help="Serve MCP Server over HTTP stream.", action="store_true", default=False) parser.add_argument("--port", help="Specify the port number for --http to serve on. (default:8651)", default=8651, type=int) +parser.add_argument("--jadx-port", help="Specify the port on which JADX AI MCP Plugin is running on. (default:8650)", default=8650, type=int) args = parser.parse_args() +JADX_HTTP_BASE = f"http://127.0.0.1:{args.jadx_port}" # Base URL for the JADX-AI-MCP Plugin + # Generic method to fetch data from jadx async def get_from_jadx(endpoint: str, params: dict = {}) -> Union[str, dict]: """Generic helper to request data from the JADX plugin with proper error reporting and logging.""" From 062092a756d15b5b0030c5618b18ab41c72992f8 Mon Sep 17 00:00:00 2001 From: zinjacoder Date: Sat, 6 Sep 2025 21:43:59 +0530 Subject: [PATCH 3/5] fix: fixed but bug where no info level messages are being printed on console for debugging and troubleshooting, feat: implemented health check --- jadx_mcp_server.py | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/jadx_mcp_server.py b/jadx_mcp_server.py index 5fcac3b..09fa961 100644 --- a/jadx_mcp_server.py +++ b/jadx_mcp_server.py @@ -37,6 +37,32 @@ args = parser.parse_args() JADX_HTTP_BASE = f"http://127.0.0.1:{args.jadx_port}" # Base URL for the JADX-AI-MCP Plugin +#print(JADX_HTTP_BASE) + +## jadx ai mcp plugin server health ping + +def health_ping() -> Union[str, dict]: + print(f"Attempting to connect to {JADX_HTTP_BASE}/health") + try: + with httpx.Client() as client: + print("Making HTTP request...") + resp = client.get(f"{JADX_HTTP_BASE}/health", timeout=60) + print(f"Response status: {resp.status_code}") + resp.raise_for_status() + print(f"Response text: {resp.text}") + return resp.text + except httpx.HTTPStatusError as e: + error_message = f"HTTP error {e.response.status_code}: {e.response.text}" + print(f"HTTP Status Error: {error_message}") + return {"error": f"{error_message}."} + except httpx.RequestError as e: + error_message = f"Request failed: {str(e)}" + print(f"Request Error: {error_message}") + return {"error": f"{error_message}."} + except Exception as e: + error_message = f"Unexpected error: {str(e)}" + print(f"Unexpected Error: {error_message}") + return {"error": f"{error_message}."} # Generic method to fetch data from jadx async def get_from_jadx(endpoint: str, params: dict = {}) -> Union[str, dict]: @@ -391,7 +417,11 @@ async def rename_field(class_name: str,field_name: str, new_name: str): return await get_from_jadx("rename-field", {"class": class_name, "field":field_name,"newFieldName": new_name}) if __name__ == "__main__": - logger.info("JADX MCP SERVER\n - By ZinjaCoder (https://github.com/zinja-coder) \n - To Report Issues: https://github.com/zinja-coder/jadx-mcp-server/issues\n") + print("JADX MCP SERVER\n - By ZinjaCoder (https://github.com/zinja-coder) \n - To Report Issues: https://github.com/zinja-coder/jadx-mcp-server/issues\n") + print("[------------------------------ Stand By Checking JADX AI MCP Plugin Connectivity ------------------------------]") + print("Testing health check...") + result = health_ping() + print(f"Final result: {result}") if args.http: if args.port: mcp.run(transport="http",port=args.port) From 36a0f6903803c0e991d7fb140f0bb684215a0353 Mon Sep 17 00:00:00 2001 From: zinjacoder Date: Sat, 6 Sep 2025 21:48:03 +0530 Subject: [PATCH 4/5] release: v3.3.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ade2241..375f902 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ It is combination of two tools: --- -# Zin MCP Suie +# Zin MCP Suite - **[APKTool-MCP-Server](https://github.com/zinja-coder/apktool-mcp-server)** - **[JAD-AI-MCP-Plugin](https://github.com/zinja-coder/jadx-ai-mcp)** - **[ZIN-MCP-Client](https://github.com/zinja-coder/zin-mcp-client)** From a65dbf9f912b2459d9648ea2831ae0ca6cf2cc34 Mon Sep 17 00:00:00 2001 From: zinjacoder Date: Sat, 6 Sep 2025 21:51:38 +0530 Subject: [PATCH 5/5] release: v3.2.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 375f902..3c65b90 100644 --- a/README.md +++ b/README.md @@ -207,7 +207,7 @@ Also huge thanks to [@aaddrick](https://github.com/aaddrick) for developing Clau And in last thanks to [@anthropics](https://github.com/anthropics) for developing the Model Context Protocol and [@FastMCP](https://github.com/modelcontextprotocol/python-sdk) team -And all opensource maintainers and contributors that makes libraries and dependencies which allows project like this possible. +And all open source maintainers and contributors that makes libraries and dependencies which allows project like this possible. ## Audited and Received Assessment Badge