Add Hermes API and MCP access
This commit is contained in:
50
mini-services/hermes-mcp/README.md
Normal file
50
mini-services/hermes-mcp/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# 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`
|
||||
Reference in New Issue
Block a user