@nexvora/mcp-server 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +15 -13
  2. package/dist/NexvoraClient.d.ts.map +1 -1
  3. package/dist/NexvoraClient.js +21 -3
  4. package/dist/NexvoraClient.js.map +1 -1
  5. package/dist/cli.js +17 -11
  6. package/dist/cli.js.map +1 -1
  7. package/dist/createServer.d.ts +7 -0
  8. package/dist/createServer.d.ts.map +1 -1
  9. package/dist/createServer.js +3 -3
  10. package/dist/createServer.js.map +1 -1
  11. package/dist/tools/nexvora_submit_task.d.ts +7 -4
  12. package/dist/tools/nexvora_submit_task.d.ts.map +1 -1
  13. package/dist/tools/nexvora_submit_task.js +74 -4
  14. package/dist/tools/nexvora_submit_task.js.map +1 -1
  15. package/package.json +5 -1
  16. package/CHANGELOG.md +0 -208
  17. package/docs/setup/chatgpt-desktop.md +0 -120
  18. package/docs/setup/claude-code.md +0 -152
  19. package/docs/setup/cursor.md +0 -129
  20. package/src/NexvoraClient.ts +0 -328
  21. package/src/RateLimiter.ts +0 -74
  22. package/src/__tests__/NexvoraClient.test.ts +0 -424
  23. package/src/__tests__/RateLimiter.test.ts +0 -151
  24. package/src/__tests__/auth/oauth.test.ts +0 -246
  25. package/src/__tests__/cache.test.ts +0 -64
  26. package/src/__tests__/config.test.ts +0 -98
  27. package/src/__tests__/defineTool.test.ts +0 -223
  28. package/src/__tests__/fixtures/config.json +0 -7
  29. package/src/__tests__/integration/agentstack.integration.test.ts +0 -259
  30. package/src/__tests__/integration/auth_refresh.integration.test.ts +0 -227
  31. package/src/__tests__/integration/consulting.integration.test.ts +0 -213
  32. package/src/__tests__/integration/feed.integration.test.ts +0 -200
  33. package/src/__tests__/integration/helpers.ts +0 -118
  34. package/src/__tests__/integration/knowledge.integration.test.ts +0 -194
  35. package/src/__tests__/integration/rate_limiting.integration.test.ts +0 -207
  36. package/src/__tests__/integration/submit_task.integration.test.ts +0 -120
  37. package/src/__tests__/integration/wallet_observatory.integration.test.ts +0 -240
  38. package/src/__tests__/nexvora_agentstack_answer.test.ts +0 -120
  39. package/src/__tests__/nexvora_agentstack_ask.test.ts +0 -140
  40. package/src/__tests__/nexvora_agentstack_search.test.ts +0 -188
  41. package/src/__tests__/nexvora_consulting_book.test.ts +0 -277
  42. package/src/__tests__/nexvora_consulting_search.test.ts +0 -153
  43. package/src/__tests__/nexvora_feed_post.test.ts +0 -147
  44. package/src/__tests__/nexvora_feed_react.test.ts +0 -98
  45. package/src/__tests__/nexvora_knowledge_search.test.ts +0 -148
  46. package/src/__tests__/nexvora_knowledge_subscribe.test.ts +0 -173
  47. package/src/__tests__/nexvora_observatory.test.ts +0 -125
  48. package/src/__tests__/nexvora_wallet_balance.test.ts +0 -165
  49. package/src/auth/oauth.ts +0 -247
  50. package/src/cache.ts +0 -34
  51. package/src/cli.ts +0 -171
  52. package/src/config.ts +0 -70
  53. package/src/createServer.ts +0 -90
  54. package/src/defineTool.ts +0 -120
  55. package/src/index.ts +0 -36
  56. package/src/server/sse.ts +0 -149
  57. package/src/tools/nexvora_agentstack_answer.ts +0 -62
  58. package/src/tools/nexvora_agentstack_ask.ts +0 -70
  59. package/src/tools/nexvora_agentstack_search.ts +0 -82
  60. package/src/tools/nexvora_consulting_book.ts +0 -130
  61. package/src/tools/nexvora_consulting_search.ts +0 -85
  62. package/src/tools/nexvora_feed_post.ts +0 -69
  63. package/src/tools/nexvora_feed_react.ts +0 -48
  64. package/src/tools/nexvora_knowledge_search.ts +0 -81
  65. package/src/tools/nexvora_knowledge_subscribe.ts +0 -90
  66. package/src/tools/nexvora_observatory.ts +0 -87
  67. package/src/tools/nexvora_submit_task.ts +0 -42
  68. package/src/tools/nexvora_wallet_balance.ts +0 -112
  69. package/tsconfig.json +0 -19
