Metadata-Version: 2.3
Name: tikuu-tools
Version: 0.1.0
Summary: Tikuu tool gateway SDK: FastMCP client for virtual MCP gateways
Author: Utkarsh Tiwari
Author-email: Utkarsh Tiwari <tiwariutkarsh66@gmail.com>
Requires-Dist: fastmcp>=4.1.3
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# tikuu-tools

Python SDK for Tikuu tool gateways: builds a FastMCP client aimed at a
gateway’s Streamable HTTP MCP endpoint.

## Requirements

- Python 3.13+
- [uv](https://docs.astral.sh/uv/)
- A running `tikuu-tool-gateway` with a minted gateway API key (`tgk_…`)

## Install

```bash
uv add tikuu-tools
```

## Env (for `from_env`)

| Variable | Meaning |
| --- | --- |
| `TIKUU_TOOL_GATEWAY_URL` | Tool gateway origin (no trailing slash), e.g. `http://127.0.0.1:8095` |
| `TIKUU_TOOL_GATEWAY_ID` | Gateway UUID |
| `TIKUU_TOOL_GATEWAY_API_KEY` | Gateway API key (`tgk_…`) |

`TikuuToolGateway.from_env()` raises `ToolGatewayConfigurationError` if any
required value is missing or blank.

## Usage

```python
from tikuu_tools import TikuuToolGateway

gateway = TikuuToolGateway(
    base_url="http://127.0.0.1:8095",
    gateway_id="<gateway-uuid>",
    api_key="tgk_…",
)
# or: gateway = TikuuToolGateway.from_env()

client = gateway.get_mcp_client(session_id=session_id, actor_id=actor_id)
async with client:
    tools = await client.list_tools()
    result = await client.call_tool("orders___get_order", {"id": "ord_123"})
```

MCP URL used: `{base_url}/gateways/{gateway_id}/mcp`.

Each call to `get_mcp_client` returns a **fresh** unbound FastMCP `Client`
with `Authorization: Bearer <tgk_…>` plus `X-Session-Id` / `X-Actor-Id`.
The caller owns connect / `async with` lifecycle.

## Development

```bash
uv sync --group dev
uv run pytest
```
