@toolplex/client 0.1.33 → 0.1.34

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,15 +1,18 @@
1
1
  # ToolPlex Client
2
2
 
3
- [![Visit ToolPlex](https://img.shields.io/badge/ToolPlex.ai-%F0%9F%9A%80-blue?style=flat)](https://toolplex.ai)
3
+ [![npm version](https://img.shields.io/npm/v/@toolplex/client)](https://www.npmjs.com/package/@toolplex/client)
4
+ [![npm downloads](https://img.shields.io/npm/dw/@toolplex/client)](https://www.npmjs.com/package/@toolplex/client)
5
+ [![Visit ToolPlex](https://img.shields.io/badge/ToolPlex.ai-%F0%9F%9A%80-blue?style=flat)](https://toolplex.ai)
4
6
  [![Discord](https://img.shields.io/badge/Join%20Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/KpCjj8ay)
5
7
 
6
- This repository contains the official **ToolPlex MCP server** — the npm package that enables AI agents to connect to the ToolPlex platform.
8
+ This repository contains the official **ToolPlex MCP server** — the npm package that powers agent interaction with the ToolPlex network. It's the core of [ToolPlex Desktop](https://toolplex.ai) and works with any MCP-compatible client.
7
9
 
8
10
  ToolPlex is a curated tool ecosystem built for AI agents. With ToolPlex, your agent can:
9
- - 🔍 Discover 2,000+ high quality, open-source MCP tools
10
- - 🛠️ Install and run tools with your permission
11
- - 📚 Save workflows as reusable playbooks
12
- - 🔁 Learn from success your agent evolves from collective agent feedback
11
+ - Discover 4,000+ high quality, open-source MCP tools (and growing)
12
+ - Automatically install and debug complex MCP servers — including fetching READMEs and resolving dependencies
13
+ - Call any tool across any installed MCP server without loading every schema into context
14
+ - Create and run playbooks (multi-step AI workflows) just by chatting
15
+ - Learn from collective agent feedback to improve over time
13
16
 
14
17
  No complex setup. Just add ToolPlex to your AI client and start automating.
15
18
 
@@ -17,20 +20,22 @@ No complex setup. Just add ToolPlex to your AI client and start automating.
17
20
 
18
21
  - **Agent Tool Discovery** — Your agent can search a curated index of MCP servers, filtered by code analysis and popularity signals to find tools that actually work
19
22
  - **Smooth Install Experience** — Automatically installs even complex tools, with the agent handling tricky build steps, dependencies, and setup flows behind the scenes
20
- - **Secure Config Handling** — Injects API keys, secrets, and file paths only when needed — always under your control
21
23
  - **Seamless Server Activation** — Install and uninstall MCP servers at any time without restarting your LLM or resetting the session
22
24
  - **Workflow Memory** — Successful tasks are saved as playbooks your agent can search, reuse, and adapt later
23
25
  - **Quality Signals Built-In** — Agents report tool usage and failure rates to help down-rank unreliable or broken servers automatically
24
- - **Team-Ready** — Share tools, playbooks, and permission sets across your org for faster onboarding and coordinated automation
25
26
  - **Full Agent Control** — Use the ToolPlex dashboard to manage server access, shell permissions, file visibility, feedback settings, and more
26
27
  - **Local-First Execution** — By default, ToolPlex installs and runs tools on your machine for full speed, privacy, and control
27
28
 
28
29
  ## Quick Setup
29
30
 
30
- **Claude Desktop (recommended)**
31
+ **ToolPlex Desktop (recommended)**
32
+
33
+ Download [ToolPlex Desktop](https://toolplex.ai) — a native app with the ToolPlex client built-in. No configuration needed.
34
+
35
+ **Claude Desktop or other MCP clients**
36
+
31
37
  1. Sign up for a [ToolPlex AI](https://toolplex.ai) account and create your first API key.
32
- 2. Install [Claude Desktop](https://claude.ai/download).
33
- 3. Add this to your `claude_desktop_config.json`:
38
+ 2. Add this to your MCP client config (e.g. `claude_desktop_config.json`):
34
39
 
35
40
  ```json
36
41
  {
@@ -46,7 +51,7 @@ No complex setup. Just add ToolPlex to your AI client and start automating.
46
51
  }
47
52
  ```
48
53
 
49
- Or use any AI chat client that [supports MCP](https://github.com/punkpeye/awesome-mcp-clients).
54
+ Works with any AI client that [supports MCP](https://github.com/punkpeye/awesome-mcp-clients).
50
55
 
51
56
  ToolPlex works best as the **only server** in your MCP config, since it handles discovery, installation, and management of all other MCP servers on your behalf.
52
57
 
@@ -102,11 +107,12 @@ After initializing ToolPlex, just talk to your agent naturally:
102
107
  > save this as a playbook
103
108
  ```
104
109
 
105
- ## LLM Compatability
106
- ToolPlex works better with generalist, high-context LLMs that support tool-calling, like:
107
- * `claude-sonnet-3.7`
108
- * `claude-sonnet-4`
109
- * `gpt-4o`
110
- * `gpt-4.1`
110
+ ## LLM Compatibility
111
+ ToolPlex works best with high-context LLMs that support tool-calling:
112
+ * Claude Sonnet 4.5, Opus 4.5, Haiku 4.5
113
+ * GPT-5, GPT-5 Mini
114
+ * Gemini 2.5 Pro, Gemini 3 Pro
115
+ * Kimi K2, Kimi K2 Thinking
116
+ * Grok 4
111
117
 
112
- Weaker reasoning models like `deepseek-chat` or `claude-haiku-3.5` can be used for simpler tasks (like running playbooks), but easily get confused with freeform ToolPlex usage.
118
+ Lighter models like DeepSeek V3 or Qwen3 can handle simpler tasks (like running playbooks), but may struggle with complex freeform ToolPlex usage.
@@ -23,6 +23,58 @@ class PermissiveJsonSchemaValidator {
23
23
  }
24
24
  }
25
25
  const logger = FileLogger;
26
+ // Private registry constants
27
+ const PRIVATE_REGISTRY_URL = "https://registry.toolplex.ai";
28
+ const PRIVATE_SCOPE_PATTERN = /^@(tp-(user|org)-[a-f0-9]{11})\//;
29
+ /**
30
+ * Extract the private registry scope from args if present.
31
+ * Returns the scope without @ (e.g., "tp-user-abc123def45") or null if not found.
32
+ */
33
+ function extractPrivateRegistryScope(args) {
34
+ for (const arg of args) {
35
+ const match = arg.match(PRIVATE_SCOPE_PATTERN);
36
+ if (match) {
37
+ return match[1]; // e.g., "tp-user-abc123def45"
38
+ }
39
+ }
40
+ return null;
41
+ }
42
+ /**
43
+ * Build npm config env vars for private registry authentication.
44
+ *
45
+ * Uses Basic auth (_auth) instead of _authToken because:
46
+ * - _authToken expects a token issued by Verdaccio (JWT)
47
+ * - _auth sends username:password on every request, triggering authenticate()
48
+ *
49
+ * The Verdaccio auth plugin expects:
50
+ * - username: the scope without @ (e.g., "tp-user-abc123def45")
51
+ * - password: the ToolPlex API key (tp_live_xxx or tp_test_xxx)
52
+ *
53
+ * @param scope - The scope without @ (e.g., "tp-user-abc123def45")
54
+ * @param apiKey - The ToolPlex API key
55
+ */
56
+ function getPrivateRegistryEnv(scope, apiKey) {
57
+ // Create base64-encoded "username:password" for Basic auth
58
+ // Username is the scope (e.g., "tp-user-abc123def45")
59
+ // Password is the API key
60
+ const auth = Buffer.from(`${scope}:${apiKey}`).toString("base64");
61
+ return {
62
+ // Set the registry for @tp-user-* and @tp-org-* scopes
63
+ // Note: Using npm_config_ prefix with special chars may not work on all systems
64
+ "npm_config_@tp-user:registry": PRIVATE_REGISTRY_URL,
65
+ "npm_config_@tp-org:registry": PRIVATE_REGISTRY_URL,
66
+ // Set Basic auth for the registry
67
+ // npm_config_//host/:_auth maps to //host/:_auth in .npmrc
68
+ "npm_config_//registry.toolplex.ai/:_auth": auth,
69
+ };
70
+ }
71
+ /**
72
+ * Get additional args to prepend for private registry packages.
73
+ * Uses --registry flag which is more reliable than env vars with special chars.
74
+ */
75
+ function getPrivateRegistryArgs() {
76
+ return [`--registry=${PRIVATE_REGISTRY_URL}`];
77
+ }
26
78
  export class ServerManager {
27
79
  constructor() {
28
80
  this.config = {};
@@ -287,16 +339,38 @@ export class ServerManager {
287
339
  resolvedCommand = resolved.command;
288
340
  prependArgs = resolved.prependArgs;
289
341
  }
342
+ // Check if this is a private registry package and inject auth if needed
343
+ // Private packages have scopes like @tp-user-xxx/ or @tp-org-xxx/
344
+ let privateRegistryEnv = {};
345
+ let privateRegistryArgs = [];
346
+ const privateScope = extractPrivateRegistryScope(config.args || []);
347
+ if (privateScope) {
348
+ const apiKey = process.env.TOOLPLEX_API_KEY;
349
+ if (apiKey) {
350
+ privateRegistryEnv = getPrivateRegistryEnv(privateScope, apiKey);
351
+ privateRegistryArgs = getPrivateRegistryArgs();
352
+ await logger.debug(`Injecting private registry auth for ${serverId} (scope: ${privateScope})`);
353
+ }
354
+ else {
355
+ await logger.warn(`Private registry package detected but no TOOLPLEX_API_KEY available`);
356
+ }
357
+ }
290
358
  // Combine prependArgs with config.args
291
359
  // e.g., if npx is a .js file: command="node", prependArgs=["/path/to/npx-cli.js"]
292
360
  // then args become ["/path/to/npx-cli.js", "-y", "@wonderwhy-er/desktop-commander"]
293
- const finalArgs = [...prependArgs, ...(config.args || [])];
361
+ // For private registry packages, insert --registry flag after prependArgs but before package name
362
+ const finalArgs = [
363
+ ...prependArgs,
364
+ ...privateRegistryArgs,
365
+ ...(config.args || []),
366
+ ];
294
367
  const serverParams = {
295
368
  command: resolvedCommand,
296
369
  args: finalArgs,
297
370
  env: {
298
371
  ...process.env,
299
372
  PATH: inheritedPath,
373
+ ...privateRegistryEnv,
300
374
  ...(config.env || {}),
301
375
  },
302
376
  stderr: "pipe",
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.1.33";
1
+ export declare const version = "0.1.34";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '0.1.33';
1
+ export const version = '0.1.34';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolplex/client",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "author": "ToolPlex LLC",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "description": "The official ToolPlex client for AI agent tool discovery and execution",