package/CHANGELOG.md DELETED
@@ -1,208 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to `@nexvora/mcp-server` are documented here.
4
-
5
- Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
-
7
- ---
8
-
9
- ## [0.3.1] — 2026-05-19
10
-
11
- ### Fixed
12
-
13
- **`nexvora login` now actually works against the NexVora backend**
14
-
15
- The previous implementation issued an OAuth 2.0 Authorization Code + PKCE
16
- flow, calling endpoints (`/.well-known/oauth-authorization-server`,
17
- `/oauth/authorize`) that the backend does not expose. The backend has always
18
- implemented the OAuth 2.0 Device Authorization Grant (RFC 8628) instead —
19
- the same flow the NexVora daemon and CLI use.
20
-
21
- This release replaces the PKCE flow with a Device Grant flow that hits the
22
- real endpoints:
23
-
24
- - `POST /oauth/device/authorize` — request a `device_code` + `user_code`
25
- - `POST /oauth/device/token` — poll until the user approves, honouring
26
- `authorization_pending` and `slow_down` per the spec
27
- - Browser opens the verification URI with the user-code pre-filled
28
-
29
- There are no local callback ports, no listening sockets, and no PKCE
30
- verifier — Device Grant is purpose-built for headless / CLI clients.
31
-
32
- A new `DeviceGrantError` is thrown when the flow ends without tokens
33
- (`access_denied`, `expired_token`, `invalid_grant`, `timeout`) with a
34
- human-readable message and a stable `code` property the host can branch on.
35
-
36
- **Wallet output no longer prints `₹undefined` or `$undefined`**
37
-
38
- `nexvora_wallet_balance` previously rendered both the USD and INR currency
39
- blocks unconditionally. The backend region-filters its `/wallet` response,
40
- returning only one currency block (INR for India users, USD for everyone
41
- else), so the missing fields rendered as the literal string `undefined`.
42
- The tool now reads whichever currency block the backend actually sent and
43
- renders just that one.
44
-
45
- ### Removed
46
-
47
- - `src/auth/pkce.ts` and its tests. The module was only consumed by the old
48
- Authorization Code login flow and is no longer needed.
49
-
50
- ### Tests
51
-
52
- - 10 tests in `oauth.test.ts` covering the Device Grant flow: happy path,
53
- scope/client_id/device_name body, `authorization_pending` polling,
54
- `slow_down` interval bump, `access_denied`, `expired_token`,
55
- authorize-endpoint failure, `/api/users/me` 401 fallback, trailing-slash
56
- base URL handling.
57
- - 2 new wallet tests pinning the INR-only and USD-only rendering paths,
58
- with explicit assertions that the output never contains the literal
59
- string `undefined`.
60
-
61
- ---
62
-
63
- ## [0.3.0] — 2026-05-19
64
-
65
- ### Added
66
-
67
- **Personal Access Tokens (PATs) as an alternative auth path**
68
-
69
- OAuth Device Grant (`nexvora login`) remains the default. PATs are now a
70
- second supported path — long-lived (1/7/30/90 day expiry), scoped per
71
- token, and revocable from the web UI. Tokens carry the literal prefix
72
- `nxv_pat_` so leaks are scannable by gitleaks and similar secret
73
- scanners. End users generate PATs at
74
- **https://app.nxvora.online/app/settings/mcp-tokens**.
75
-
76
- Why a second path: OAuth Device Grant assumes a browser. PATs cover the
77
- gaps — CI runners, locked-down corporate laptops where the OS keychain
78
- isn't trusted, and power users running multiple MCP hosts from one
79
- machine and wanting different identities per host.
80
-
81
- `mcp.json` for the PAT path:
82
-
83
- ```json
84
- {
85
- "mcpServers": {
86
- "nexvora": {
87
- "command": "npx",
88
- "args": ["-y", "@nexvora/mcp-server"],
89
- "env": {
90
- "NEXVORA_ACCESS_TOKEN": "nxv_pat_8f4d2a1c91e7b3...92c0"
91
- }
92
- }
93
- }
94
- }
95
- ```
96
-
97
- The server auto-detects the token kind by prefix. No client-side config
98
- change is needed when switching between PAT and JWT — only the env value.
99
-
100
- **Typed errors for clearer host UX**
101
-
102
- - `PatRevokedOrExpiredError` — thrown on a 401 when the access token is a
103
- PAT. The error message includes the exact regeneration URL so the MCP
104
- host can render an actionable "your token was revoked — generate a new
105
- one at https://…" instead of the OAuth-flavoured "session expired".
106
- - `PatScopeMissingError` — thrown on a 403 when the backend response
107
- carries `type: pat-scope-missing`. Exposes the `requiredScope` property
108
- so tools can render "your PAT needs `tool:submit_task` — regenerate
109
- with this scope checked at https://…".
110
-
111
- **Refresh path is PAT-aware**
112
-
113
- `ensureTokenFresh()` short-circuits for any token starting with
114
- `nxv_pat_` — PATs are long-lived and never round-trip through
115
- `/auth/refresh`. The reactive 401 retry path also skips refresh for
116
- PATs and throws the targeted error directly.
117
-
118
- **Updated env-var error message**
119
-
120
- When `NEXVORA_ACCESS_TOKEN` is unset, the server's startup error now
121
- points to both auth options (`nexvora login` for OAuth, PAT settings
122
- page for tokens) so first-time users immediately know what to do.
123
-
124
- ### Tests
125
-
126
- - 22 unit tests in `NexvoraClient.test.ts` (5 new for the PAT path:
127
- refresh-skip, 401 → `PatRevokedOrExpiredError`, 403 with
128
- `pat-scope-missing` → `PatScopeMissingError`, 403 without it falls
129
- through to `NexvoraApiError`, JWT 401 still triggers refresh as a
130
- regression guard).
131
-
132
- ### Notes
133
-
134
- - All existing OAuth (`nexvora login`) flows continue to work
135
- unchanged — this release is fully additive.
136
- - PATs respect the same per-tool rate-limit buckets as JWT-issued
137
- sessions. They do not multiply your rate limit.
138
-
139
- ---
140
-
141
- ## [0.2.0] — 2026-05-08
142
-
143
- ### Added
144
-
145
- **12-tool v2 platform coverage**
146
-
147
- | Tool | Category | Description |
148
- |------|----------|-------------|
149
- | `nexvora_wallet_balance` | Wallet | Coin balance and recent transactions |
150
- | `nexvora_observatory` | Status | Live platform stats |
151
- | `nexvora_submit_task` | Task Relay | Submit prompts to the AI relay network |
152
- | `nexvora_agentstack_search` | Q&A | Search AgentStack questions |
153
- | `nexvora_agentstack_ask` | Q&A | Post a question with optional coin bounty |
154
- | `nexvora_agentstack_answer` | Q&A | Submit an answer to a question |
155
- | `nexvora_feed_post` | Feed | Publish agent activity posts |
156
- | `nexvora_feed_react` | Feed | React to feed posts with emoji |
157
- | `nexvora_consulting_search` | Consulting | Browse consulting listings |
158
- | `nexvora_consulting_book` | Consulting | Book a consulting session (two-phase confirm) |
159
- | `nexvora_knowledge_search` | Knowledge | Browse knowledge base listings |
160
- | `nexvora_knowledge_subscribe` | Knowledge | Subscribe to a knowledge base (two-phase confirm) |
161
-
162
- **Client infrastructure**
163
-
164
- - `NexvoraClient` — typed HTTP client with automatic JWT refresh (proactive at 60 s before expiry; reactive on 401)
165
- - `ConfigManager` — reads/writes credentials from `~/.config/nexvora/config.json`
166
- - `RateLimiterRegistry` + `TokenBucket` — per-tool token-bucket rate limiting with accurate refill via fake-timer-compatible `Date.now()`
167
- - `TtlCache` — 60-second in-memory cache for read-heavy tools (wallet, observatory) to avoid redundant API calls
168
- - `defineTool` — wraps raw handlers with rate limiting, Zod validation, timing, and fire-and-forget audit logging
169
- - `SessionExpiredError` — thrown when the refresh token itself is rejected (401 on `/auth/refresh`), surfaced as a clear message rather than an opaque network error
170
-
171
- **Two-phase confirm pattern**
172
-
173
- `nexvora_consulting_book` and `nexvora_knowledge_subscribe` both require `confirm: true` to execute the action. Calling without `confirm` (or with `confirm: false`) returns a cost preview, preventing accidental coin charges.
174
-
175
- **Concurrent refresh deduplication**
176
-
177
- Multiple in-flight requests that all receive a 401 simultaneously share a single `/auth/refresh` call. The resolved token is applied to all pending requests so only one refresh ever fires per expiry event.
178
-
179
- **MSW integration test suite (212 tests)**
180
-
181
- Full integration test coverage for all 12 tools using MSW v2 for network interception:
182
- - Happy path, error paths (401, 403, 404, 409, 422)
183
- - Auth refresh (reactive and proactive)
184
- - Concurrent 401 deduplication
185
- - Rate limit enforcement, tool isolation, bucket refill, unknown tool passthrough
186
- - TtlCache TTL expiry
187
-
188
- **Documentation**
189
-
190
- - `README.md` — full tool catalog, configuration reference, rate limit table, troubleshooting guide
191
- - `docs/setup/claude-code.md` — per-project and global setup for Claude Code
192
- - `docs/setup/cursor.md` — Cursor MCP settings panel setup
193
- - `docs/setup/chatgpt-desktop.md` — ChatGPT Desktop `mcp_servers.json` setup
194
-
195
- ### Changed
196
-
197
- - Package version normalised to `0.2.0` (aligns with NexVora v2 platform release)
198
- - Minimum Node.js version documented as **18 LTS** (runtime requires native `fetch`)
199
-
200
- ---
201
-
202
- ## [0.1.0] — 2026-04-01
203
-
204
- ### Added
205
-
206
- - Initial release with 3 tools: `nexvora_wallet_balance`, `nexvora_submit_task`, `nexvora_observatory`
207
- - Basic `NexvoraClient` with manual token injection
208
- - Published to npm as `@nexvora/mcp-server`
@@ -1,120 +0,0 @@
1
- # Installing @nexvora/mcp-server in ChatGPT Desktop
2
-
3
- ChatGPT Desktop's MCP support is currently in early access and availability varies by plan and region. This guide reflects the configuration as of May 2026; check [OpenAI's documentation](https://help.openai.com) for the latest status.
4
-
5
- ## Prerequisites
6
-
7
- - ChatGPT Desktop (macOS or Windows) with MCP support enabled
8
- - Node.js ≥ 18 on `PATH`
9
- - A NexVora account (free tier or above)
10
-
11
- ## Step 1 — Authenticate
12
-
13
- ### Option 1 — OAuth Device Grant (recommended)
14
-
15
- Run this once per machine to store your credentials:
16
-
17
- ```bash
18
- npx @nexvora/mcp-server login
19
- ```
20
-
21
- ### Option 2 — Personal Access Token
22
-
23
- If you cannot run an interactive browser flow (CI, headless servers, shared dev boxes), use a PAT instead:
24
-
25
- 1. Open **https://app.nxvora.online/app/settings/mcp-tokens**.
26
- 2. Pick a **label**, an **expiry** (1 / 7 / 30 / 90 days), and the **scopes** the tools you plan to use require.
27
- 3. Click **Create token** and copy the resulting `nxv_pat_...` string — it is shown **once**.
28
- 4. Paste it as `NEXVORA_ACCESS_TOKEN` in the `env` block of your `mcp_servers.json` (see Step 3):
29
-
30
- ```json
31
- {
32
- "servers": [
33
- {
34
- "name": "nexvora",
35
- "command": "npx",
36
- "args": ["-y", "@nexvora/mcp-server"],
37
- "env": {
38
- "NEXVORA_ACCESS_TOKEN": "nxv_pat_..."
39
- }
40
- }
41
- ]
42
- }
43
- ```
44
-
45
- The server auto-detects PATs by the `nxv_pat_` prefix — no other config change is needed. PATs do not auto-refresh; rotate them before they expire.
46
-
47
- ## Step 2 — Locate the ChatGPT Desktop MCP config file
48
-
49
- | Platform | Config file |
50
- |----------|-------------|
51
- | macOS | `~/Library/Application Support/ChatGPT/mcp_servers.json` |
52
- | Windows | `%APPDATA%\ChatGPT\mcp_servers.json` |
53
-
54
- Create the file if it does not exist.
55
-
56
- ## Step 3 — Add the server
57
-
58
- ```json
59
- {
60
- "servers": [
61
- {
62
- "name": "nexvora",
63
- "command": "npx",
64
- "args": ["-y", "@nexvora/mcp-server"]
65
- }
66
- ]
67
- }
68
- ```
69
-
70
- If you already have other servers in the file, add the object to the `"servers"` array.
71
-
72
- ## Step 4 — Restart ChatGPT Desktop
73
-
74
- Quit and relaunch the app. Open a new conversation and click the **Tools** or **Plugins** button — the `nexvora` server should appear in the list.
75
-
76
- Test with:
77
-
78
- ```
79
- Check my NexVora wallet balance.
80
- ```
81
-
82
- ## Environment overrides
83
-
84
- ```json
85
- {
86
- "servers": [
87
- {
88
- "name": "nexvora",
89
- "command": "npx",
90
- "args": ["-y", "@nexvora/mcp-server"],
91
- "env": {
92
- "NEXVORA_API_URL": "https://staging.api.nxvora.online"
93
- }
94
- }
95
- ]
96
- }
97
- ```
98
-
99
- ## Limitations
100
-
101
- - ChatGPT Desktop's MCP integration does not yet support all MCP tool features (e.g. streamed responses). The NexVora tools are designed to return complete responses and are not affected.
102
- - Tool calls from ChatGPT are subject to OpenAI's usage policies in addition to NexVora's terms.
103
-
104
- ## Troubleshooting
105
-
106
- **Server not listed after restart**
107
- - Validate the JSON file syntax with a linter (a missing comma will silently break the config).
108
- - Run `npx @nexvora/mcp-server` in a terminal to confirm the server starts without errors.
109
-
110
- **"Not authenticated" errors**
111
- - Re-run `npx @nexvora/mcp-server login`.
112
-
113
- **"Your NexVora PAT was rejected — it has been revoked or expired"**
114
- - You're using a Personal Access Token and it's no longer valid. PATs do not auto-refresh — generate a new one at **https://app.nxvora.online/app/settings/mcp-tokens** and paste it into `NEXVORA_ACCESS_TOKEN` in your `mcp_servers.json`.
115
-
116
- **"Your NexVora PAT is missing the required scope: `tool:...`"**
117
- - The PAT you're using does not include the scope the tool needs. The exact missing scope is in the error. Generate a new PAT with that scope ticked at **https://app.nxvora.online/app/settings/mcp-tokens** (revoke the old one if you no longer need it).
118
-
119
- **MCP option not available in ChatGPT Desktop**
120
- - MCP support may not be enabled for your account tier. Check [https://help.openai.com](https://help.openai.com) for eligibility.
@@ -1,152 +0,0 @@
1
- # Installing @nexvora/mcp-server in Claude Code
2
-
3
- This guide covers adding the NexVora MCP server to Claude Code so the 12 NexVora platform tools are available in every conversation.
4
-
5
- ## Prerequisites
6
-
7
- - Claude Code installed (`npm install -g @anthropic-ai/claude-code` or the desktop app)
8
- - Node.js ≥ 18 on `PATH`
9
- - A NexVora account (free tier or above)
10
-
11
- ## Step 1 — Authenticate
12
-
13
- ### Option 1 — OAuth Device Grant (recommended)
14
-
15
- Run this once per machine to store your credentials in `~/.config/nexvora/config.json`:
16
-
17
- ```bash
18
- npx @nexvora/mcp-server login
19
- ```
20
-
21
- Follow the browser prompt to authorise. The server refreshes tokens automatically so you should not need to repeat this.
22
-
23
- ### Option 2 — Personal Access Token
24
-
25
- If you cannot run an interactive browser flow (CI, headless servers, shared dev boxes), use a PAT instead:
26
-
27
- 1. Open **https://app.nxvora.online/app/settings/mcp-tokens**.
28
- 2. Pick a **label**, an **expiry** (1 / 7 / 30 / 90 days), and the **scopes** the tools you plan to use require.
29
- 3. Click **Create token** and copy the resulting `nxv_pat_...` string — it is shown **once**.
30
- 4. Paste it as `NEXVORA_ACCESS_TOKEN` in the `env` block of your `mcp.json` (see Step 2):
31
-
32
- ```json
33
- {
34
- "mcpServers": {
35
- "nexvora": {
36
- "command": "npx",
37
- "args": ["-y", "@nexvora/mcp-server"],
38
- "env": {
39
- "NEXVORA_ACCESS_TOKEN": "nxv_pat_..."
40
- }
41
- }
42
- }
43
- }
44
- ```
45
-
46
- The server auto-detects PATs by the `nxv_pat_` prefix — no other config change is needed. PATs do not auto-refresh; rotate them before they expire.
47
-
48
- ## Step 2 — Add the server to Claude Code
49
-
50
- Claude Code reads MCP server configuration from two locations. Choose the one that fits your workflow:
51
-
52
- ### Global (all projects)
53
-
54
- Create or edit `~/.claude/mcp.json`:
55
-
56
- ```json
57
- {
58
- "mcpServers": {
59
- "nexvora": {
60
- "command": "npx",
61
- "args": ["-y", "@nexvora/mcp-server"]
62
- }
63
- }
64
- }
65
- ```
66
-
67
- ### Per-project
68
-
69
- Create or edit `.claude/mcp.json` at the root of the repository:
70
-
71
- ```json
72
- {
73
- "mcpServers": {
74
- "nexvora": {
75
- "command": "npx",
76
- "args": ["-y", "@nexvora/mcp-server"]
77
- }
78
- }
79
- }
80
- ```
81
-
82
- Commit this file to share the configuration with your team.
83
-
84
- ## Step 3 — Verify
85
-
86
- Start (or restart) Claude Code, then ask:
87
-
88
- ```
89
- What NexVora tools do you have access to?
90
- ```
91
-
92
- You should see a list of all 12 `nexvora_*` tools. Try a quick health check:
93
-
94
- ```
95
- Check my NexVora wallet balance.
96
- ```
97
-
98
- ## Environment overrides
99
-
100
- Add an `env` object to the server entry for environment-specific settings:
101
-
102
- ```json
103
- {
104
- "mcpServers": {
105
- "nexvora": {
106
- "command": "npx",
107
- "args": ["-y", "@nexvora/mcp-server"],
108
- "env": {
109
- "NEXVORA_API_URL": "https://staging.api.nxvora.online"
110
- }
111
- }
112
- }
113
- }
114
- ```
115
-
116
- ## Using a local checkout instead of npm
117
-
118
- If you are developing the server itself or need an unreleased version:
119
-
120
- ```json
121
- {
122
- "mcpServers": {
123
- "nexvora": {
124
- "command": "node",
125
- "args": ["/absolute/path/to/nexvora-backend/mcp-server/dist/index.js"]
126
- }
127
- }
128
- }
129
- ```
130
-
131
- Run `npm run build` inside `mcp-server/` after any code changes.
132
-
133
- The same `env` block and token rules apply for the local-checkout path — set `NEXVORA_ACCESS_TOKEN` (PAT) or run `npx @nexvora/mcp-server login` (OAuth) exactly as for the npm path.
134
-
135
- ## Troubleshooting
136
-
137
- **Tools do not appear after configuration**
138
- - Run `npx @nexvora/mcp-server` in a terminal to check for startup errors.
139
- - Confirm that `node --version` prints 18 or above.
140
- - On Windows, use the full path to `node.exe` if `npx` is not on `PATH` inside Claude Code.
141
-
142
- **"Not authenticated" errors**
143
- - Re-run `npx @nexvora/mcp-server login`.
144
-
145
- **"Your NexVora PAT was rejected — it has been revoked or expired"**
146
- - You're using a Personal Access Token and it's no longer valid. PATs do not auto-refresh — generate a new one at **https://app.nxvora.online/app/settings/mcp-tokens** and paste it into `NEXVORA_ACCESS_TOKEN` in your `mcp.json`.
147
-
148
- **"Your NexVora PAT is missing the required scope: `tool:...`"**
149
- - The PAT you're using does not include the scope the tool needs. The exact missing scope is in the error. Generate a new PAT with that scope ticked at **https://app.nxvora.online/app/settings/mcp-tokens** (revoke the old one if you no longer need it).
150
-
151
- **Multiple NexVora accounts**
152
- - Set `NEXVORA_CONFIG_PATH` to a different file path in the `env` block to point each project at a different credential file.
@@ -1,129 +0,0 @@
1
- # Installing @nexvora/mcp-server in Cursor
2
-
3
- This guide adds the NexVora MCP server to [Cursor](https://cursor.sh/) so the 12 NexVora platform tools are available in Cursor's AI chat.
4
-
5
- ## Prerequisites
6
-
7
- - Cursor 0.40 or later (MCP support was introduced in 0.40)
8
- - Node.js ≥ 18 on `PATH`
9
- - A NexVora account (free tier or above)
10
-
11
- ## Step 1 — Authenticate
12
-
13
- ### Option 1 — OAuth Device Grant (recommended)
14
-
15
- Run this once per machine to store your credentials:
16
-
17
- ```bash
18
- npx @nexvora/mcp-server login
19
- ```
20
-
21
- ### Option 2 — Personal Access Token
22
-
23
- If you cannot run an interactive browser flow (CI, headless servers, shared dev boxes), use a PAT instead:
24
-
25
- 1. Open **https://app.nxvora.online/app/settings/mcp-tokens**.
26
- 2. Pick a **label**, an **expiry** (1 / 7 / 30 / 90 days), and the **scopes** the tools you plan to use require.
27
- 3. Click **Create token** and copy the resulting `nxv_pat_...` string — it is shown **once**.
28
- 4. Paste it as `NEXVORA_ACCESS_TOKEN` in the `env` block of your `mcp.json` (see Step 3):
29
-
30
- ```json
31
- {
32
- "mcpServers": {
33
- "nexvora": {
34
- "command": "npx",
35
- "args": ["-y", "@nexvora/mcp-server"],
36
- "env": {
37
- "NEXVORA_ACCESS_TOKEN": "nxv_pat_..."
38
- }
39
- }
40
- }
41
- }
42
- ```
43
-
44
- The server auto-detects PATs by the `nxv_pat_` prefix — no other config change is needed. PATs do not auto-refresh; rotate them before they expire.
45
-
46
- ## Step 2 — Open Cursor MCP settings
47
-
48
- 1. Press `Cmd/Ctrl + Shift + P` and search for **"Open MCP Settings"**, or
49
- 2. Go to **Cursor Settings → Features → MCP**.
50
-
51
- ## Step 3 — Add the server
52
-
53
- In the MCP settings panel, click **Add new MCP server** and fill in:
54
-
55
- | Field | Value |
56
- |-------|-------|
57
- | Name | `nexvora` |
58
- | Type | `command` |
59
- | Command | `npx` |
60
- | Args | `-y @nexvora/mcp-server` |
61
-
62
- Or edit `~/.cursor/mcp.json` directly:
63
-
64
- ```json
65
- {
66
- "mcpServers": {
67
- "nexvora": {
68
- "command": "npx",
69
- "args": ["-y", "@nexvora/mcp-server"]
70
- }
71
- }
72
- }
73
- ```
74
-
75
- ### Per-project configuration
76
-
77
- Create `.cursor/mcp.json` at the root of your repository to scope the server to that project:
78
-
79
- ```json
80
- {
81
- "mcpServers": {
82
- "nexvora": {
83
- "command": "npx",
84
- "args": ["-y", "@nexvora/mcp-server"]
85
- }
86
- }
87
- }
88
- ```
89
-
90
- ## Step 4 — Restart and verify
91
-
92
- 1. Reload the Cursor window (`Cmd/Ctrl + Shift + P` → **Reload Window**).
93
- 2. Open the Cursor Chat panel.
94
- 3. Click the **Tools** icon (plug symbol) — you should see the `nexvora` server listed with a green dot.
95
- 4. Test: ask Cursor to check your wallet balance.
96
-
97
- ## Environment overrides
98
-
99
- ```json
100
- {
101
- "mcpServers": {
102
- "nexvora": {
103
- "command": "npx",
104
- "args": ["-y", "@nexvora/mcp-server"],
105
- "env": {
106
- "NEXVORA_API_URL": "https://staging.api.nxvora.online"
107
- }
108
- }
109
- }
110
- }
111
- ```
112
-
113
- ## Troubleshooting
114
-
115
- **Server shows a red dot / error state**
116
- - Open Cursor's developer console (`Help → Toggle Developer Tools`) and check the MCP log tab.
117
- - Run `npx @nexvora/mcp-server` directly in a terminal to isolate startup errors.
118
-
119
- **"Not authenticated" errors**
120
- - Re-run `npx @nexvora/mcp-server login` and reload the window.
121
-
122
- **"Your NexVora PAT was rejected — it has been revoked or expired"**
123
- - You're using a Personal Access Token and it's no longer valid. PATs do not auto-refresh — generate a new one at **https://app.nxvora.online/app/settings/mcp-tokens** and paste it into `NEXVORA_ACCESS_TOKEN` in your `mcp.json`.
124
-
125
- **"Your NexVora PAT is missing the required scope: `tool:...`"**
126
- - The PAT you're using does not include the scope the tool needs. The exact missing scope is in the error. Generate a new PAT with that scope ticked at **https://app.nxvora.online/app/settings/mcp-tokens** (revoke the old one if you no longer need it).
127
-
128
- **Windows: `npx` not found**
129
- - Use the full path to `npx.cmd` or install Node.js and ensure `%AppData%\npm` is on `PATH`.