Skip to main content
Development 2026-06-28

How to Connect Claude Desktop & Cursor to a Hosted MCP Server

MCP Trail

MCP Trail Team

Technical Team

How to Connect Claude Desktop & Cursor to a Hosted MCP Server

How to Connect Claude Desktop & Cursor to a Hosted MCP Server

Most MCP tutorials assume servers run on your machine: npx this, set that environment variable, restart the client, repeat on every laptop. Hosted (remote) MCP servers flip the model — the server runs in the cloud, and your client needs exactly two things: a URL and an auth header. No Node, no local processes, and the config that works on your machine works identically on your teammate’s.

This guide connects the popular clients — Claude Desktop, Claude Code, Cursor, VS Code — to a server hosted on MCP Trail. If you don’t have a hosted server yet, the first two steps get you one in about three minutes.

Why connect to a hosted MCP server?

  • Zero local setup — no runtimes, versions, or child processes on the laptop
  • Credentials stay server-side — the client holds a revocable bearer token, never the upstream API keys
  • Same server for every client and teammate — onboarding is pasting one snippet
  • Everything is logged — each call any client makes lands in one audit trail

Step 1: Create your free MCP Trail account

Sign up at app.mcptrail.com.

Step 2: Add a server and grab its connection details

Add any server from the MCP Marketplace (the GitHub guide walks through it). Once it’s running, click Connect an agent on the server card. Every hosted server exposes:

  • an endpoint URLhttps://<gateway>/v1/proxy/<your-slug>
  • a bearer token — sent as an Authorization header

The panel generates ready-made snippets per client, including one-click install deep links for Cursor and VS Code. The sections below show what it’s generating, so you understand each config.

The Connect an agent panel listing supported clients

Claude Code (CLI)

One command:

claude mcp add --transport http my-server "https://<your-endpoint>" \
  --header "Authorization: Bearer <your-token>"

Verify with claude mcp list — the server should show as connected.

Claude Desktop

Settings → Connectors → add a custom connector with the endpoint URL, or via the config file:

{
  "mcpServers": {
    "my-server": {
      "url": "https://<your-endpoint>",
      "headers": { "Authorization": "Bearer <your-token>" }
    }
  }
}

Restart Claude Desktop; the server’s tools appear in the tools menu.

Claude Desktop showing the hosted server's tools available

Cursor

Either click Add to Cursor in the Connect an agent panel (deep link installs it), or add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "my-server": {
      "url": "https://<your-endpoint>",
      "headers": { "Authorization": "Bearer <your-token>" }
    }
  }
}

Check Cursor Settings → MCP: the server should show a green dot and its tool list.

Cursor's MCP settings showing the hosted server connected

VS Code (GitHub Copilot agent mode)

Use the Add to VS Code deep link, or add to your MCP config:

{
  "servers": {
    "my-server": {
      "type": "http",
      "url": "https://<your-endpoint>",
      "headers": { "Authorization": "Bearer <your-token>" }
    }
  }
}

The same URL + header pattern also covers Windsurf, Gemini CLI, LM Studio, Cherry Studio, and any other HTTP-capable MCP client — the Connect an agent panel has generated snippets for each.

Verify it works

From any connected client, ask for something the server provides:

List the tools you have available from my-server

Then open Audit log in the MCP Trail dashboard — you’ll see the tools/list and any tools/call requests your client just made. If a client misbehaves, this is your ground truth for what it actually sent.

The audit log showing calls from the newly connected client

Troubleshooting

  • 401 / unauthorized — the bearer token is missing, mistyped, or was rotated; grab a fresh one from the server’s config tab
  • Client shows no tools — restart the client after config changes (Claude Desktop especially); confirm the endpoint URL includes your server slug
  • Timeouts — check the server’s runtime logs on MCP Trail; if the upstream is down, the log says so (log-reading guide)

FAQ

Do hosted MCP servers work offline?

No — clients need network access to the endpoint. For fully offline work, a local stdio server is the right tool; hosted wins everywhere else.

Is one bearer token shared by all my clients?

You can share it or issue and rotate per audience. Rotating a token instantly cuts off every client using the old one — that’s the point.

Which transport is this — SSE or streamable HTTP?

Streamable HTTP, the current MCP standard, which all the clients above support natively.

Can I connect one client to many hosted servers?

Yes — one config entry per server. Or better: bundle them into a single endpoint and keep one entry total.

Two fields — URL and token — and your whole team is connected. Create your free MCP Trail account to get your first hosted endpoint.

Share this article