@goke/mcp 0.0.10 → 0.0.11
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/README.md +3 -0
- package/dist/auth.d.ts +4 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +4 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +2 -2
- package/src/auth.ts +4 -2
- package/src/index.ts +3 -2
package/README.md
CHANGED
|
@@ -51,6 +51,7 @@ await addMcpCommands({
|
|
|
51
51
|
})
|
|
52
52
|
|
|
53
53
|
cli.help()
|
|
54
|
+
cli.completions()
|
|
54
55
|
cli.parse()
|
|
55
56
|
```
|
|
56
57
|
|
|
@@ -93,6 +94,7 @@ cli.command("mcp", "Start MCP server over stdio")
|
|
|
93
94
|
.action(createMcpAction({ cli }))
|
|
94
95
|
|
|
95
96
|
cli.help()
|
|
97
|
+
cli.completions()
|
|
96
98
|
cli.parse()
|
|
97
99
|
```
|
|
98
100
|
|
|
@@ -452,6 +454,7 @@ cli.command('logout', 'Clear tokens').action(() => {
|
|
|
452
454
|
})
|
|
453
455
|
|
|
454
456
|
cli.help()
|
|
457
|
+
cli.completions()
|
|
455
458
|
cli.parse()
|
|
456
459
|
```
|
|
457
460
|
|
package/dist/auth.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { OAuthFlowResult, StartOAuthFlowOptions } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Start the OAuth flow for an MCP server.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
*
|
|
5
|
+
* Used internally by addMcpCommands on 401 errors, but also available
|
|
6
|
+
* for CLIs that need explicit control over the auth flow (e.g. a login
|
|
7
|
+
* command that runs the flow in a background daemon).
|
|
6
8
|
*
|
|
7
9
|
* This function:
|
|
8
10
|
* 1. Starts a local callback server on a random port
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA0BxF
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA0BxF;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CA4E7F;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAazD"}
|
package/dist/auth.js
CHANGED
|
@@ -24,8 +24,10 @@ async function openBrowser(url) {
|
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Start the OAuth flow for an MCP server.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
*
|
|
28
|
+
* Used internally by addMcpCommands on 401 errors, but also available
|
|
29
|
+
* for CLIs that need explicit control over the auth flow (e.g. a login
|
|
30
|
+
* command that runs the flow in a background daemon).
|
|
29
31
|
*
|
|
30
32
|
* This function:
|
|
31
33
|
* 1. Starts a local callback server on a random port
|
package/dist/index.d.ts
CHANGED
|
@@ -41,11 +41,12 @@
|
|
|
41
41
|
*/
|
|
42
42
|
import type { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
|
|
43
43
|
import type { Goke } from "goke";
|
|
44
|
+
export { startOAuthFlow } from "./auth.js";
|
|
44
45
|
import type { McpOAuthConfig } from "./types.js";
|
|
45
46
|
export { addCliToolsToMcp, createMcpAction } from "./cli-to-mcp.js";
|
|
46
47
|
export type { AddCliToolsToMcpOptions, CreateMcpActionOptions } from "./cli-to-mcp.js";
|
|
47
48
|
export type { Transport };
|
|
48
|
-
export type { McpOAuthConfig, McpOAuthState } from "./types.js";
|
|
49
|
+
export type { McpOAuthConfig, McpOAuthState, StartOAuthFlowOptions, OAuthFlowResult } from "./types.js";
|
|
49
50
|
export interface CachedMcpTools {
|
|
50
51
|
tools: Array<{
|
|
51
52
|
name: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAKjC,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpE,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAGvF,YAAY,EAAE,SAAS,EAAE,CAAC;AAC1B,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAKjC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpE,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAGvF,YAAY,EAAE,SAAS,EAAE,CAAC;AAC1B,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAExG,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC,CAAC;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,IAAI,CAAC;IACV;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAErC;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,SAAS,GAAG,IAAI,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAEvF;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,cAAc,GAAG,SAAS,CAAC;IAE5C;;OAEG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,KAAK,IAAI,CAAC;CACxD;AAmID;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyMlF"}
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ import { wrapJsonSchema } from "goke";
|
|
|
45
45
|
import yaml from "js-yaml";
|
|
46
46
|
import { FileOAuthProvider } from "./oauth-provider.js";
|
|
47
47
|
import { startOAuthFlow, isAuthRequiredError } from "./auth.js";
|
|
48
|
+
export { startOAuthFlow } from "./auth.js";
|
|
48
49
|
export { addCliToolsToMcp, createMcpAction } from "./cli-to-mcp.js";
|
|
49
50
|
const CACHE_TTL_MS = 60 * 60 * 1000; // 1 hour
|
|
50
51
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goke/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Dynamically generate CLI commands from MCP server tools",
|
|
6
6
|
"repository": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/node": "^22.19.7",
|
|
52
52
|
"vitest": "^3.1.0",
|
|
53
53
|
"zod": "^4.3.6",
|
|
54
|
-
"goke": "^6.
|
|
54
|
+
"goke": "^6.13.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"clean": "rm -rf dist",
|
package/src/auth.ts
CHANGED
|
@@ -29,8 +29,10 @@ async function openBrowser(url: string): Promise<void> {
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Start the OAuth flow for an MCP server.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
32
|
+
*
|
|
33
|
+
* Used internally by addMcpCommands on 401 errors, but also available
|
|
34
|
+
* for CLIs that need explicit control over the auth flow (e.g. a login
|
|
35
|
+
* command that runs the flow in a background daemon).
|
|
34
36
|
*
|
|
35
37
|
* This function:
|
|
36
38
|
* 1. Starts a local callback server on a random port
|
package/src/index.ts
CHANGED
|
@@ -48,13 +48,14 @@ import { wrapJsonSchema } from "goke";
|
|
|
48
48
|
import yaml from "js-yaml";
|
|
49
49
|
import { FileOAuthProvider } from "./oauth-provider.js";
|
|
50
50
|
import { startOAuthFlow, isAuthRequiredError } from "./auth.js";
|
|
51
|
+
export { startOAuthFlow } from "./auth.js";
|
|
51
52
|
import type { McpOAuthConfig, McpOAuthState } from "./types.js";
|
|
52
53
|
export { addCliToolsToMcp, createMcpAction } from "./cli-to-mcp.js";
|
|
53
54
|
export type { AddCliToolsToMcpOptions, CreateMcpActionOptions } from "./cli-to-mcp.js";
|
|
54
55
|
|
|
55
|
-
// Public exports
|
|
56
|
+
// Public exports
|
|
56
57
|
export type { Transport };
|
|
57
|
-
export type { McpOAuthConfig, McpOAuthState } from "./types.js";
|
|
58
|
+
export type { McpOAuthConfig, McpOAuthState, StartOAuthFlowOptions, OAuthFlowResult } from "./types.js";
|
|
58
59
|
|
|
59
60
|
export interface CachedMcpTools {
|
|
60
61
|
tools: Array<{
|