@myspec/mcp-server 0.2.0-next.80 → 0.2.0-next.81
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 +4 -0
- package/dist/index.js +15 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,10 @@ value, including the dot** and paste it back into the terminal. Two traps:
|
|
|
64
64
|
without a person present (a server, a container, a CI job, a shared machine),
|
|
65
65
|
use an API token instead.
|
|
66
66
|
|
|
67
|
+
> Needs **`@myspec/mcp-server` 0.2.0 or newer** (`npm view @myspec/mcp-server
|
|
68
|
+
> version`). Earlier builds ignore the `apiToken` field and report that they are
|
|
69
|
+
> not signed in, without mentioning the version.
|
|
70
|
+
|
|
67
71
|
**1. Create the token.** In the MySpec webapp, open the avatar menu → **API
|
|
68
72
|
tokens** → **Create token**. Choose the organization it should act in, whether
|
|
69
73
|
it may write or only read, and an expiry. The token is shown **once**; it
|
package/dist/index.js
CHANGED
|
@@ -565,12 +565,20 @@ var TokenManager = class {
|
|
|
565
565
|
this.apiTokenRejection = rejection;
|
|
566
566
|
throw rejection;
|
|
567
567
|
}
|
|
568
|
+
if (response.status === 404) {
|
|
569
|
+
const body = await response.text().catch(() => "");
|
|
570
|
+
throw new HttpStatusError(
|
|
571
|
+
response.status,
|
|
572
|
+
body,
|
|
573
|
+
`Token exchange failed: ${url} returned 404, so no exchange endpoint is there. This URL comes from userAuthUrl in ~/.myspec/settings.json \u2014 check it names the environment the token was created in, and rewrite it with \`npx @myspec/mcp-server login --user-auth-url <url>\`. Note that --user-auth-url and MYSPEC_USER_AUTH_URL do not redirect the exchange on their own, and userAuthUrl in oauth_creds.json is ignored entirely.`
|
|
574
|
+
);
|
|
575
|
+
}
|
|
568
576
|
if (!response.ok) {
|
|
569
577
|
const body = await response.text().catch(() => "");
|
|
570
578
|
throw new HttpStatusError(
|
|
571
579
|
response.status,
|
|
572
580
|
body,
|
|
573
|
-
`Token exchange failed: HTTP ${String(response.status)}`
|
|
581
|
+
`Token exchange failed: HTTP ${String(response.status)} from ${url}`
|
|
574
582
|
);
|
|
575
583
|
}
|
|
576
584
|
const payload = await response.json().catch(() => null);
|
|
@@ -5057,13 +5065,16 @@ function printHelp() {
|
|
|
5057
5065
|
" login --org <slug> Sign in and pin that organization. Tokens only work",
|
|
5058
5066
|
" when an organization is active; the CLI asks when you",
|
|
5059
5067
|
" belong to several and this flag is not given.",
|
|
5060
|
-
" logout
|
|
5068
|
+
" logout Sign out and clear the session credentials. A",
|
|
5069
|
+
" configured apiToken is KEPT, so an unattended",
|
|
5070
|
+
" install keeps working.",
|
|
5061
5071
|
" reverse --root <dir> Connect to ai-agent and expose local_fs tools.",
|
|
5062
5072
|
" The agent WebSocket URL is discovered from the webapp",
|
|
5063
5073
|
" (GET /api/v1/config) using your saved credentials;",
|
|
5064
5074
|
" override with --agent-url <url> or MYSPEC_AI_AGENT_WS_URL.",
|
|
5065
|
-
" Uses the
|
|
5066
|
-
"
|
|
5075
|
+
" Uses the apiToken from ~/.myspec/oauth_creds.json if one",
|
|
5076
|
+
" is set, otherwise the refresh_token saved by `login`, to",
|
|
5077
|
+
" obtain & auto-refresh access tokens. Override with",
|
|
5067
5078
|
" --access-token <jwt> or MYSPEC_ACCESS_TOKEN for local testing.",
|
|
5068
5079
|
" --version Print version",
|
|
5069
5080
|
" --help Print this help",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myspec/mcp-server",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.81",
|
|
4
4
|
"description": "MySpec MCP server — exposes MySpec platform projects, files and attachments to MCP-aware clients via OAuth-authenticated access tokens.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|