mold-inventory
Mold inventory management application on Cloudflare Workers using Auth0, Hono, Prisma, D1, Next.js, and an MCP Server
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:
-
Clone the repository: git clone https://github.com/yourorg/molds-mcp.git cd molds-mcp
-
Install dependencies (using pnpm as in the repo): pnpm install
-
Build the molds-mcp package (if a build step exists): pnpm nx build molds-mcp
-
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
-
Run the MCP server locally (adjust if you deploy differently): node apps/molds-mcp/server.js
-
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
mcp-memory
🔥🖥️ MCP Memory is a MCP Server that gives MCP Clients (Cursor, Claude, Windsurf and more) the ability to remember information about users (preferences, behaviors) across conversations.
mcp
MCP server for the Cloudflare API
kollektiv
Kollektiv MCP enables you to chat with and query your own documents directly from IDEs and MCP clients. Private, secure, and integrated into your favorite code editor
google -remote
Collection of Google-native tools (e.g., Gmail, Calendar) for the MCP
alris
Alris is an AI automation tool that transforms natural language commands into task execution.
google-earth-engine
MCP server for Google Earth Engine. Query Google Earth Engine with natural language. Fetch datasets, run tasks and visualize in chat.