@agent-proxy-kit/puraroute-mcp-server 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 CHANGED
@@ -1,3 +1,20 @@
1
1
  # PuraRoute Agent
2
2
 
3
- Install this reviewed brand package and run `puraroute-proxy-mcp --setup` for local MCP registration. The Agent Skill is in `bundle/skill/puraroute-proxy/`. For help, see https://puraroute.com.
3
+ This one npm package contains a local stdio MCP server and the PuraRoute Agent Skill. npm places both on disk; your Agent client still needs to register the MCP launcher and load the Skill folder.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install --global @agent-proxy-kit/puraroute-mcp-server
9
+ puraroute-proxy-mcp --setup
10
+ ```
11
+
12
+ The setup output prints the installed MCP launcher, the bundled Skill folder, the Codex and Claude Code user Skill destinations, and MCP registration examples. The package includes the full [setup guide](bundle/skill/puraroute-proxy/references/setup.md).
13
+
14
+ ## Ask your local Agent
15
+
16
+ Give an Agent with permission to operate your machine this task:
17
+
18
+ > Install @agent-proxy-kit/puraroute-mcp-server if needed and run `puraroute-proxy-mcp --setup`. Read its output and the bundled setup guide. Ask which Agent client I use. Copy the entire bundled Skill folder to that client's user Skill directory, checking before replacing an existing folder. Register the printed local stdio MCP launcher. Help me supply the approved HTTPS API origin and account API key through a trusted local secret source inherited by the client; do not ask me to paste the key into chat or put it in command arguments, project files, or Skill text. Restart or refresh the client, verify the Skill is available and the MCP service is `puraroute-proxy-mcp`, then compare its tools with the bundled manifest. Do not call purchase, renewal, or account-write tools merely to test setup. If you cannot access my machine, give me the exact manual steps instead.
19
+
20
+ Codex loads user Skills from `~/.agents/skills/puraroute-proxy`; Claude Code loads them from `~/.claude/skills/puraroute-proxy`. On Windows, use the equivalent folders under your home directory. The MCP process needs `PROXY_AGENT_API_ORIGIN` (approved HTTPS origin without a path) and `PROXY_AGENT_API_KEY` for the same instance. For help, see https://puraroute.com.
package/bundle/brand.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "serverName": "puraroute-proxy-mcp",
6
6
  "skillName": "puraroute-proxy",
7
7
  "supportUrl": "https://puraroute.com",
8
- "version": "0.1.0"
8
+ "version": "0.1.1"
9
9
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "bundleVersion": "0.1.0",
2
+ "bundleVersion": "0.1.1",
3
3
  "runtimeVersion": "0.1.0",
4
4
  "contractSha256": "bc4e1311eece2abf89405de88d1adc8fb4e7ff937ee2c83ae31d87b736a49af7",
5
5
  "toolSchemasSha256": "95ed1ca230f4197d012c356f366711510aaf2f7c132adbb9e6afe685a505fa6c",
package/bundle/setup.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { readFile } from "node:fs/promises";
3
+ import { homedir } from "node:os";
3
4
  import { dirname, join } from "node:path";
4
5
  import { fileURLToPath } from "node:url";
5
6
 
@@ -7,6 +8,8 @@ const bundleDir = dirname(fileURLToPath(import.meta.url));
7
8
  const brand = JSON.parse(await readFile(join(bundleDir, "brand.json"), "utf8"));
8
9
  const launcher = join(bundleDir, "run-mcp.mjs");
9
10
  const skill = join(bundleDir, "skill", brand.skillName);
11
+ const codexSkillTarget = join(homedir(), ".agents", "skills", brand.skillName);
12
+ const claudeSkillTarget = join(homedir(), ".claude", "skills", brand.skillName);
10
13
  const quotedLauncher =
11
14
  process.platform === "win32"
12
15
  ? `"${launcher}"`
@@ -16,12 +19,16 @@ process.stdout.write(
16
19
  `Brand package: ${brand.npmPackageName ?? brand.displayName}\n` +
17
20
  `MCP launcher: ${launcher}\n` +
18
21
  `Agent Skill folder: ${skill}\n` +
22
+ `Codex user Skill target: ${codexSkillTarget}\n` +
23
+ `Claude Code user Skill target: ${claudeSkillTarget}\n` +
24
+ `Copy the entire Skill folder to the target for the client you use; check before replacing an existing installation.\n` +
19
25
  `\nCodex config.toml:\n` +
20
26
  `[mcp_servers.${brand.serverName}]\n` +
21
27
  `command = "node"\n` +
22
28
  `args = [${JSON.stringify(launcher)}]\n` +
23
29
  `env_vars = ["PROXY_AGENT_API_ORIGIN", "PROXY_AGENT_API_KEY"]\n` +
24
30
  `\nClaude Code:\n` +
25
- `claude mcp add --transport stdio ${brand.serverName} -- node ${quotedLauncher}\n` +
26
- `The client process must inherit the approved HTTPS instance origin and its API key from a trusted local source.\n`,
31
+ `claude mcp add --scope user --transport stdio ${brand.serverName} -- node ${quotedLauncher}\n` +
32
+ `The client process must inherit PROXY_AGENT_API_ORIGIN and PROXY_AGENT_API_KEY from a trusted local source.\n` +
33
+ `Ask a local Agent with machine access to read this output, install the Skill, register the MCP launcher, and verify the server name and tools. Never paste the API key into chat or command arguments. If the Agent lacks local access, follow these steps manually.\n`,
27
34
  );
@@ -7,8 +7,13 @@ npm install --global @agent-proxy-kit/puraroute-mcp-server
7
7
  puraroute-proxy-mcp --setup
8
8
  ```
9
9
 
10
- The setup output prints the installed MCP launcher path, Agent Skill folder, and Codex and Claude Code registration examples. Register the launcher as the local stdio command and install the Skill folder into your Agent client's Skills location. The launcher finds its bundled contract automatically; users do not set a bundle path.
10
+ The setup output prints the absolute MCP launcher and Skill source folder. npm installs both files, but does not register the MCP server or activate the Skill in an Agent client. With the user's permission, an Agent that can operate this machine can complete the following steps. Without local access, provide the exact steps for the user to run and say what remains unconfigured.
11
11
 
12
- Provide `PROXY_AGENT_API_ORIGIN` as this brand's approved HTTPS instance origin and `PROXY_AGENT_API_KEY` through a trusted local secret source inherited by the Agent client. The origin and key must belong to the same instance. Keep the key out of command arguments, shell history, project files, and Skill text. Optional timeout: `PROXY_AGENT_REQUEST_TIMEOUT_MS`.
12
+ 1. Run `puraroute-proxy-mcp --setup` and use its actual installed paths. Copy the entire Skill folder, including `SKILL.md` and `references/`, to the chosen client's user Skill directory: `~/.agents/skills/puraroute-proxy` for Codex or `~/.claude/skills/puraroute-proxy` for Claude Code. On Windows, use the corresponding directories under the user's home folder. Inspect an existing target before replacing it.
13
+ 2. Register the printed launcher as a local stdio MCP server. For Codex, use the printed `config.toml` block. For Claude Code, use the printed `claude mcp add --scope user` command. The launcher finds its bundled contract automatically; users do not set a bundle path.
14
+ 3. Have the user arrange for `PROXY_AGENT_API_ORIGIN` and `PROXY_AGENT_API_KEY` to be inherited by the Agent client from a trusted local source. The origin is an approved HTTPS **origin without a path**, query, or fragment; the origin and key must belong to the same instance. Do not ask the user to paste the API key into chat, put it in command arguments or Skill text, or log its value.
15
+ 4. Restart or refresh the client. Check that it loads the `puraroute-proxy` Skill and connects to MCP service `puraroute-proxy-mcp`; compare `tools/list` with the bundled `bundle-manifest.json`. Do not call purchase, renewal, or account-write tools merely to verify setup.
13
16
 
14
- Restart the client after changing the bundle so it refreshes the tool list. Confirm the connected MCP service name is `puraroute-proxy-mcp` and the advertised tools match the reviewed contract. For installation help, use https://puraroute.com. Do not substitute another brand's API origin or bundle.
17
+ The optional timeout is `PROXY_AGENT_REQUEST_TIMEOUT_MS`. Keep the key out of shell history and project files.
18
+
19
+ For installation help, use https://puraroute.com. Do not substitute another brand's API origin or bundle.
@@ -2,6 +2,8 @@
2
2
 
3
3
  先确认用户要使用现有代理、选购或续费、排查连接,还是配置指定应用。当前品牌的本地 MCP 工具来自随包公开契约;实时产品、库存、余额、资源状态和凭据都要查询选中的实例。缺少 MCP 时,可解释概念或整理用户已提供的连接字段,但不能声称账户和资源已核实;安装方式见[本地配置](setup.md)。不要要求用户在聊天中粘贴账户 API Key 或代理密码。
4
4
 
5
+ npm 包已经包含 Skill 文件,但不会自动把它加载到 Agent 客户端。可让有本机操作权限的 Agent 运行 `puraroute-proxy-mcp --setup`,按输出将整个 Skill 文件夹复制到 Codex 用户目录 `~/.agents/skills/puraroute-proxy` 或 Claude Code 用户目录 `~/.claude/skills/puraroute-proxy`,再注册 MCP、从本机安全来源配置实例地址与 API Key,重启并验证工具列表。没有本机权限时,只提供具体手动步骤,不声称已完成配置。
6
+
5
7
  选型前确认目标应用、地区、HTTP 或 SOCKS5 协议、用量、并发、使用时长及是否需要稳定出口。轮换、粘性会话和 IP 白名单的具体行为必须以该实例的已审核资料或实时结果为准。`listDynamicRegions` 查询国家时不传 `parent_code`;查询省州或城市时须传上级 `region_code`。
6
8
 
7
9
  完整连接配置需要协议、连接入口主机、端口和适用的认证字段。动态代理凭据可查看 `generateDynamicProxyCredentials` 的 `data.host`、`data.proxy_username`、`data.password`、`data.http_port` 或 `data.socks5_port`;静态资源可查看 `listStaticResources` 的 `data.list` 条目。分配 IP 可能是出口 IP,不能自动当成连接主机。URL 格式要分别编码用户名和密码;没有字段就说明配置不完整,不猜网关或端口。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-proxy-kit/puraroute-mcp-server",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",