hydra-mcp

hydra-mcp

3.5

Hydra MCP is a Model Control Protocol server that allows Claude to interact with client functions via a REST API.

Hydra MCP is a server implementation that facilitates communication between Claude and various client functions through a REST API. The system is designed to centralize function registration and routing, allowing multiple clients to expose their functions to Claude in a standardized manner. The server is built using FastAPI and provides endpoints for function registration and discovery. It includes sample client and Claude implementations for testing and demonstration purposes. The server is configurable and supports automatic function discovery and documentation, making it easy to integrate new clients and functions.

Features

  • Centralized function registry for multiple clients
  • REST API endpoints for function discovery and invocation
  • Standardized communication protocol between clients and Claude
  • Easy-to-use function registration system
  • Automatic function discovery and documentation

MCP Tools

  • get_endpoints(): List all available endpoints
  • get_registered_functions(endpoint): Get functions available at a specific endpoint
  • call_function(endpoint, function_name, arguments): Call a specific function with arguments

Usage with Different Platforms

Start the central server

bash
python ipc_server.py

Register client functions

python
# Example client registration
functions = [
    {
        "name": "example_function",
        "description": "An example function",
        "parameters": {
            "param1": "string",
            "param2": "integer"
        }
    }
]

requests.post(
    f"http://localhost:{API_SERVER_PORT}/register_functions",
    json={
        "endpoint": "client1",
        "functions": functions
    }
)

Use the MCP interface to interact with functions

python
# Get available endpoints
endpoints = get_endpoints()

# Get functions for a specific endpoint
functions = get_registered_functions("localhost:1234")

# Call a function
result = call_function("localhost:1234", "example_function", {"param1": "value", "param2": 42})