Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 75 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Building a Remote MCP Server on Cloudflare (Without Auth)

This example allows you to deploy a remote MCP server that doesn't require authentication on Cloudflare Workers.
This example allows you to deploy a remote MCP server that doesn't require authentication on Cloudflare Workers.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Docs contradict auth-enabled implementation; update intro and deployment references.

Text says "doesn't require authentication" and links/templates point to "remote-mcp-authless". Align with API-key auth, update title/intro, and replace authless template/URLs with this repo’s deployment path. Prefer HTTPS in examples.

🤖 Prompt for AI Agents
In README.md around line 3, the intro claims the example "doesn't require
authentication" and points to authless templates/URLs; update the title and
first paragraph to state this deployment uses API-key (auth-enabled) instead of
authless, replace any links/templates that reference "remote-mcp-authless" with
this repository's deployment path (use the canonical repo/deploy URLs), and
ensure all example URLs use HTTPS; keep wording concise and update any related
deployment reference text to mention API-key configuration steps instead of "no
auth".


## Get started:
## Get started:

[![Deploy to Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-authless)

Expand All @@ -15,7 +15,7 @@ npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/rem

## Customizing your MCP Server

To add your own [tools](https://developers.cloudflare.com/agents/model-context-protocol/tools/) to the MCP server, define each tool inside the `init()` method of `src/index.ts` using `this.server.tool(...)`.
To add your own [tools](https://developers.cloudflare.com/agents/model-context-protocol/tools/) to the MCP server, define each tool inside the `init()` method of `src/index.ts` using `this.server.tool(...)`.

## Connect to Cloudflare AI Playground

Expand All @@ -27,7 +27,7 @@ You can connect to your MCP server from the Cloudflare AI Playground, which is a

## Connect Claude Desktop to your MCP server

You can also connect to your remote MCP server from local MCP clients, by using the [mcp-remote proxy](https://www.npmjs.com/package/mcp-remote).
You can also connect to your remote MCP server from local MCP clients, by using the [mcp-remote proxy](https://www.npmjs.com/package/mcp-remote).

To connect to your MCP server from Claude Desktop, follow [Anthropic's Quickstart](https://modelcontextprotocol.io/quickstart/user) and within Claude Desktop go to Settings > Developer > Edit Config.

Expand All @@ -47,4 +47,74 @@ Update with this configuration:
}
```

Restart Claude and you should see the tools become available.
Restart Claude and you should see the tools become available.

## Available Tools

This PortalJS MCP Server provides multiple tools for working with datasets, organizations, and resources. Here's how to use them with Claude or ChatGPT:

### 🔑 Authentication

**Set your API key** (required for write operations)
- Say: "My PortalJS API key is `your_key_here`"
- This will call the `set_api_key` tool

### 🔍 Discovery Tools (No Auth Required)

**Search for datasets**
- Say: "Search for datasets about climate change"
- This will call the `search` tool

**Get detailed dataset information**
- Say: "Show me details about the dataset named 'world-happiness-2020'"
- This will call the `fetch` tool

**Get quick dataset statistics**
- Say: "What are the stats for dataset 'world-happiness-2020'?"
- This will call the `get_dataset_stats` tool (shows size, formats, resource count, etc.)

**Preview data structure**
- Say: "Preview the first 10 rows of resource ID `abc123`"
- This will call the `preview_resource` tool (shows column names, types, and sample data)

**Find related datasets**
- Say: "Find datasets related to 'world-happiness-2020'"
- This will call the `get_related_datasets` tool (discovers similar datasets by tags or organization)

**Compare multiple datasets**
- Say: "Compare these datasets: 'dataset-a', 'dataset-b', 'dataset-c'"
- This will call the `compare_datasets` tool (side-by-side metadata comparison)

**Get organization information**
- Say: "Tell me about the organization 'my-org-name'"
- This will call the `get_organization_details` tool (shows credibility info like creation date, dataset count)

### ✏️ Write Operations (Requires Authentication)

**List your organizations**
- Say: "Show me my organizations"
- This will call the `list_organizations` tool (needed to get organization IDs for creating datasets)

**Create a new dataset**
- Say: "Create a dataset called 'my-new-dataset' with title 'My Dataset' in organization `org-id`"
- This will call the `create_dataset` tool

**Add a resource to a dataset**
- Say: "Add a CSV resource from URL `https://example.com/data.csv` to dataset 'my-dataset'"
- This will call the `create_resource` tool

**Update dataset metadata**
- Say: "Update dataset 'my-dataset' with new description 'Updated info' and tags 'data, analysis'"
- This will call the `update_dataset` tool

**Update organization details**
- Say: "Update organization 'my-org' with new description 'New description'"
- This will call the `update_organization` tool

### 💡 Tips

- Most discovery tools work without authentication
- Write operations require setting your API key first
- Dataset names must be lowercase with hyphens (e.g., 'my-dataset-name')
- When creating datasets, use `list_organizations` first to get your organization ID
- All tools return JSON-formatted responses for easy parsing.
Loading