***

title: create_client
slug: /reference/python/agents/mcp-gateway/mcp-manager/create-client
description: Create and start a new MCP client for a service.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[mcpclient]: /docs/server-sdks/reference/python/agents/mcp-gateway/mcp-client

Create and start a new MCP client for the named service. The client spawns a
sandboxed subprocess, initializes the MCP session via JSON-RPC, and retrieves
the list of available tools. Raises `ValueError` if the service is unknown or
disabled, and `RuntimeError` if the MCP process fails to start.

## **Parameters**

<ParamField path="service_name" type="str" required={true} toc={true}>
  Name of the service to create a client for. Must match a key in the
  `services` section of the configuration.
</ParamField>

## **Returns**

[`MCPClient`][mcpclient] -- A started MCP client connected to the service.

## **Example**

```python {10}
from signalwire.mcp_gateway import MCPManager

config = {
    "services": {
        "todo": {"command": ["python3", "todo_mcp.py"], "description": "Todo list", "enabled": True}
    }
}

manager = MCPManager(config)
client = manager.create_client("todo")
tools = client.get_tools()
print(f"Available tools: {[t['name'] for t in tools]}")
client.stop()
```