Skip to content

Commit 69dcdf9

Browse files
kennyj42ranbel
andauthored
Include MCP Portal configuration for clients (#25939)
* Include MCP Portal configuration for clients Added recommended MCP Portal configuration for clients. * Add reauthentication instructions for MCP Client Added instructions for forcing MCP Client reauthentication and managing OAuth sessions. * Update mcp-portals.mdx * PCX edits --------- Co-authored-by: ranbel <[email protected]>
1 parent 0b27235 commit 69dcdf9

File tree

1 file changed

+29
-0
lines changed
  • src/content/docs/cloudflare-one/applications/configure-apps/mcp-servers

1 file changed

+29
-0
lines changed

src/content/docs/cloudflare-one/applications/configure-apps/mcp-servers/mcp-portals.mdx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,35 @@ To test in Workers AI Playground:
129129

130130
Workers AI Playground will show a **Connected** status and list the available tools. You can now ask the AI model to complete a task using an available tool. Requests made to an MCP server will appear in your [portal logs](#view-portal-logs).
131131

132+
For MCP clients with server configuration files, we recommend using the `npx` command with the `mcp-remote@latest` argument:
133+
134+
``` json title= "MCP client configuration for MCP portals"
135+
{
136+
"mcpServers": {
137+
"example-mcp-server": {
138+
"command": "npx",
139+
"args": [
140+
"-y",
141+
"mcp-remote@latest",
142+
"https://<subdomain>.<domain>.com/mcp"
143+
]
144+
}
145+
}
146+
}
147+
```
148+
149+
We do not recommend using the `serverURL` parameter since it may cause issues with portal session creation and management.
150+
151+
If you want to force your MCP client to reauthenticate, most MCP clients will refresh a session after removing the existing MCP OAuth sessions. To clear authentication credentials used by your MCP client, open a terminal and run the following command:
152+
153+
:::note
154+
This command will trigger all MCP servers using `mcp-remote@latest` to force reauthenticate, not just MCP portals.
155+
:::
156+
157+
```sh
158+
rm -rf ~/.mcp-auth
159+
```
160+
132161
## View portal logs
133162

134163
Portal logs allow you to monitor user activity through an MCP server portal. You can view logs on a per-portal or per-server basis.

0 commit comments

Comments
 (0)