Metadata-Version: 2.5
Name: jsonport-mcp
Version: 0.1.1
Summary: MCP server for jsonport.com — product data extraction
License-Expression: MIT
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: mcp>=2.0
Description-Content-Type: text/markdown

# jsonport-mcp

MCP (Model Context Protocol) server for the [jsonport.com](https://jsonport.com) API.

Extracts structured product data from e-commerce URLs as MCP tools usable by any MCP-compatible client (Claude Desktop, Hermes Agent, etc.).

## Tools

| Tool | Description |
|------|-------------|
| `extract_product` | Extract structured product data from an e-commerce URL (Amazon, eBay) |

## Install

```bash
pip install jsonport-mcp
```

Or from source:

```bash
git clone https://github.com/yourorg/jsonport-mcp.git
cd jsonport-mcp
pip install .
```

## Usage

### With Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "jsonport": {
      "command": "jsonport-mcp",
      "args": []
    }
  }
}
```

### With Hermes Agent

Add to `~/.hermes/config.yaml`:

```yaml
mcp_servers:
  jsonport:
    command: "jsonport-mcp"
```

### Run directly

```bash
# Start the MCP server on stdio
jsonport-mcp

# Or with a custom API endpoint
JSONPORT_API_URL=http://localhost:8181 jsonport-mcp
```

### Test the server

```bash
# Send an initialize request via stdin
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0.1"}}}' | jsonport-mcp
```

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `JSONPORT_API_URL` | `http://89.58.13.15:8181` | Base URL for the jsonport API |
| `JSONPORT_TIMEOUT` | `60` | HTTP request timeout in seconds |

## Tool Details

### `extract_product`

Extracts structured product data from an e-commerce URL.

- **url** (required): Product page URL (`http://` or `https://`)
- **geo** (optional): Pricing region — `us`, `eu`, or `auto` (default: `us`)
- **force** (optional): Bypass cache (default: `false`)

Returns: JSON with `title`, `price`, `currency`, `in_stock`, `rating`, `reviews_count`, `seller`, `brand`, `images`, `description`, `features`, and more.

## License

MIT
