Metadata-Version: 2.1
Name: wazobiatech-nexus-mcp
Version: 1.1.0
Summary: Python SDK for Nexus MCP
Author: Wazobia Tech
Author-email: dev@wazobiatech.com
Requires-Python: >=3.11,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: fastapi (>=0.110.0)
Requires-Dist: httpx (>=0.27.0,<0.28.0)
Requires-Dist: pydantic (>=2.0.0,<3.0.0)
Requires-Dist: starlette (>=0.36.0)
Description-Content-Type: text/markdown

# wazobiatech-nexus-mcp

Python SDK for the Nexus MCP ecosystem. Provides HMAC signing/verification and MCP server scaffolding.

## Installation

```bash
pip install wazobiatech-nexus-mcp==1.1.0
```

## Usage

### HMAC Signing

```python
from nexus_mcp.hmac_utils import sign_request

sig, ts = sign_request("GET", "/mcp/manifest", "my-secret")
print("x-signature:", sig)
print("x-timestamp:", ts)
```

### HMAC Middleware (FastAPI)

```python
from fastapi import FastAPI
from nexus_mcp.middleware import HMACMiddleware

app = FastAPI()
app.add_middleware(HMACMiddleware, hmac_secret="my-secret")
```

### MCP Server

```python
from nexus_mcp.server import create_mcp_server
from nexus_mcp.models import Manifest

app = create_mcp_server(
    port=8000,
    hmac_secret="my-secret",
    manifest=Manifest(...),
    tools=[...],
)

# Start with uvicorn
# uvicorn.run(app, host="0.0.0.0", port=8000)
```

## Testing

```bash
poetry install
poetry run pytest
```

Contract vector tests verify every entry from `nexus-mcp-contract/vectors.json`.

## Tool Naming Convention

Tool names follow the **Wazobia inter-service MCP convention**:

| Pattern | Valid? | Example |
|---|---|---|
| `service__tool_name` | ✅ | `thoth__process_content`, `krisis__score_article` |
| `plain_snake_case` | ✅ | `health_check`, `process_content` |

Names start with a lowercase letter and contain only `[a-z0-9_]`. The double
underscore `__` is exactly two — not one (which would be part of the slug) and not
three or more (which is invalid). Names like `a___b`, `__a__b`, or `a__b__` are rejected
(verified by `tests/test_models.py`).

## License

MIT

