JEISA-WEBAPP/.cursor/mcp.json
Dave 0b8f003f87 feat(po): add MCP server, agent-friendly PO API, and PDF rendering
- server/pb-mcp.mjs: 15-tool MCP server for purchase-order workflow
  (CRUD, suppliers, stock, customers, customer POs, validate_draft,
  generate_order_number)
- src/lib/api/purchaseOrders.ts: typed helpers shared by UI + MCP + n8n
- src/components/purchase-orders/pdf.ts: jsPDF PO generator
- src/components/purchase-orders/ViewOrderDialog.tsx: read-only dialog
- src/components/purchase-orders/AttachmentsDialog.tsx: attachment mgmt
- src/components/purchase-orders/NumberInput.tsx: numeric input
- scripts/mcp-create-po.mjs: end-to-end driver (MCP stdio smoke test)
- pocketbase/pb_migrations/1786200007_*: schema migration
- docs/MCP_AND_N8N.md: MCP + n8n integration guide

Verified end-to-end via MCP: generate_order_number → create_purchase_order
with snapshot_items for an actual quote (DRILL-19042 / 161053).
2026-09-07 11:12:13 +02:00

15 lines
752 B
JSON

{
"_comment": "JEISA PocketBase MCP — for Cursor / Claude Desktop / Claude Code. Lets an AI agent read & write PocketBase collections: customer_pos, purchase_orders, invoices, stock_items, suppliers, customers.",
"_setup": "1) Set POCKETBASE_ADMIN_EMAIL / POCKETBASE_ADMIN_PASSWORD (defaults read from this file). 2) Restart Cursor so it spawns the MCP server. 3) `npm install` once so @modelcontextprotocol/sdk is present.",
"mcpServers": {
"jeisa-pocketbase": {
"command": "npx",
"args": ["-y", "tsx", "server/pb-mcp.mjs"],
"env": {
"POCKETBASE_URL": "https://pb.jeistk.apphub.co.za",
"POCKETBASE_ADMIN_EMAIL": "david@wfsales.co.za",
"POCKETBASE_ADMIN_PASSWORD": "1234567890"
}
}
}
}