51 lines
881 B
Markdown
51 lines
881 B
Markdown
# OptiqueStock Hermes MCP
|
|
|
|
This MCP server gives a Hermes agent safe, token-scoped access to OptiqueStock.
|
|
|
|
## Environment
|
|
|
|
Set the same key on the Next.js app and the MCP server:
|
|
|
|
```bash
|
|
HERMES_API_KEY=change-me
|
|
OPTICZ_API_BASE=http://192.168.1.30:3000
|
|
```
|
|
|
|
In local development only, the fallback key is:
|
|
|
|
```text
|
|
hermes-demo-key-change-me
|
|
```
|
|
|
|
## Run
|
|
|
|
```bash
|
|
node mini-services/hermes-mcp/server.mjs
|
|
```
|
|
|
|
## MCP Tools
|
|
|
|
- `opticz_status`
|
|
- `opticz_summary`
|
|
- `opticz_search_clients`
|
|
- `opticz_search_products`
|
|
- `opticz_create_client`
|
|
- `opticz_create_repair_sale`
|
|
|
|
## Direct REST API
|
|
|
|
All endpoints require:
|
|
|
|
```http
|
|
Authorization: Bearer <HERMES_API_KEY>
|
|
```
|
|
|
|
Available endpoints:
|
|
|
|
- `GET /api/hermes/status`
|
|
- `GET /api/hermes/summary`
|
|
- `GET /api/hermes/clients?q=amina`
|
|
- `POST /api/hermes/clients`
|
|
- `GET /api/hermes/products?q=monture`
|
|
- `POST /api/hermes/sales/repair`
|