Skip to content

Commit 68cb0d9

Browse files
authored
Merge pull request #1978 from elementary-data/mcp-setup-guide
Refine MCP setup guide with clearer instructions and troubleshooting …
2 parents 574a33a + 1eeb9a9 commit 68cb0d9

File tree

1 file changed

+55
-40
lines changed

1 file changed

+55
-40
lines changed

docs/cloud/mcp/setup-guide.mdx

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@ sidebarTitle: "MCP setup guide"
44
---
55

66

7-
This document walks you through connecting any MCP‑compatible client (Cursor, Claude Desktop, VS Code, and others) to **Elementary’s production remote MCP server**. It covers prerequisites, installation of the `mcp-remote` helper, authentication, and per‑client configuration steps.
7+
This document walks you through connecting any MCP‑compatible client (Cursor, Claude Desktop, and others) to **Elementary’s production remote MCP server**.
8+
It covers prerequisites, installation of the `mcp-remote` helper, authentication, and per‑client configuration steps.
89

910
## Prerequisites
1011
| Requirement | Why it’s needed |
1112
|-------------|-----------------|
12-
| **Node.js 18 LTS or newer** | `mcp-remote` (and many editors) run via `npx`, which depends on Node. Verify with `node --version`. |
13-
| **npm / npx** | Bundled with Node; `npx` fetches `mcp-remote` on demand. |
13+
| **Node.js 18 LTS or newer** | `mcp-remote` (and many editors) run on Node. Verify wit `node --version`. |
14+
| **npm / npx** | `npx` fetches `mcp-remote` on demand. Bundled with Node. |
15+
16+
> Tip: If you use `nvm`, run `nvm install --lts` and `nvm use --lts`.
17+
1418
---
1519

16-
## 1 – Install `mcp-remote`
17-
For one‑off use, you can rely on `npx` to auto‑download the package each time:
18-
```bash
19-
npx -y mcp-remote --help
20-
```
21-
To avoid first‑run latency (or to pin a version) install globally:
20+
## 1 – Install `mcp-remote` (optional)
21+
You don’t have to install anything globally—our configs use npx to fetch the latest version automatically. If you do prefer a global install, use:
2222
```bash
23+
# Optional: global install
2324
npm install -g mcp-remote@latest
2425
```
26+
27+
> **Important:** `mcp-remote` expects the **server URL as the first argument** (flags come **after** the URL). It does **not** implement `--help`; running `mcp-remote --help` will error because `--help` is treated as a URL.
28+
2529
---
30+
2631
## 2 – Generate a personal access token
2732
**Design Partner Stage:** Personal access tokens are currently available to design partners only. To obtain a token, please reach out to the Elementary team and we'll provide you with one manually.
2833
**Coming soon:** Self-service token management will be available directly from the Elementary UI for all users.
@@ -31,23 +36,48 @@ These tokens inherit **your** workspace permissions:
3136
* Treat them like passwords – **do not share or commit** them.
3237
* Rotate regularly.
3338
* Revoke immediately if compromised.
39+
3440
---
35-
## 3 – Universal configuration JSON
36-
Insert the block below into your client’s MCP configuration file, replacing `...` with your token:
41+
42+
## 3 - Validate the connection
43+
This confirms you can reach the Elementary MCP server.
44+
> Note: Replace `<AUTH_TOKEN>` with your actual token.
45+
46+
```bash
47+
npx -y mcp-remote@latest https://prod.api.elementary-data.com/mcp/ \
48+
--header "Authorization: Bearer <AUTH_TOKEN>" \
49+
--health --debug
50+
```
51+
52+
Optional deeper check (list tools/resources):
53+
```bash
54+
npx -y mcp-remote@latest mcp-remote-client https://prod.api.elementary-data.com/mcp/ \
55+
--header "Authorization: Bearer <AUTH_TOKEN>" \
56+
--list-tools --debug
57+
```
58+
59+
**Troubleshooting**
60+
| Symptom | Remedy |
61+
|---------|--------|
62+
| `node: command not found` | Install Node ≥ 18 and ensure it’s on `PATH`. |
63+
| `401 Unauthorized` | Token expired or pasted incorrectly → regenerate. |
64+
65+
## 4 – Configure your client
66+
Most MCP‑compatible clients read a JSON config that defines mcpServers. Use one of the following patterns.
3767
```jsonc
3868
{
3969
"mcpServers": {
4070
"elementary-remote": {
4171
"command": "npx",
4272
"args": [
43-
"-y", // auto‑install if missing
44-
"mcp-remote",
73+
"-y",
74+
"mcp-remote@latest",
4575
"https://prod.api.elementary-data.com/mcp/",
4676
"--header",
47-
"Authorization: Bearer ${AUTH_TOKEN}"
77+
"Authorization:${AUTH_HEADER}"
4878
],
4979
"env": {
50-
"AUTH_TOKEN": "..."
80+
"AUTH_HEADER": "Bearer <AUTH_TOKEN>"
5181
}
5282
}
5383
}
@@ -56,37 +86,22 @@ Insert the block below into your client’s MCP configuration file, replacing `.
5686
**Why the `-y` flag?**
5787
It makes `npx` skip the interactive “install this package?” prompt.
5888

59-
## 4 – Client‑specific steps
60-
### 4.1 Cursor IDE
89+
### Client‑specific steps
90+
91+
#### 4.1 Cursor IDE
6192
1. **Settings → Model Context Protocol → Add Custom Server**
6293
or edit `~/.cursor/mcp.json` (global) / `<project>/.cursor/mcp.json` (workspace).
6394
2. Paste the JSON above.
6495
3. Save – Cursor auto‑restarts its MCP agent.
65-
### 4.2 Claude Desktop
66-
1. In the menu bar choose **Claude → Developer Settings** to enable advanced configuration.
67-
2. Edit `claude_desktop_config.json`
68-
* macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
69-
* Windows: `%APPDATA%\Claude\claude_desktop_config.json`
70-
3. Paste the JSON block and **restart Claude**. A hammer icon confirms the server is active.
71-
### 4.3 Visual Studio Code (GitHub Copilot Chat ≥ v1.102)
72-
1. **Command Palette → MCP: Open User Configuration**
73-
_or_ create `.vscode/mcp.json` inside your workspace.
74-
2. Paste the JSON block.
75-
3. Reload the window; run **MCP: Show Installed Servers** to verify.
76-
---
77-
## 5 – Verify connectivity
78-
```bash
79-
npx mcp-remote https://prod.api.elementary-data.com/mcp/ \
80-
--header "Authorization: Bearer $AUTH_TOKEN" --health
81-
```
82-
`200 OK` confirms the endpoint and token are valid.
8396

84-
## 6 – Troubleshooting
85-
| Symptom | Remedy |
86-
|---------|--------|
87-
| `node: command not found` | Install Node ≥ 18 and ensure it’s on `PATH`. |
88-
| `401 Unauthorized` | Token expired or pasted incorrectly → regenerate. |
97+
#### 4.2 Claude Desktop
98+
1. In the menu bar choose **Claude → Settings -> Developer**.
99+
2. Under **Local MCP Servers**, click **Edit**.
100+
3. Paste the JSON block
101+
4. Restart Claude
102+
89103
---
104+
90105
### Security reminders
91106
* Tokens confer **all** your Elementary permissions.
92107
* Keep them secret and scoped; rotate when in doubt.

0 commit comments

Comments
 (0)