Get the FREE Ultimate OpenClaw Setup Guide →

portaljs

MCP server for PortalJS

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio datopian-portaljs-mcp-server npx cloudflare@latest --template=cloudflare/ai/demos/remote-mcp-authless \
  --env DEBUG="optional debug flag" \
  --env CF_WORKERS_ENV="production or preview" \
  --env CF_WORKERS_ACCOUNT="your Cloudflare account ID or subdomain"

How to use

This MCP server demonstrates how to expose a set of tools via a remote MCP endpoint using a Cloudflare Workers-based template that doesn't require authentication. Once deployed, tools defined in your MCP server are accessible remotely through MCP clients such as the Cloudflare AI Playground or the mcp-remote proxy. Developers can customize the server by editing src/index.ts and adding tools with this.server.tool(...). Users can connect to the server from the Playground by supplying the deployed URL, and from Claude Desktop or other MCP clients via the mcp-remote proxy by pointing to the server's SSE URL (for example, https://your-deployed-worker-url/sse).

How to install

Prerequisites:

  • Node.js (LTS) and npm installed on your machine
  • Access to Cloudflare Workers (account) for deployment

Steps:

  1. Install Node.js and npm from https://nodejs.org/

  2. Create a new MCP server project using the template command shown in the README:

    npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authless

  3. Navigate into the generated project directory:

    cd my-mcp-server

  4. Install dependencies (if not installed automatically):

    npm install

  5. Run the development server locally or deploy to Cloudflare Workers per the template instructions (follow the template README for deployment specifics).

  6. After deployment, note the SSE URL provided by Cloudflare Workers (e.g., https://<your-subdomain>.workers.dev/sse) and use it in MCP clients or tool configurations.

Additional notes

Tips and notes:

  • The example focuses on an authless remote MCP server deployed to Cloudflare Workers. Adjust environment settings and allowed origins as needed for your security requirements.
  • Tools are defined in the init() method of src/index.ts using this.server.tool(...). Customize or expand tools to fit your use case.
  • To connect from Claude Desktop, update the MCP configuration in Claude to point to the server's /sse endpoint, following the quickstart example shown in the README.
  • If you encounter deployment issues, ensure your Cloudflare account has Workers access and that the template URL is reachable. Check Cloudflare’s quotas for Workers and for outgoing network requests if your tools call external services.
  • The embedded example uses mcp-remote for client connections. When testing locally, you can simulate connections using the same mcp-remote approach outlined in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers