vpsyou-cn2 0.1.0 → 0.1.1
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 +12 -8
- package/dist/src/cli.js +5 -2
- package/dist/src/constants.js +1 -1
- package/docs/mcp.md +1 -1
- package/package.json +2 -2
- package/skills/vpsyou-cn2-latency/SKILL.md +9 -2
package/README.md
CHANGED
|
@@ -22,19 +22,23 @@ The checked connection record is [docs/mcp.md](docs/mcp.md): [OAuth metadata](do
|
|
|
22
22
|
|
|
23
23
|
## Command-line client
|
|
24
24
|
|
|
25
|
-
`vpsyou-cn2` calls `get_cn2_latency` on the endpoint above.
|
|
25
|
+
`vpsyou-cn2` calls `get_cn2_latency` on the endpoint above. The npm package name is `vpsyou-cn2`. This repository version is `0.1.1`.
|
|
26
26
|
|
|
27
27
|
```shell
|
|
28
|
-
npm install
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
npm install -g vpsyou-cn2
|
|
29
|
+
vpsyou-cn2 --help
|
|
30
|
+
vpsyou-cn2 login
|
|
31
|
+
vpsyou-cn2 targets
|
|
32
|
+
vpsyou-cn2 query --window live --json
|
|
33
|
+
vpsyou-cn2 logout
|
|
31
34
|
```
|
|
32
35
|
|
|
36
|
+
From a checkout of this repository, the same arguments run as `node dist/src/cli.js`:
|
|
37
|
+
|
|
33
38
|
```shell
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
node dist/src/cli.js
|
|
37
|
-
node dist/src/cli.js logout
|
|
39
|
+
npm install
|
|
40
|
+
npm run build
|
|
41
|
+
node dist/src/cli.js --help
|
|
38
42
|
```
|
|
39
43
|
|
|
40
44
|
`login` stores the sign-in in a user-only file and does not print it. `targets` lists the server's current windows and target ids. `query` defaults to `live`. Omit `--target` to omit `targetId`. Sign-in storage, scopes, and how to read the result are in [From-source client](docs/mcp.md#from-source-client).
|
package/dist/src/cli.js
CHANGED
|
@@ -75,8 +75,11 @@ Read CN2 latency and packet loss from the VPSYOU probe in Guangdong.
|
|
|
75
75
|
The endpoint is fixed at ${MCP_ENDPOINT} (Streamable HTTP, OAuth).
|
|
76
76
|
This client does not manage VPS instances and is not a global monitoring network.
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
Install the published package:
|
|
79
|
+
|
|
80
|
+
npm install -g vpsyou-cn2
|
|
81
|
+
|
|
82
|
+
From a checkout of this repository:
|
|
80
83
|
|
|
81
84
|
npm install
|
|
82
85
|
npm run build
|
package/dist/src/constants.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export const MCP_ENDPOINT = "https://vpsyou.com/mcp";
|
|
3
3
|
export const TOOL_NAME = "get_cn2_latency";
|
|
4
4
|
export const CLIENT_NAME = "vpsyou-cn2";
|
|
5
|
-
export const CLIENT_VERSION = "0.1.
|
|
5
|
+
export const CLIENT_VERSION = "0.1.1";
|
|
6
6
|
/** Read-only scope from the protected-resource metadata and the integration guide. */
|
|
7
7
|
export const READ_SCOPE = "cn2:read";
|
|
8
8
|
export const CALLBACK_HOST = "127.0.0.1";
|
package/docs/mcp.md
CHANGED
|
@@ -219,7 +219,7 @@ Sign in again from the client if a later request still returns 401 after you tho
|
|
|
219
219
|
|
|
220
220
|
## From-source client
|
|
221
221
|
|
|
222
|
-
`vpsyou-cn2` calls `get_cn2_latency` on the fixed endpoint.
|
|
222
|
+
`vpsyou-cn2` calls `get_cn2_latency` on the fixed endpoint. Install the published npm package with `npm install -g vpsyou-cn2`. This repository version is `0.1.1`. The commands are in the [README](../README.md#command-line-client).
|
|
223
223
|
|
|
224
224
|
`login` uses `@modelcontextprotocol/client` 2.4.0 for Streamable HTTP, protected-resource discovery, and OAuth with the authorization server's published registration endpoint. The browser step approves `cn2:read`. The SDK also sends `offline_access` when that scope is advertised and the client metadata includes the refresh-token grant. Tokens are written to a user-only file (`0600` on Unix) under `$XDG_CONFIG_HOME/vpsyou-cn2` or `~/.config/vpsyou-cn2`. `VPSYOU_CN2_CONFIG_DIR` changes that directory only. The command does not print the file, and there is no flag to point the client at another MCP host.
|
|
225
225
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vpsyou-cn2",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Read-only command-line client for the hosted VPSYOU CN2 MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"type": "git",
|
|
17
17
|
"url": "git+https://github.com/vpsyoucom/vpsyou-mcp.git"
|
|
18
18
|
},
|
|
19
|
-
"homepage": "https://
|
|
19
|
+
"homepage": "https://vpsyou.com",
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/vpsyoucom/vpsyou-mcp/issues"
|
|
22
22
|
},
|
|
@@ -7,11 +7,18 @@ description: Use when someone asks for VPSYOU CN2 latency or packet loss from th
|
|
|
7
7
|
|
|
8
8
|
Read latency and packet loss from the hosted VPSYOU MCP server at `https://vpsyou.com/mcp`. The only tool is `get_cn2_latency`. Measurements come from one ICMP probe in Guangdong. This is not VPS management and not a global monitoring network.
|
|
9
9
|
|
|
10
|
-
Use the
|
|
10
|
+
Use the `vpsyou-cn2` command. Do not call an undocumented HTTP API.
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Install the published npm package:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install -g vpsyou-cn2
|
|
18
|
+
vpsyou-cn2 --help
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The arguments below are the same after that install: replace `node dist/src/cli.js` with `vpsyou-cn2`. From a checkout of this repository:
|
|
15
22
|
|
|
16
23
|
```sh
|
|
17
24
|
npm install
|