@rvry/mcp 0.4.0 → 0.4.2
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.
- package/dist/client.js +1 -0
- package/dist/fetch.d.ts +12 -0
- package/dist/fetch.js +30 -0
- package/dist/setup.js +12 -10
- package/package.json +1 -1
package/dist/client.js
CHANGED
package/dist/fetch.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portable fetch — uses globalThis.fetch if available, falls back to
|
|
3
|
+
* Node's bundled undici (ships with Node 18+, no extra install).
|
|
4
|
+
*
|
|
5
|
+
* Delegates at call time (not import time) so globalThis.fetch can be
|
|
6
|
+
* overridden in tests.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Portable fetch that delegates to globalThis.fetch (checked at call time)
|
|
10
|
+
* or the undici fallback resolved at import time.
|
|
11
|
+
*/
|
|
12
|
+
export declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
package/dist/fetch.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Portable fetch — uses globalThis.fetch if available, falls back to
|
|
3
|
+
* Node's bundled undici (ships with Node 18+, no extra install).
|
|
4
|
+
*
|
|
5
|
+
* Delegates at call time (not import time) so globalThis.fetch can be
|
|
6
|
+
* overridden in tests.
|
|
7
|
+
*/
|
|
8
|
+
let _undiciFetch = null;
|
|
9
|
+
if (typeof globalThis.fetch !== 'function') {
|
|
10
|
+
try {
|
|
11
|
+
// @ts-ignore -- undici has no type declarations in this package; runtime-only fallback
|
|
12
|
+
const mod = await import('undici');
|
|
13
|
+
_undiciFetch = mod.fetch;
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
throw new Error('[rvry-mcp] fetch is not available and undici import failed. ' +
|
|
17
|
+
'Node.js 18.13.0+ or Bun is required. Current version: ' + process.version);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Portable fetch that delegates to globalThis.fetch (checked at call time)
|
|
22
|
+
* or the undici fallback resolved at import time.
|
|
23
|
+
*/
|
|
24
|
+
export function fetch(input, init) {
|
|
25
|
+
const fn = globalThis.fetch ?? _undiciFetch;
|
|
26
|
+
if (!fn) {
|
|
27
|
+
throw new Error('[rvry-mcp] No fetch implementation available.');
|
|
28
|
+
}
|
|
29
|
+
return fn(input, init);
|
|
30
|
+
}
|
package/dist/setup.js
CHANGED
|
@@ -16,6 +16,7 @@ import { createInterface } from 'readline';
|
|
|
16
16
|
import { execSync } from 'child_process';
|
|
17
17
|
import { platform } from 'os';
|
|
18
18
|
import { createRequire } from 'module';
|
|
19
|
+
import { fetch } from './fetch.js';
|
|
19
20
|
const require = createRequire(import.meta.url);
|
|
20
21
|
const PKG_VERSION = require('../package.json').version;
|
|
21
22
|
const ENGINE_URL = 'https://engine.rvry.ai';
|
|
@@ -927,6 +928,17 @@ export async function runSetup() {
|
|
|
927
928
|
console.log(` ${step}. Restart desktop apps for the new MCP server to load`);
|
|
928
929
|
step++;
|
|
929
930
|
}
|
|
931
|
+
// Generic MCP config for any client
|
|
932
|
+
console.log(` ${step}. Add RVRY to any other MCP-compatible client —`);
|
|
933
|
+
console.log(' add this to your MCP config:');
|
|
934
|
+
console.log('');
|
|
935
|
+
const mcpBlock = { rvry: RVRY_SERVER_ENTRY('YOUR_RVRY_TOKEN') };
|
|
936
|
+
const lines = JSON.stringify(mcpBlock, null, 2).split('\n');
|
|
937
|
+
for (const line of lines.slice(1, -1)) {
|
|
938
|
+
console.log(` ${line}`);
|
|
939
|
+
}
|
|
940
|
+
console.log('');
|
|
941
|
+
step++;
|
|
930
942
|
if (hasCodeStyle) {
|
|
931
943
|
console.log(` ${step}. In Claude Code, try:`);
|
|
932
944
|
console.log(' /deepthink "your question"');
|
|
@@ -942,14 +954,4 @@ export async function runSetup() {
|
|
|
942
954
|
console.log(' 1. Configure a client using the manual instructions above');
|
|
943
955
|
console.log(' 2. Then try: /deepthink "your question"');
|
|
944
956
|
}
|
|
945
|
-
// Generic MCP config for any client
|
|
946
|
-
console.log(` ${step}. Add RVRY to any other MCP-compatible client —`);
|
|
947
|
-
console.log(' add this to your MCP config:');
|
|
948
|
-
console.log('');
|
|
949
|
-
const mcpBlock = { rvry: RVRY_SERVER_ENTRY('YOUR_RVRY_TOKEN') };
|
|
950
|
-
const lines = JSON.stringify(mcpBlock, null, 2).split('\n');
|
|
951
|
-
for (const line of lines.slice(1, -1)) {
|
|
952
|
-
console.log(` ${line}`);
|
|
953
|
-
}
|
|
954
|
-
console.log('');
|
|
955
957
|
}
|