Skip to main content
Glama
coder01128

ChopChop MCP Server

by coder01128
README.md
# ChopChop MCP Server

A Model Context Protocol (MCP) server that exposes tools from a multi-tenant Supabase commerce backend. Lets an AI agent query tenants, browse catalogue items with pricing, pull recent orders, and add products — all through the MCP tool-calling interface.

## Tools

| Tool | Description |
|------|-------------|
| `list_tenants` | Returns all active tenants on the platform |
| `get_products` | Catalogue items with variant pricing for a tenant (embedded select join) |
| `get_orders` | Recent orders with line items for a tenant |
| `add_item` | Adds a product with a default variant and price to a tenant's catalogue |

## Setup

```bash
# Install dependencies
npm install

# Copy environment template and fill in your Supabase credentials
cp .env.example .env

# Build
npm run build

# Run
npm start
```

### Environment Variables

| Variable | Description |
|----------|-------------|
| `SUPABASE_URL` | Your Supabase project URL |
| `SUPABASE_SERVICE_ROLE_KEY` | Service-role key (bypasses RLS) |

## Usage with MCP Inspector

```bash
npx @modelcontextprotocol/inspector node dist/index.js
```

This opens a web UI where you can call each tool interactively.

## Usage with Claude Desktop

Add to your Claude Desktop MCP config (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "chopchop": {
      "command": "node",
      "args": ["/absolute/path/to/chopchop-mcp-server/dist/index.js"]
    }
  }
}
```

## Architecture

See [ARCHITECTURE.md](ARCHITECTURE.md) for data flow, project structure, and schema details.

## Design Decisions

See [DECISIONS.md](DECISIONS.md) for rationale on transport choice, auth strategy, schema validation, and more.

## Tech Stack

- **Runtime:** Node.js + TypeScript (strict mode)
- **MCP:** @modelcontextprotocol/sdk (official TypeScript SDK)
- **Database:** Supabase (PostgreSQL) via @supabase/supabase-js
- **Validation:** Zod (integrated with MCP SDK)
- **Transport:** stdio

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool maps to a distinct resource and action: tenants, products, orders, and product creation. There is no overlap in purpose, so an agent can reliably choose based on the resource it needs.

Naming Consistency5/5

All tools use a consistent snake_case verb_noun pattern: list_tenants, get_products, get_orders, add_item. The minor variation between list/get and add/create does not break the pattern.

Tool Count5/5

Four tools is a reasonable, tightly scoped set for a platform integration focused on reading tenants, products, and orders while supporting product creation. Each tool has a distinct role and none feel redundant.

Completeness3/5

The core read paths for tenants, products, and orders are covered, and product creation exists. However, product update/delete and any order lifecycle mutations are absent, leaving the write surface incomplete for fuller management workflows.

Maintenance

ActivityMaintained
ResponsivenessNo issues