@mcp-use/cli 2.5.5 → 2.6.0-canary.10

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.
@@ -0,0 +1,58 @@
1
+ import type { CallToolResult } from "mcp-use";
2
+ /**
3
+ * Format data as a table with ASCII borders
4
+ */
5
+ export declare function formatTable(data: Array<Record<string, any>>, columns: Array<{
6
+ key: string;
7
+ header: string;
8
+ width?: number;
9
+ }>): string;
10
+ /**
11
+ * Format data as JSON
12
+ */
13
+ export declare function formatJson(data: any, pretty?: boolean): string;
14
+ /**
15
+ * Format a tool call result
16
+ */
17
+ export declare function formatToolCall(result: CallToolResult): string;
18
+ /**
19
+ * Format resource content
20
+ */
21
+ export declare function formatResourceContent(content: any): string;
22
+ /**
23
+ * Format a JSON schema in a readable way
24
+ */
25
+ export declare function formatSchema(schema: any, indent?: number): string;
26
+ /**
27
+ * Format a list of items with bullets
28
+ */
29
+ export declare function formatList(items: string[], bullet?: string): string;
30
+ /**
31
+ * Format an error message
32
+ */
33
+ export declare function formatError(error: Error | string): string;
34
+ /**
35
+ * Format a success message
36
+ */
37
+ export declare function formatSuccess(message: string): string;
38
+ /**
39
+ * Format an info message
40
+ */
41
+ export declare function formatInfo(message: string): string;
42
+ /**
43
+ * Format a warning message
44
+ */
45
+ export declare function formatWarning(message: string): string;
46
+ /**
47
+ * Create a section header
48
+ */
49
+ export declare function formatHeader(text: string): string;
50
+ /**
51
+ * Format key-value pairs
52
+ */
53
+ export declare function formatKeyValue(pairs: Record<string, string | number | boolean>): string;
54
+ /**
55
+ * Format prompt messages
56
+ */
57
+ export declare function formatPromptMessages(messages: any[]): string;
58
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;GAEG;AACH,wBAAgB,WAA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CAEhD"}
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAiBD;;GAEG;AACH,wBAAsB,SAAS,CAAC,GAAG,GAAE,MAAsB,GAAG,OAAO,CAAC,OAAO,CAAC,CAG7E;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,GACV;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAgBxC;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;AAED;;GAEG;AACH,wBAAsB,UAAU,CAC9B,GAAG,GAAE,MAAsB,GAC1B,OAAO,CAAC,OAAO,CAAC,CAgClB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAkBhD"}
@@ -0,0 +1,65 @@
1
+ export interface SessionConfig {
2
+ type: "http" | "stdio";
3
+ url?: string;
4
+ command?: string;
5
+ args?: string[];
6
+ env?: Record<string, string>;
7
+ authToken?: string;
8
+ lastUsed: string;
9
+ serverInfo?: {
10
+ name: string;
11
+ version?: string;
12
+ };
13
+ capabilities?: Record<string, unknown>;
14
+ }
15
+ export interface SessionStorage {
16
+ activeSession: string | null;
17
+ sessions: Record<string, SessionConfig>;
18
+ }
19
+ /**
20
+ * Load persisted sessions from disk
21
+ */
22
+ export declare function loadSessions(): Promise<SessionStorage>;
23
+ /**
24
+ * Save or update a session configuration
25
+ */
26
+ export declare function saveSession(name: string, config: SessionConfig): Promise<void>;
27
+ /**
28
+ * Remove a session from storage
29
+ */
30
+ export declare function removeSession(name: string): Promise<void>;
31
+ /**
32
+ * Get the currently active session name
33
+ */
34
+ export declare function getActiveSessionName(): Promise<string | null>;
35
+ /**
36
+ * Get the active session configuration
37
+ */
38
+ export declare function getActiveSession(): Promise<{
39
+ name: string;
40
+ config: SessionConfig;
41
+ } | null>;
42
+ /**
43
+ * Get a specific session configuration by name
44
+ */
45
+ export declare function getSession(name: string): Promise<SessionConfig | null>;
46
+ /**
47
+ * Set the active session
48
+ */
49
+ export declare function setActiveSession(name: string): Promise<void>;
50
+ /**
51
+ * List all stored sessions
52
+ */
53
+ export declare function listAllSessions(): Promise<Array<{
54
+ name: string;
55
+ config: SessionConfig;
56
+ isActive: boolean;
57
+ }>>;
58
+ /**
59
+ * Update session info after connection
60
+ */
61
+ export declare function updateSessionInfo(name: string, serverInfo: {
62
+ name: string;
63
+ version?: string;
64
+ }, capabilities?: Record<string, unknown>): Promise<void>;
65
+ //# sourceMappingURL=session-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-storage.d.ts","sourceRoot":"","sources":["../../src/utils/session-storage.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CA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AEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAC9C,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC,CAClE,CAQA;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAAC,IAAI,CAAC,CASf"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@mcp-use/cli",
3
- "version": "2.5.5",
3
+ "type": "module",
4
+ "version": "2.6.0-canary.10",
4
5
  "description": "The mcp-use CLI is a tool for building and deploying MCP servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.",
5
6
  "author": "mcp-use, Inc.",
6
7
  "license": "MIT",
@@ -8,7 +9,7 @@
8
9
  "repository": {
9
10
  "type": "git",
10
11
  "url": "git+https://github.com/mcp-use/mcp-use.git",
11
- "directory": "packages/cli"
12
+ "directory": "libraries/typescript/packages/cli"
12
13
  },
13
14
  "bugs": {
14
15
  "url": "https://github.com/mcp-use/mcp-use/issues"
@@ -26,11 +27,19 @@
26
27
  "typescript"
27
28
  ],
28
29
  "bin": {
29
- "mcp-use": "./dist/index.js"
30
+ "mcp-use": "./dist/index.cjs"
30
31
  },
31
32
  "files": [
32
33
  "dist"
33
34
  ],
35
+ "engines": {
36
+ "node": "^20.19.0 || >=22.12.0"
37
+ },
38
+ "peerDependencies": {
39
+ "react": "^18.0.0 || ^19.0.0",
40
+ "react-dom": "^18.0.0 || ^19.0.0",
41
+ "react-router-dom": "^7.0.0"
42
+ },
34
43
  "dependencies": {
35
44
  "@tailwindcss/vite": "^4.1.17",
36
45
  "@vitejs/plugin-react": "^5.1.1",
@@ -44,19 +53,22 @@
44
53
  "tsx": "^4.21.0",
45
54
  "vite": "^7.2.4",
46
55
  "ws": "^8.18.3",
47
- "@mcp-use/inspector": "0.12.5",
48
- "mcp-use": "1.10.5"
56
+ "@mcp-use/inspector": "0.13.0-canary.10",
57
+ "mcp-use": "1.11.0-canary.10"
49
58
  },
50
59
  "devDependencies": {
51
60
  "@types/node": "^24.10.1",
52
61
  "@types/ws": "^8.18.1",
53
- "typescript": "^5.9.3"
62
+ "typescript": "^5.9.3",
63
+ "vitest": "^4.0.14"
54
64
  },
55
65
  "publishConfig": {
56
66
  "access": "public"
57
67
  },
58
68
  "scripts": {
59
- "build": "tsup src/index.ts --format cjs,esm && tsc --emitDeclarationOnly --declaration",
60
- "dev": "tsc --watch"
69
+ "build": "tsup && tsc --emitDeclarationOnly --declaration",
70
+ "dev": "tsc --watch",
71
+ "test": "vitest run",
72
+ "test:watch": "vitest"
61
73
  }
62
74
  }