@markusvankempen/wxo-agent-mcp 1.0.1 → 1.0.6
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/DOCUMENTATION.md +107 -97
- package/LICENSE +1 -1
- package/README.md +99 -39
- package/dist/config.js +4 -1
- package/dist/index.js +1 -1
- package/examples/antigravity-mcp.json +13 -0
- package/package.json +30 -5
- package/resources/icon.png +0 -0
- package/resources/icon.svg +24 -0
- package/resources/images/langflow-agent-setup.png +0 -0
- package/resources/images/langflow-chat-with-wxo-agent.png +0 -0
- package/resources/images/langflow-mcp-wxo-setup.png +0 -0
- package/resources/images/vscode-chat-with-wxo-agent.png +0 -0
package/DOCUMENTATION.md
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- [Testing in VS Code](#testing-locally-in-vs-code)
|
|
20
20
|
- [Testing in Langflow](#testing-in-langflow)
|
|
21
21
|
- [Troubleshooting](#troubleshooting)
|
|
22
|
+
- [Publishing](PUBLISHING.md) – npm and MCP Registry procedure
|
|
22
23
|
|
|
23
24
|
---
|
|
24
25
|
|
|
@@ -129,13 +130,13 @@ sequenceDiagram
|
|
|
129
130
|
|
|
130
131
|
### Supported Clients
|
|
131
132
|
|
|
132
|
-
| Client
|
|
133
|
-
|
|
134
|
-
| **Cursor**
|
|
135
|
-
| **VS Code Copilot** | `.vscode/mcp.json`
|
|
136
|
-
| **Langflow**
|
|
137
|
-
| **Claude Desktop**
|
|
138
|
-
| **Antigravity**
|
|
133
|
+
| Client | Config | Transport |
|
|
134
|
+
| ------------------- | ---------------------------- | --------- |
|
|
135
|
+
| **Cursor** | `.cursor/mcp.json` | stdio |
|
|
136
|
+
| **VS Code Copilot** | `.vscode/mcp.json` | stdio |
|
|
137
|
+
| **Langflow** | MCP Tools component (STDIO) | stdio |
|
|
138
|
+
| **Claude Desktop** | `claude_desktop_config.json` | stdio |
|
|
139
|
+
| **Antigravity** | MCP servers config | stdio |
|
|
139
140
|
|
|
140
141
|
All clients spawn the MCP server as a subprocess and communicate via **stdio** (stdin/stdout) using the MCP JSON-RPC protocol.
|
|
141
142
|
|
|
@@ -173,12 +174,12 @@ flowchart LR
|
|
|
173
174
|
|
|
174
175
|
### Compared to wxo-builder-mcp-server
|
|
175
176
|
|
|
176
|
-
| Aspect
|
|
177
|
-
|
|
178
|
-
| Purpose
|
|
179
|
-
| Agent config | Single `WO_AGENT_ID` or `WO_AGENT_IDs` | Multiple agents, `WO_AGENT_IDs`
|
|
180
|
-
| Tools
|
|
181
|
-
| Use case
|
|
177
|
+
| Aspect | wxo-agent-mcp | wxo-builder-mcp-server |
|
|
178
|
+
| ------------ | -------------------------------------- | --------------------------------------------- |
|
|
179
|
+
| Purpose | Chat with one agent | Full dev toolkit |
|
|
180
|
+
| Agent config | Single `WO_AGENT_ID` or `WO_AGENT_IDs` | Multiple agents, `WO_AGENT_IDs` |
|
|
181
|
+
| Tools | 2 (`invoke_agent`, `get_agent`) | 30+ (list_skills, deploy_tool, etc.) |
|
|
182
|
+
| Use case | “Ask my agent” | Build and manage Watson Orchestrate resources |
|
|
182
183
|
|
|
183
184
|
---
|
|
184
185
|
|
|
@@ -204,11 +205,11 @@ wxo-agent-mcp/
|
|
|
204
205
|
|
|
205
206
|
### Source Files
|
|
206
207
|
|
|
207
|
-
| File
|
|
208
|
-
|
|
209
|
-
| **src/index.ts**
|
|
210
|
-
| **src/config.ts** | Loads `.env`, normalizes `WO_INSTANCE_URL` (fixes `ttps://` typo, adds `https://` when missing), resolves `WO_AGENT_ID` or `WO_AGENT_IDs` (first ID).
|
|
211
|
-
| **src/auth.ts**
|
|
208
|
+
| File | Role |
|
|
209
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
210
|
+
| **src/index.ts** | MCP server setup, `invoke_agent` and `get_agent` tools. Uses Watson Orchestrate Runs API (`POST /v1/orchestrate/runs`), polls for messages via `GET /v1/orchestrate/threads/{id}/messages`. |
|
|
211
|
+
| **src/config.ts** | Loads `.env`, normalizes `WO_INSTANCE_URL` (fixes `ttps://` typo, adds `https://` when missing), resolves `WO_AGENT_ID` or `WO_AGENT_IDs` (first ID). |
|
|
212
|
+
| **src/auth.ts** | IAM token acquisition (IBM Cloud API key → Bearer token), `woFetch` for authenticated requests to Watson Orchestrate. |
|
|
212
213
|
|
|
213
214
|
---
|
|
214
215
|
|
|
@@ -216,13 +217,13 @@ wxo-agent-mcp/
|
|
|
216
217
|
|
|
217
218
|
### Environment Variables
|
|
218
219
|
|
|
219
|
-
| Variable
|
|
220
|
-
|
|
221
|
-
| **WO_API_KEY**
|
|
222
|
-
| **WO_INSTANCE_URL** | Yes
|
|
223
|
-
| **WO_AGENT_ID**
|
|
224
|
-
| **WO_AGENT_IDs**
|
|
225
|
-
| **IAM_TOKEN_URL**
|
|
220
|
+
| Variable | Required | Description |
|
|
221
|
+
| ------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
222
|
+
| **WO_API_KEY** | Yes | IBM Cloud API key for Watson Orchestrate. |
|
|
223
|
+
| **WO_INSTANCE_URL** | Yes | Watson Orchestrate instance URL (e.g. `https://api.us-south.watson-orchestrate.cloud.ibm.com/instances/{id}` or `https://{id}.orchestrate.ibm.com`). |
|
|
224
|
+
| **WO_AGENT_ID** | One of WO_AGENT_ID / WO_AGENT_IDs | Agent ID to invoke. |
|
|
225
|
+
| **WO_AGENT_IDs** | One of WO_AGENT_ID / WO_AGENT_IDs | Comma-separated agent IDs; first is used. |
|
|
226
|
+
| **IAM_TOKEN_URL** | No | Default `https://iam.cloud.ibm.com/identity/token`. Override for private IAM. |
|
|
226
227
|
|
|
227
228
|
### URL Normalization
|
|
228
229
|
|
|
@@ -253,9 +254,9 @@ Sends a user message to the configured agent and returns the assistant reply.
|
|
|
253
254
|
|
|
254
255
|
```json
|
|
255
256
|
{
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
"success": true,
|
|
258
|
+
"response": "The agent's reply text.",
|
|
259
|
+
"thread_id": "uuid"
|
|
259
260
|
}
|
|
260
261
|
```
|
|
261
262
|
|
|
@@ -282,32 +283,32 @@ Example questions to ask in **Cursor**, **VS Code Copilot**, **Langflow**, or ot
|
|
|
282
283
|
|
|
283
284
|
### invoke_agent (chat with the agent)
|
|
284
285
|
|
|
285
|
-
| Question
|
|
286
|
-
|
|
287
|
-
| What is the weather in Amsterdam?
|
|
288
|
-
| What time is it in Tokyo?
|
|
289
|
-
| Tell me a dad joke
|
|
290
|
-
| What can you help me with?
|
|
291
|
-
| Get the METAR for KJFK
|
|
292
|
-
| Tell me about Brazil
|
|
293
|
-
| What's the exchange rate for CAD to USD? | Use currency tool
|
|
294
|
-
| Hello, who are you?
|
|
286
|
+
| Question | What the agent might do |
|
|
287
|
+
| ---------------------------------------- | ------------------------- |
|
|
288
|
+
| What is the weather in Amsterdam? | Use weather tool |
|
|
289
|
+
| What time is it in Tokyo? | Use World Time tool |
|
|
290
|
+
| Tell me a dad joke | Use Dad Jokes tool |
|
|
291
|
+
| What can you help me with? | Describe capabilities |
|
|
292
|
+
| Get the METAR for KJFK | Use aviation weather tool |
|
|
293
|
+
| Tell me about Brazil | Use REST Countries tool |
|
|
294
|
+
| What's the exchange rate for CAD to USD? | Use currency tool |
|
|
295
|
+
| Hello, who are you? | Introduce itself |
|
|
295
296
|
|
|
296
297
|
### get_agent (agent details)
|
|
297
298
|
|
|
298
|
-
| Question
|
|
299
|
-
|
|
299
|
+
| Question | Response |
|
|
300
|
+
| ------------------------------------------ | -------------------------------------------- |
|
|
300
301
|
| Use get_agent to show me the agent details | Agent name, description, tools, instructions |
|
|
301
|
-
| What tools does my agent have?
|
|
302
|
-
| Show me the agent configuration
|
|
302
|
+
| What tools does my agent have? | List of assigned tools |
|
|
303
|
+
| Show me the agent configuration | Full agent JSON |
|
|
303
304
|
|
|
304
305
|
### Natural-language style (AI selects the tool)
|
|
305
306
|
|
|
306
|
-
| Question
|
|
307
|
-
|
|
307
|
+
| Question |
|
|
308
|
+
| --------------------------------------------------- |
|
|
308
309
|
| Ask my Watson agent: What is the weather in London? |
|
|
309
|
-
| Chat with the agent: Tell me a dad joke
|
|
310
|
-
| Use the agent to get the current time in New York
|
|
310
|
+
| Chat with the agent: Tell me a dad joke |
|
|
311
|
+
| Use the agent to get the current time in New York |
|
|
311
312
|
|
|
312
313
|
### test:verify (terminal)
|
|
313
314
|
|
|
@@ -383,17 +384,17 @@ The server runs on stdio. MCP clients spawn it as a subprocess and communicate v
|
|
|
383
384
|
|
|
384
385
|
```json
|
|
385
386
|
{
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
387
|
+
"mcpServers": {
|
|
388
|
+
"wxo-agent": {
|
|
389
|
+
"command": "node",
|
|
390
|
+
"args": ["/absolute/path/to/wxo-agent-mcp/dist/index.js"],
|
|
391
|
+
"env": {
|
|
392
|
+
"WO_API_KEY": "your-key",
|
|
393
|
+
"WO_INSTANCE_URL": "https://xxx.orchestrate.ibm.com",
|
|
394
|
+
"WO_AGENT_ID": "your-agent-id"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
395
397
|
}
|
|
396
|
-
}
|
|
397
398
|
}
|
|
398
399
|
```
|
|
399
400
|
|
|
@@ -401,13 +402,13 @@ The server runs on stdio. MCP clients spawn it as a subprocess and communicate v
|
|
|
401
402
|
|
|
402
403
|
```json
|
|
403
404
|
{
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
405
|
+
"mcpServers": {
|
|
406
|
+
"wxo-agent": {
|
|
407
|
+
"command": "npx",
|
|
408
|
+
"args": ["-y", "@markusvankempen/wxo-agent-mcp"],
|
|
409
|
+
"env": { "WO_API_KEY": "...", "WO_INSTANCE_URL": "...", "WO_AGENT_ID": "..." }
|
|
410
|
+
}
|
|
409
411
|
}
|
|
410
|
-
}
|
|
411
412
|
}
|
|
412
413
|
```
|
|
413
414
|
|
|
@@ -426,14 +427,14 @@ This section assumes the MCP server is named **`wxo-agent`** in `mcp.json` (work
|
|
|
426
427
|
|
|
427
428
|
```json
|
|
428
429
|
{
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
430
|
+
"servers": {
|
|
431
|
+
"wxo-agent": {
|
|
432
|
+
"type": "stdio",
|
|
433
|
+
"command": "node",
|
|
434
|
+
"args": ["${workspaceFolder}/dist/index.js"],
|
|
435
|
+
"envFile": "${workspaceFolder}/.env"
|
|
436
|
+
}
|
|
435
437
|
}
|
|
436
|
-
}
|
|
437
438
|
}
|
|
438
439
|
```
|
|
439
440
|
|
|
@@ -455,19 +456,22 @@ npm run test:verify -- -ask "What is the weather in Amsterdam?"
|
|
|
455
456
|
|
|
456
457
|
**Example prompts that invoke the agent:**
|
|
457
458
|
|
|
458
|
-
| Prompt
|
|
459
|
-
|
|
460
|
-
|
|
|
461
|
-
|
|
|
462
|
-
|
|
|
463
|
-
|
|
|
464
|
-
|
|
|
459
|
+
| Prompt | Effect |
|
|
460
|
+
| --------------------------------------------------------------------- | --------------------------------- |
|
|
461
|
+
| _Use the invoke_agent tool to ask: What is the weather in Amsterdam?_ | Direct tool call |
|
|
462
|
+
| _Call invoke_agent with message "What time is it in Tokyo?"_ | Direct tool call |
|
|
463
|
+
| _Ask my Watson agent: Tell me a dad joke_ | Natural; Copilot selects the tool |
|
|
464
|
+
| _Use get_agent to show me the agent details_ | Returns agent config and tools |
|
|
465
|
+
| _Chat with the agent: What can you help me with?_ | Natural; Copilot selects the tool |
|
|
466
|
+
|
|
467
|
+

|
|
465
468
|
|
|
466
469
|
**Tips if the tool is not invoked:**
|
|
467
470
|
|
|
468
|
-
- Mention the tool explicitly:
|
|
471
|
+
- Mention the tool explicitly: _Use invoke_agent to ask the agent: [your question]_
|
|
472
|
+
|
|
473
|
+
**Skip get_agent for capability questions:** Copilot may call `get_agent` first to fetch config. To get only the agent's answer, ask: _Use invoke_agent to ask: What can you do?_ The tool descriptions nudge the AI to prefer `invoke_agent` for "what can you do" / "list capabilities".
|
|
469
474
|
|
|
470
|
-
**Skip get_agent for capability questions:** Copilot may call `get_agent` first to fetch config. To get only the agent's answer, ask: *Use invoke_agent to ask: What can you do?* The tool descriptions nudge the AI to prefer `invoke_agent` for "what can you do" / "list capabilities".
|
|
471
475
|
- Restart VS Code and reopen the folder
|
|
472
476
|
- Check that `dist/index.js` exists and `.env` is valid
|
|
473
477
|
|
|
@@ -494,13 +498,15 @@ Langflow can use the **wxo-agent** MCP server via the MCP Tools component (STDIO
|
|
|
494
498
|
4. Click **Add MCP Server** and choose **STDIO**.
|
|
495
499
|
5. Configure:
|
|
496
500
|
|
|
497
|
-
| Field
|
|
498
|
-
|
|
499
|
-
| **Name**
|
|
500
|
-
| **Command**
|
|
501
|
-
| **Arguments**
|
|
501
|
+
| Field | Value |
|
|
502
|
+
| ------------------------- | ------------------------------------------------------------------------------------- |
|
|
503
|
+
| **Name** | `wxo-agent` |
|
|
504
|
+
| **Command** | `node` |
|
|
505
|
+
| **Arguments** | `["/absolute/path/to/wxo-agent-mcp/dist/index.js"]` |
|
|
502
506
|
| **Environment Variables** | `WO_API_KEY`, `WO_INSTANCE_URL`, `WO_AGENT_ID` (or `WO_AGENT_IDs`) as key-value pairs |
|
|
503
507
|
|
|
508
|
+

|
|
509
|
+
|
|
504
510
|
**Alternative (npx, after publishing):**
|
|
505
511
|
|
|
506
512
|
- **Command:** `npx`
|
|
@@ -511,11 +517,15 @@ Langflow can use the **wxo-agent** MCP server via the MCP Tools component (STDIO
|
|
|
511
517
|
7. Connect the MCP Tools component’s **Toolset** port to an **Agent** component’s **Tools** port.
|
|
512
518
|
8. Add **Chat Input** and **Chat Output** if needed.
|
|
513
519
|
|
|
520
|
+

|
|
521
|
+
|
|
514
522
|
### Example prompts in Playground
|
|
515
523
|
|
|
516
|
-
-
|
|
517
|
-
-
|
|
518
|
-
-
|
|
524
|
+
- _Use invoke_agent to ask: What is the weather in Amsterdam?_
|
|
525
|
+
- _Ask my Watson agent: Tell me a dad joke_
|
|
526
|
+
- _Use get_agent to show the agent’s tools_
|
|
527
|
+
|
|
528
|
+

|
|
519
529
|
|
|
520
530
|
### Troubleshooting
|
|
521
531
|
|
|
@@ -528,23 +538,23 @@ Langflow can use the **wxo-agent** MCP server via the MCP Tools component (STDIO
|
|
|
528
538
|
|
|
529
539
|
## Troubleshooting
|
|
530
540
|
|
|
531
|
-
| Symptom
|
|
532
|
-
|
|
533
|
-
| `URL scheme "ttps" is not supported`
|
|
534
|
-
| `Missing required environment variables` | Missing env vars
|
|
535
|
-
| `Timed out waiting for agent response`
|
|
536
|
-
| `IAM failed`
|
|
537
|
-
| `Get agent failed: 404`
|
|
538
|
-
| `Run failed: 500` (Langflow)
|
|
541
|
+
| Symptom | Cause | Fix |
|
|
542
|
+
| ---------------------------------------- | ------------------------- | ----------------------------------------------------------------------- |
|
|
543
|
+
| `URL scheme "ttps" is not supported` | Typo in `WO_INSTANCE_URL` | Use `https://` or rely on auto-correction. |
|
|
544
|
+
| `Missing required environment variables` | Missing env vars | Set `WO_API_KEY`, `WO_INSTANCE_URL`, `WO_AGENT_ID` (or `WO_AGENT_IDs`). |
|
|
545
|
+
| `Timed out waiting for agent response` | Slow agent / tool use | Increase poll count or delay in `index.ts`; check agent responsiveness. |
|
|
546
|
+
| `IAM failed` | Invalid API key | Verify `WO_API_KEY` and regenerate if needed. |
|
|
547
|
+
| `Get agent failed: 404` | Invalid agent ID | Check `WO_AGENT_ID` against your Watson Orchestrate instance. |
|
|
548
|
+
| `Run failed: 500` (Langflow) | DataFrame / output format | Rebuild; tool output is now flattened. Check Node.js and env vars. |
|
|
539
549
|
|
|
540
550
|
---
|
|
541
551
|
|
|
542
552
|
## API Dependencies
|
|
543
553
|
|
|
544
554
|
- **Watson Orchestrate** (HTTP REST):
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
555
|
+
- `POST /v1/orchestrate/runs` – start a run
|
|
556
|
+
- `GET /v1/orchestrate/threads/{id}/messages` – get thread messages
|
|
557
|
+
- `GET /v1/orchestrate/agents/{id}` – get agent
|
|
548
558
|
- **IBM Cloud IAM** – exchange API key for Bearer token.
|
|
549
559
|
|
|
550
560
|
---
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,27 +1,50 @@
|
|
|
1
1
|
# WxO Agent MCP
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@markusvankempen/wxo-agent-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/@markusvankempen/wxo-agent-mcp)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="resources/icon.svg" alt="wxo-agent-mcp" width="128" />
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://cursor.directory/mcp/wxo-agent-mcp"><img src="https://img.shields.io/badge/Add_to_Cursor-WxO%20Agent%20MCP-0f62fe?style=for-the-badge" alt="Add MCP server to Cursor" /></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
3
15
|
Simple MCP (Model Context Protocol) server that **invokes a single Watson Orchestrate agent** remotely. The agent is defined once via environment variables or MCP config.
|
|
4
16
|
|
|
5
17
|
Use this when you want a lightweight MCP that only chats with one agent—no tool management, no agent listing, no flows. Just `invoke_agent(message)` and `get_agent()`.
|
|
6
18
|
|
|
7
|
-
**Full documentation:** [DOCUMENTATION.md](DOCUMENTATION.md)
|
|
19
|
+
**Full documentation:** [DOCUMENTATION.md](DOCUMENTATION.md) (includes [screenshots](DOCUMENTATION.md#testing-in-langflow) for VS Code and Langflow).
|
|
8
20
|
|
|
9
21
|
### Architecture
|
|
10
22
|
|
|
11
23
|
```
|
|
12
|
-
|
|
13
|
-
│ Cursor • VS Code • Langflow •
|
|
14
|
-
│ (MCP clients)
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
┌───────────────────────────────────────┐
|
|
25
|
+
│ Cursor • VS Code • Langflow • etc. │
|
|
26
|
+
│ (MCP clients) │
|
|
27
|
+
└──────────────────┬───────────────────┘
|
|
28
|
+
│ stdio / JSON-RPC
|
|
29
|
+
▼
|
|
30
|
+
┌───────────────────────────────────────┐
|
|
31
|
+
│ wxo-agent-mcp │
|
|
32
|
+
│ invoke_agent • get_agent │
|
|
33
|
+
└──────────────────┬───────────────────┘
|
|
34
|
+
│ HTTP / REST
|
|
35
|
+
▼
|
|
36
|
+
┌───────────────────────────────────────┐
|
|
37
|
+
│ Watson Orchestrate │
|
|
38
|
+
│ agent + tools + LLM │
|
|
39
|
+
└───────────────────────────────────────┘
|
|
17
40
|
```
|
|
18
41
|
|
|
19
42
|
## Tools
|
|
20
43
|
|
|
21
|
-
| Tool
|
|
22
|
-
|
|
44
|
+
| Tool | Description |
|
|
45
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------ |
|
|
23
46
|
| **invoke_agent** | Send a message to the configured Watson Orchestrate agent. The agent responds using its tools and LLM. |
|
|
24
|
-
| **get_agent**
|
|
47
|
+
| **get_agent** | Get details of the configured agent (name, description, tools, instructions). |
|
|
25
48
|
|
|
26
49
|
## Configuration
|
|
27
50
|
|
|
@@ -61,40 +84,51 @@ Runs `get_agent` and `invoke_agent` to confirm connectivity.
|
|
|
61
84
|
1. Open the `wxo-agent-mcp` folder in VS Code.
|
|
62
85
|
2. Run `npm run build`.
|
|
63
86
|
3. `.vscode/mcp.json` registers the MCP server as **wxo-agent** and loads `.env`.
|
|
64
|
-
4. Open Copilot Chat (Ctrl+Shift+I) and ask:
|
|
65
|
-
For "what can you do", use
|
|
87
|
+
4. Open Copilot Chat (Ctrl+Shift+I) and ask: _Use invoke_agent to ask: What is the weather in Amsterdam?_
|
|
88
|
+
For "what can you do", use _Use invoke_agent to ask: What can you do?_ to avoid Copilot calling `get_agent` first.
|
|
66
89
|
5. Or run `npm run test:verify` from the terminal (Ctrl+`).
|
|
67
90
|
|
|
68
91
|
See [DOCUMENTATION.md](DOCUMENTATION.md#testing-locally-in-vs-code) for more prompts and setup.
|
|
69
92
|
|
|
70
93
|
**Question examples:** [Full list →](DOCUMENTATION.md#question-examples)
|
|
71
94
|
|
|
72
|
-
| invoke_agent
|
|
73
|
-
|
|
95
|
+
| invoke_agent | get_agent |
|
|
96
|
+
| --------------------------------- | ----------------------------------- |
|
|
74
97
|
| What is the weather in Amsterdam? | Use get_agent to show agent details |
|
|
75
|
-
| Tell me a dad joke
|
|
76
|
-
| What time is it in Tokyo?
|
|
77
|
-
| What can you help me with?
|
|
98
|
+
| Tell me a dad joke | What tools does my agent have? |
|
|
99
|
+
| What time is it in Tokyo? | |
|
|
100
|
+
| What can you help me with? | |
|
|
78
101
|
|
|
79
102
|
**Langflow:** Add an MCP Tools component, choose STDIO, set Command=`node`, Args=`["/path/to/dist/index.js"]`, and env vars. See [DOCUMENTATION.md](DOCUMENTATION.md#testing-in-langflow).
|
|
80
103
|
|
|
81
104
|
## MCP Client Configuration
|
|
82
105
|
|
|
106
|
+
### One-click install (Cursor Directory)
|
|
107
|
+
|
|
108
|
+
**[Add to Cursor](https://cursor.directory/mcp/wxo-agent-mcp)** — Opens the Cursor Directory page. After adding, set `WO_API_KEY`, `WO_INSTANCE_URL`, and `WO_AGENT_ID` in Cursor MCP settings.
|
|
109
|
+
|
|
110
|
+
**For [cursor.directory/mcp/new](https://cursor.directory/mcp/new) submission:**
|
|
111
|
+
|
|
112
|
+
| Field | Value |
|
|
113
|
+
|-------|-------|
|
|
114
|
+
| **Cursor Deep Link** | `cursor://anysphere.cursor-deeplink/mcp/install?name=WxO%20Agent%20MCP&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBtYXJrdXN2YW5rZW1wZW4vd3hvLWFnZW50LW1jcCJdLCJlbnYiOnsiV09fQVBJX0tFWSI6InlvdXItYXBpLWtleSIsIldPX0lOU1RBTkNFX1VSTCI6Imh0dHBzOi8veW91ci1pbnN0YW5jZS5vcmNoZXN0cmF0ZS5pYm0uY29tIiwiV09fQUdFTlRfSUQiOiJ5b3VyLWFnZW50LWlkIn19` |
|
|
115
|
+
| **Install instructions** | https://github.com/markusvankempen/wxo-agent-mcp#mcp-client-configuration |
|
|
116
|
+
|
|
83
117
|
### Cursor (`.cursor/mcp.json`)
|
|
84
118
|
|
|
85
119
|
```json
|
|
86
120
|
{
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
121
|
+
"mcpServers": {
|
|
122
|
+
"wxo-agent": {
|
|
123
|
+
"command": "npx",
|
|
124
|
+
"args": ["-y", "@markusvankempen/wxo-agent-mcp"],
|
|
125
|
+
"env": {
|
|
126
|
+
"WO_API_KEY": "your-api-key",
|
|
127
|
+
"WO_INSTANCE_URL": "https://xxx.orchestrate.ibm.com",
|
|
128
|
+
"WO_AGENT_ID": "your-agent-id"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
96
131
|
}
|
|
97
|
-
}
|
|
98
132
|
}
|
|
99
133
|
```
|
|
100
134
|
|
|
@@ -104,27 +138,53 @@ The server is named **wxo-agent**. Use `envFile` to load `.env`:
|
|
|
104
138
|
|
|
105
139
|
```json
|
|
106
140
|
{
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
141
|
+
"servers": {
|
|
142
|
+
"wxo-agent": {
|
|
143
|
+
"type": "stdio",
|
|
144
|
+
"command": "node",
|
|
145
|
+
"args": ["${workspaceFolder}/dist/index.js"],
|
|
146
|
+
"envFile": "${workspaceFolder}/.env"
|
|
147
|
+
}
|
|
113
148
|
}
|
|
114
|
-
}
|
|
115
149
|
}
|
|
116
150
|
```
|
|
117
151
|
|
|
118
152
|
For npx (after publishing), use `"command": "npx"`, `"args": ["-y", "@markusvankempen/wxo-agent-mcp"]`, and add `env` with your credentials.
|
|
119
153
|
|
|
154
|
+
### Antigravity
|
|
155
|
+
|
|
156
|
+
Same config as Cursor. Copy `examples/antigravity-mcp.json` or add to your MCP config:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"mcpServers": {
|
|
161
|
+
"wxo-agent": {
|
|
162
|
+
"command": "npx",
|
|
163
|
+
"args": ["-y", "@markusvankempen/wxo-agent-mcp"],
|
|
164
|
+
"env": {
|
|
165
|
+
"WO_API_KEY": "your-api-key",
|
|
166
|
+
"WO_INSTANCE_URL": "https://xxx.orchestrate.ibm.com",
|
|
167
|
+
"WO_AGENT_ID": "your-agent-id"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
120
174
|
## vs wxo-builder-mcp-server
|
|
121
175
|
|
|
122
|
-
|
|
|
123
|
-
|
|
124
|
-
| Purpose
|
|
125
|
-
| Agent
|
|
126
|
-
| Tools
|
|
127
|
-
| Use case | Chat with a specific agent
|
|
176
|
+
| | wxo-agent-mcp | wxo-builder-mcp-server |
|
|
177
|
+
| -------- | --------------------------- | ---------------------------------------------------- |
|
|
178
|
+
| Purpose | Invoke one agent | Full dev toolkit (tools, agents, connections, flows) |
|
|
179
|
+
| Agent | Single `WO_AGENT_ID` | Multiple agents, `WO_AGENT_IDs` |
|
|
180
|
+
| Tools | `invoke_agent`, `get_agent` | 30+ tools (list_skills, deploy_tool, etc.) |
|
|
181
|
+
| Use case | Chat with a specific agent | Build and manage Watson Orchestrate resources |
|
|
182
|
+
|
|
183
|
+
## Links
|
|
184
|
+
|
|
185
|
+
- **npm:** [@markusvankempen/wxo-agent-mcp](https://www.npmjs.com/package/@markusvankempen/wxo-agent-mcp)
|
|
186
|
+
- **MCP Registry:** [io.github.markusvankempen/wxo-agent-mcp](https://registry.modelcontextprotocol.io)
|
|
187
|
+
- **GitHub:** [markusvankempen/wxo-agent-mcp](https://github.com/markusvankempen/wxo-agent-mcp)
|
|
128
188
|
|
|
129
189
|
## License
|
|
130
190
|
|
package/dist/config.js
CHANGED
|
@@ -17,7 +17,10 @@ dotenv.config({ path: path.resolve(__dirname, '..', '.env') });
|
|
|
17
17
|
dotenv.config({ path: path.join(process.cwd(), '.env') });
|
|
18
18
|
/** Resolve agent ID from WO_AGENT_IDs (first) or WO_AGENT_ID. */
|
|
19
19
|
function resolveAgentId() {
|
|
20
|
-
const fromIds = (process.env.WO_AGENT_IDs || '')
|
|
20
|
+
const fromIds = (process.env.WO_AGENT_IDs || '')
|
|
21
|
+
.split(',')
|
|
22
|
+
.map((s) => s.trim())
|
|
23
|
+
.filter(Boolean)[0];
|
|
21
24
|
const fromSingle = (process.env.WO_AGENT_ID || '').trim();
|
|
22
25
|
return fromIds || fromSingle;
|
|
23
26
|
}
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ async function invokeAgent(message) {
|
|
|
69
69
|
if (!msgRes.ok)
|
|
70
70
|
continue;
|
|
71
71
|
const raw = (await msgRes.json());
|
|
72
|
-
const messages = Array.isArray(raw) ? raw : raw?.data ?? [];
|
|
72
|
+
const messages = Array.isArray(raw) ? raw : (raw?.data ?? []);
|
|
73
73
|
if (!Array.isArray(messages))
|
|
74
74
|
continue;
|
|
75
75
|
const assistantMsgs = messages.filter((m) => m.role === 'assistant');
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"wxo-agent": {
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": ["-y", "@markusvankempen/wxo-agent-mcp"],
|
|
6
|
+
"env": {
|
|
7
|
+
"WO_API_KEY": "your-ibm-cloud-api-key",
|
|
8
|
+
"WO_INSTANCE_URL": "https://your-instance-id.orchestrate.ibm.com",
|
|
9
|
+
"WO_AGENT_ID": "your-agent-id"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markusvankempen/wxo-agent-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Simple MCP server to invoke a single Watson Orchestrate agent remotely. Configure agent via env (WO_AGENT_ID).",
|
|
5
5
|
"mcpName": "io.github.markusvankempen/wxo-agent-mcp",
|
|
6
6
|
"type": "module",
|
|
@@ -14,17 +14,24 @@
|
|
|
14
14
|
"DOCUMENTATION.md",
|
|
15
15
|
"LICENSE",
|
|
16
16
|
".env.example",
|
|
17
|
-
"examples"
|
|
17
|
+
"examples",
|
|
18
|
+
"resources"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
20
21
|
"build": "tsc",
|
|
21
22
|
"start": "node dist/index.js",
|
|
22
23
|
"test:verify": "npx tsx tests/verify.ts",
|
|
24
|
+
"lint": "eslint src --ext .ts",
|
|
25
|
+
"lint:fix": "eslint src --ext .ts --fix",
|
|
26
|
+
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" \"*.json\" \"*.md\"",
|
|
27
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \"*.json\" \"*.md\"",
|
|
28
|
+
"check": "npm run lint && npm run format:check && npm run build",
|
|
29
|
+
"fix": "npm run lint:fix && npm run format",
|
|
23
30
|
"prepublishOnly": "npm run build"
|
|
24
31
|
},
|
|
25
32
|
"repository": {
|
|
26
33
|
"type": "git",
|
|
27
|
-
"url": "https://github.com/markusvankempen/wxo-agent-mcp.git"
|
|
34
|
+
"url": "git+https://github.com/markusvankempen/wxo-agent-mcp.git"
|
|
28
35
|
},
|
|
29
36
|
"keywords": [
|
|
30
37
|
"mcp",
|
|
@@ -37,7 +44,15 @@
|
|
|
37
44
|
"agent",
|
|
38
45
|
"cursor",
|
|
39
46
|
"claude",
|
|
40
|
-
"vscode"
|
|
47
|
+
"vscode",
|
|
48
|
+
"copilot",
|
|
49
|
+
"antigravity",
|
|
50
|
+
"langflow",
|
|
51
|
+
"windsurf",
|
|
52
|
+
"stdio",
|
|
53
|
+
"watson",
|
|
54
|
+
"orchestrate",
|
|
55
|
+
"chatbot"
|
|
41
56
|
],
|
|
42
57
|
"author": "Markus van Kempen <markus.van.kempen@gmail.com>",
|
|
43
58
|
"license": "Apache-2.0",
|
|
@@ -52,7 +67,17 @@
|
|
|
52
67
|
},
|
|
53
68
|
"devDependencies": {
|
|
54
69
|
"@types/node": "^20.0.0",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
71
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
72
|
+
"eslint": "^8.57.1",
|
|
73
|
+
"eslint-config-prettier": "^10.1.8",
|
|
74
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
75
|
+
"prettier": "^3.8.1",
|
|
55
76
|
"tsx": "^4.7.0",
|
|
56
77
|
"typescript": "^5.3.0"
|
|
78
|
+
},
|
|
79
|
+
"homepage": "https://github.com/markusvankempen/wxo-agent-mcp#readme",
|
|
80
|
+
"bugs": {
|
|
81
|
+
"url": "https://github.com/markusvankempen/wxo-agent-mcp/issues"
|
|
57
82
|
}
|
|
58
|
-
}
|
|
83
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128">
|
|
2
|
+
<!-- Rounded blue background (IBM blue) -->
|
|
3
|
+
<rect width="128" height="128" rx="24" ry="24" fill="#0f62fe"/>
|
|
4
|
+
<!-- L-shaped connector: chat bubble bottom -> down -> right -> cloud -->
|
|
5
|
+
<path d="M 52 48 L 52 72 L 72 72 L 72 78" stroke="white" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
6
|
+
<!-- Chat bubble with three dots -->
|
|
7
|
+
<ellipse cx="40" cy="32" rx="22" ry="18" fill="white"/>
|
|
8
|
+
<path d="M 30 50 L 40 58 L 50 50 Z" fill="white"/>
|
|
9
|
+
<circle cx="32" cy="32" r="3" fill="#0f62fe"/>
|
|
10
|
+
<circle cx="40" cy="32" r="3" fill="#0f62fe"/>
|
|
11
|
+
<circle cx="48" cy="32" r="3" fill="#0f62fe"/>
|
|
12
|
+
<!-- Cloud shape -->
|
|
13
|
+
<path d="M 55 75 Q 45 75 45 85 Q 45 92 52 92 L 88 92 Q 95 92 95 85 Q 95 75 85 75 Q 85 65 72 65 Q 62 65 55 75 Z" fill="white"/>
|
|
14
|
+
<!-- Server rack inside cloud -->
|
|
15
|
+
<rect x="62" y="78" width="20" height="5" rx="1" fill="#0f62fe"/>
|
|
16
|
+
<rect x="62" y="84" width="20" height="5" rx="1" fill="#0f62fe"/>
|
|
17
|
+
<circle cx="66" cy="80.5" r="1.5" fill="white"/>
|
|
18
|
+
<circle cx="71" cy="80.5" r="1.5" fill="white"/>
|
|
19
|
+
<circle cx="76" cy="80.5" r="1.5" fill="white"/>
|
|
20
|
+
<circle cx="66" cy="86.5" r="1.5" fill="white"/>
|
|
21
|
+
<circle cx="71" cy="86.5" r="1.5" fill="white"/>
|
|
22
|
+
<circle cx="76" cy="86.5" r="1.5" fill="white"/>
|
|
23
|
+
<line x1="65" y1="90" x2="79" y2="90" stroke="#0f62fe" stroke-width="1"/>
|
|
24
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|