Get the FREE Ultimate OpenClaw Setup Guide →

mold-inventory

Mold inventory management application on Cloudflare Workers using Auth0, Hono, Prisma, D1, Next.js, and an MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio patkub-mold-inventory node apps/molds-mcp/server.js \
  --env AUTH0_DOMAIN="your-auth0-domain" \
  --env CF_ACCOUNT_ID="your-cloudflare-account-id" \
  --env AUTH0_AUDIENCE="your-auth0-audience" \
  --env AUTH0_CLIENT_ID="your-auth0-client-id" \
  --env AUTH0_CLIENT_SECRET="your-auth0-client-secret" \
  --env CF_WORKER_NAMESPACE="your-d1-database-namespace"

How to use

The Mold Inventory MCP server provides a secure interface for an LLM to access mold inventory data on behalf of users who have approved permissions. It leverages Auth0 for authentication and authorization, and exposes controlled read access to the mold list (read:molds) via the MCP. Operators can instruct the LLM to fetch molds, filter by attributes (e.g., name, material, status), or perform read-only queries within the permissions the user has granted. To use it, deploy the MCP server in your Cloudflare environment, ensure the LLM has valid authentication tokens with the read:molds scope, and route your MCP requests to the Mold Inventory MCP endpoint. The MCP will validate the user’s permissions and return the mold list or filtered results accordingly.

How to install

Prerequisites:

  • Node.js 18+ (or the version used by the repo) and npm/yarn/pnpm as preferred
  • Git installed
  • Access to the Mold Inventory monorepo (this repo)

Step-by-step installation:

  1. Clone the repository: git clone https://github.com/yourorg/molds-mcp.git cd molds-mcp

  2. Install dependencies (using pnpm as in the repo): pnpm install

  3. Build the molds-mcp package (if a build step exists): pnpm nx build molds-mcp

  4. Configure environment variables (example shown for local dev):

    • Create a .env file or set in your deployment: CF_ACCOUNT_ID=your-cloudflare-account-id CF_WORKER_NAMESPACE=your-d1-namespace AUTH0_DOMAIN=your-auth0-domain AUTH0_AUDIENCE=your-auth0-audience AUTH0_CLIENT_ID=your-auth0-client-id AUTH0_CLIENT_SECRET=your-auth0-client-secret
  5. Run the MCP server locally (adjust if you deploy differently): node apps/molds-mcp/server.js

  6. Deploy to your environment following your usual workflow for Cloudflare Workers (e.g., using Wrangler, Nx deploy, or your CI/CD pipeline).

Additional notes

Notes and tips:

  • The MCP server enforces the read:molds scope; ensure users have this permission in Auth0 to access mold data.
  • Keep Auth0 credentials and Cloudflare account details in secure vaults; do not commit to version control.
  • If you encounter issues with token validation, verify the Auth0 domain, audience, and client credentials, and ensure the MCP server can reach Auth0 endpoints.
  • For local testing, mock tokens with the required scopes to simulate LLM-mediated requests.
  • Environment variable names in the config above are placeholders; adapt to your deployment’s conventions.
  • If using Prisma with Cloudflare D1 in the API, ensure the MCP server can securely query the mold inventory data through the same access controls.

Related MCP Servers

Sponsor this space

Reach thousands of developers