Metadata-Version: 2.4
Name: sku-availability-mcp
Version: 1.0.0
Summary: MCP server for real-time SKU availability queries via Confluent Cloud ksqlDB
Home-page: https://github.com/yourusername/sku-availability-mcp
Author: Bob AI Assistant
Author-email: Bob AI Assistant <bob@example.com>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/sku-availability-mcp
Project-URL: Bug Reports, https://github.com/yourusername/sku-availability-mcp/issues
Project-URL: Source, https://github.com/yourusername/sku-availability-mcp
Keywords: mcp,model-context-protocol,confluent,kafka,ksqldb,inventory
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastmcp>=2.14.4
Requires-Dist: requests>=2.32.0
Requires-Dist: python-dotenv>=1.0.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# SKU Availability MCP Server

A Model Context Protocol (MCP) server that provides real-time inventory availability queries from Confluent Cloud ksqlDB.

## Features

- 🔍 Real-time SKU availability queries
- ☁️ Integration with Confluent Cloud ksqlDB
- ⚡ FastMCP-based server implementation
- 🎯 Filter by SKU and/or branch
- 🔌 Easy integration with watsonx Orchestrate

## Installation

```bash
pip install sku-availability-mcp
```

## Configuration

Set the following environment variables:

```bash
export KSQLDB_API_KEY="your-api-key"
export KSQLDB_API_SECRET="your-api-secret"
export KSQLDB_ENDPOINT="https://your-ksqldb-endpoint.confluent.cloud:443"
```

Or create a `.env` file:

```env
KSQLDB_API_KEY=your-api-key
KSQLDB_API_SECRET=your-api-secret
KSQLDB_ENDPOINT=https://your-ksqldb-endpoint.confluent.cloud:443
```

## Usage

### Run as a module

```bash
python -m sku_availability_mcp
```

### Run as a command

```bash
sku-availability-mcp
```

### Use with watsonx Orchestrate

Add the toolkit using the orchestrate CLI:

```bash
orchestrate toolkits add \
  --kind mcp \
  --name "sku-availability-toolkit" \
  --description "Real-time inventory availability from Confluent Cloud" \
  --language python \
  --package "sku-availability-mcp" \
  --tools "*"
```

## Available Tools

### get_sku_availability

Query real-time inventory availability for SKUs across branches.

**Parameters:**
- `sku` (optional): SKU filter (e.g., 'LAPTOP-DELL-XPS-15')
- `branch` (optional): Branch filter (e.g., 'DubaiMall', 'MallOfEgypt')

**Returns:**
JSON object with availability records containing:
- `sku`: Product SKU
- `branch`: Store branch name
- `available_quantity`: Current available quantity

**Example:**

```python
# Get all inventory
get_sku_availability()

# Get specific SKU
get_sku_availability(sku="LAPTOP-DELL-XPS-15")

# Get inventory for specific branch
get_sku_availability(branch="DubaiMall")

# Get specific SKU at specific branch
get_sku_availability(sku="LAPTOP-DELL-XPS-15", branch="DubaiMall")
```

## Architecture

This MCP server connects to Confluent Cloud ksqlDB to query the `INVENTORY_AVAILABILITY` table, which aggregates real-time inventory transactions from Kafka topics.

## License

MIT License

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Support

For issues and questions, please open an issue on GitHub.
