Metadata-Version: 2.4
Name: mcp-fabric
Version: 0.1.0
Summary: Python-first install and control surface for the MCP-Fabric gateway runtime.
Author: MCP-Fabric maintainers
License: UNLICENSED
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# MCP-Fabric Python Package

MCP-Fabric provides a Python-first install and control surface for the local
gateway runtime. The gateway remains the existing Node.js implementation; Python
starts it, validates it, and talks to its HTTP endpoints.

## Installation

```sh
pip install mcp-fabric
```

## Runtime Dependency

This first Python packaging slice uses the managed Node runtime fallback. Local
gateway use requires Node.js `>=20`. No manual `npm install` or `npm run ...`
commands are part of the Python API; the Python package verifies runtime
dependencies, runs managed bootstrap when needed, and owns startup, readiness
checks, logs, and shutdown.

If Node is missing or too old, `LocalFabricGateway` reports:

```text
Local MCP-Fabric runtime requires Node.js >=20.
Install Node.js, then rerun your Python program.
No manual npm commands are required.
```

## Local Gateway Usage

```python
from mcp_fabric import LocalFabricGateway

with LocalFabricGateway() as fabric:
    client = fabric.client()
    session = client.initialize(client_id="python-user")
    tools = client.tools_list(session.session_id)
    result = client.tools_call(
        session.session_id,
        name="echo",
        arguments={"message": "hello"},
    )
```

## Remote Gateway Usage

```python
from mcp_fabric import FabricClient

client = FabricClient("https://gateway.example.com")
health = client.health()
```

## Operational Proof

```sh
mcp-fabric validate
```

or:

```sh
python -m mcp_fabric.validation
```
