check_connection
Verify the Joern MCP plugin's operational status to ensure code review and security analysis capabilities are available.
Instructions
Check if the Joern MCP plugin is running
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:83-93 (handler)The main handler function for the 'check_connection' tool. It is decorated with @joern_mcp.tool() which registers it with the FastMCP server. The function checks the connection to the Joern server by querying its version and returns an appropriate success or error message.@joern_mcp.tool() def check_connection() -> str: """Check if the Joern MCP plugin is running""" try: metadata = extract_value(joern_remote("version")) if not metadata: return f"Failed to connect to Joern MCP! Make sure the Joern MCP server is running." return f"Successfully connected to Joern MCP, joern server version is {metadata}" except Exception as e: return f"Failed to connect to Joern MCP! Make sure the Joern MCP server is running."