Skip to content
satwikspsPublic

About

A team MCP gateway for WooCommerce with controlled tool access and traceable AI actions.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

HARBOR: a team MCP gateway

One gateway for your team's commerce tools.

A Model Context Protocol gateway for WooCommerce with personal keys and role-based access.

Checks License: Apache 2.0

Live
Store
https://store.harbor.satwiksps.site/
Live
Console
https://harbor.satwiksps.site/
Live
Docs
https://docs.harbor.satwiksps.site/

Login details for the hosted console are available on request.

Run locally

Clone this repository, then open PowerShell at its root. Prerequisites: PowerShell 7, Docker Desktop with Linux containers and 8 GB allocated, Git, kubectl, Python 3.12 and uv.

uv sync --frozen
pwsh -File scripts/bootstrap.ps1

Bootstrap installs pinned Helm/k3d and builds the system. Open the local console or store; find separate Harbor and WordPress credentials in .secrets/development.json. Optional Gemini setup enables chat and requires available provider quota.

Deploy on a VPS

  1. Prepare a dedicated Linux host: install k3s with Secret encryption, Helm and cert-manager; configure console/store DNS and firewall rules.
  2. Build and import a release, then run sudo bash scripts/deploy-vps.sh CONSOLE_HOST STORE_HOST ADMIN_EMAIL TAG. The helper generates fresh production credentials on first installation.
  3. Review production values: DNS, TLS ingress, storage class/sizes and existing Secrets. Verify the deployment and schedule off-node backups.

To replace the VM without downtime, deploy and test the new host before changing DNS; see Move to a new host.

Use Harbor

  • Place an order: add a product to the cart, review quantities and checkout with fictional details and an Indian address. Choose Cash on delivery. No payment or shipment occurs.
  • Use chat: sign in and ask What orders came in today?. Administrators review and approve proposed writes; members use permitted read tools.
  • Connect an external client: create a personal key, select Streamable HTTP, and set http://harbor.localhost:8080/mcp with Authorization: Bearer <KEY>. Hosted endpoint: https://harbor.satwiksps.site/mcp. MCP Inspector can list and call tools without Gemini.

Verify the main flows

Use one administrator and one member account. The automated checks run against a deployed instance; see checks against a running application.

Flow Check by hand Automated check
Storefront checkout Add a product to the cart, check out with Cash on delivery, then find the order in WooCommerce admin tests.browser_acceptance, tests.live_order_journey
Chat creates a product As an administrator, ask chat to create a product with a name and price, approve the card, then open the store tests.browser_acceptance
Today's orders through chat Place an order, then ask chat What orders came in today? tests.browser_acceptance
External client discovery Connect MCP Inspector to /mcp with the member's key and list tools from all enabled servers tests.acceptance, tests.external_agent
One prompt, two upstreams Ask for today's orders and the shipping policy in one prompt tests.acceptance --chat, tests.external_agent
Key revocation Revoke the member's key; their next call is rejected, even on an open connection tests.acceptance
Disabled upstream Disable a connection; its tools disappear from chat and the external client, and stale calls fail tests.acceptance
Upstream failure Run kubectl -n harbor scale deployment/shipping-mcp --replicas=0; the other servers keep working and Connections shows shipping as Unreachable. Scale it back to 1 afterwards scripts/verify_failure.py
Activity attribution Open Activity; each call shows the user, server, tool, time, duration and outcome tests.acceptance

Source and design

flowchart TB
    UI[React console] -->|Session cookie| API[FastAPI and MCP gateway]
    CLI[External MCP client] -->|Bearer key| API
    API --> PG[(PostgreSQL)]
    API -->|Service credentials| MCP[Commerce, policies and shipping MCP]
    MCP -->|Commerce REST calls| WP[WordPress + WooCommerce]
    WP --> DATA[(MariaDB and WordPress files)]
Loading
Component Source
React/TypeScript dashboard dashboard/
Python/FastAPI backend and MCP gateway backend/, gateway.py
Custom WooCommerce MCP server commerce.py, server.py
Chat agent and independent MCP client chat.py, ask_gateway.py
Helm chart and environment values chart/, local, production

Architecture keeps identity, registry and chat together to simplify a single-team deployment. PostgreSQL stores application state; WooCommerce owns commerce data and exposes it through its REST API. Aggregation and routing use collision-safe aliases, independent catalogs, deadlines and permission checks. Failed upstreams do not block others; uncertain writes are not retried automatically.

The deployment tradeoff is one replica per component, node-local storage and process-local rate limits. OAuth, image-based server provisioning, multi-store tenancy and horizontal scaling are outside the implemented scope.

Security boundaries

Members can read records exposed by allowed tools without seeing shared credentials; they cannot manage teammates or inspect another user's keys or Activity. Administrators control team access. Client tokens stay at the gateway; upstreams receive only their configured credential, preventing them from reusing a member's gateway token. Untrusted tool descriptions can manipulate model choices, so authorization remains server-side and dashboard writes require approval. External administrator clients can write directly.

Implemented stand-out features

Feature Implementation and limits
VPS deployment Same Helm chart on k3s, DNS and HTTPS
Tool permissions Role-based discovery filtering and direct-call rejection
Large catalogs Search before schema selection; 500 synthetic tools tested
Security hardening SSRF protection and NetworkPolicies, restricted RBAC and encrypted Secrets, non-root containers
Observability Per-server counts, failure rate, p50/p95 latency and attributed errors
Upgrade and rollback Application release checks; data restoration is separate

About

A team MCP gateway for WooCommerce with controlled tool access and traceable AI actions.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages