@agentwonderland/mcp 0.1.39 → 0.1.40

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/dist/index.js CHANGED
@@ -21,6 +21,7 @@ import { registerWalletResources } from "./resources/wallet.js";
21
21
  import { registerJobResources } from "./resources/jobs.js";
22
22
  // ── Prompts ──────────────────────────────────────────────────────
23
23
  import { registerPrompts } from "./prompts/index.js";
24
+ const PACKAGE_VERSION = "0.1.40";
24
25
  export async function startMcpServer() {
25
26
  const server = new McpServer({
26
27
  name: "agentwonderland",
@@ -93,6 +94,39 @@ export async function startMcpServer() {
93
94
  const isCli = process.argv[1]?.endsWith("agentwonderland-mcp") ||
94
95
  process.argv[1]?.includes("packages/mcp");
95
96
  if (isCli) {
97
+ const args = process.argv.slice(2);
98
+ if (args.includes("--help") || args.includes("-h")) {
99
+ console.log([
100
+ "Agent Wonderland MCP server",
101
+ "",
102
+ "Usage:",
103
+ " npx @agentwonderland/mcp",
104
+ "",
105
+ "This command starts a stdio MCP server. It is meant to be launched by",
106
+ "Codex, Cursor, Claude Desktop, or another MCP client. When run directly",
107
+ "in a terminal it waits silently for MCP JSON-RPC messages on stdin.",
108
+ "",
109
+ "MCP client config:",
110
+ ' { "mcpServers": { "agentwonderland": { "command": "npx", "args": ["@agentwonderland/mcp"] } } }',
111
+ "",
112
+ "Options:",
113
+ " -h, --help Show this help",
114
+ " -v, --version Show package version",
115
+ ].join("\n"));
116
+ process.exit(0);
117
+ }
118
+ if (args.includes("--version") || args.includes("-v")) {
119
+ console.log(PACKAGE_VERSION);
120
+ process.exit(0);
121
+ }
122
+ if (process.stdin.isTTY && process.stdout.isTTY) {
123
+ console.error([
124
+ "Agent Wonderland MCP server is running.",
125
+ "This process speaks MCP over stdio, so it waits for a client instead of printing a prompt.",
126
+ "Add it to an MCP client config, or press Ctrl+C to stop.",
127
+ "Run `npx @agentwonderland/mcp --help` for setup details.",
128
+ ].join("\n"));
129
+ }
96
130
  startMcpServer().catch((err) => {
97
131
  console.error("MCP server error:", err);
98
132
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentwonderland/mcp",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "type": "module",
5
5
  "description": "MCP server for the Agent Wonderland AI agent marketplace",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -26,6 +26,8 @@ import { registerJobResources } from "./resources/jobs.js";
26
26
  // ── Prompts ──────────────────────────────────────────────────────
27
27
  import { registerPrompts } from "./prompts/index.js";
28
28
 
29
+ const PACKAGE_VERSION = "0.1.40";
30
+
29
31
  export async function startMcpServer(): Promise<void> {
30
32
  const server = new McpServer(
31
33
  {
@@ -108,6 +110,43 @@ const isCli =
108
110
  process.argv[1]?.includes("packages/mcp");
109
111
 
110
112
  if (isCli) {
113
+ const args = process.argv.slice(2);
114
+
115
+ if (args.includes("--help") || args.includes("-h")) {
116
+ console.log([
117
+ "Agent Wonderland MCP server",
118
+ "",
119
+ "Usage:",
120
+ " npx @agentwonderland/mcp",
121
+ "",
122
+ "This command starts a stdio MCP server. It is meant to be launched by",
123
+ "Codex, Cursor, Claude Desktop, or another MCP client. When run directly",
124
+ "in a terminal it waits silently for MCP JSON-RPC messages on stdin.",
125
+ "",
126
+ "MCP client config:",
127
+ ' { "mcpServers": { "agentwonderland": { "command": "npx", "args": ["@agentwonderland/mcp"] } } }',
128
+ "",
129
+ "Options:",
130
+ " -h, --help Show this help",
131
+ " -v, --version Show package version",
132
+ ].join("\n"));
133
+ process.exit(0);
134
+ }
135
+
136
+ if (args.includes("--version") || args.includes("-v")) {
137
+ console.log(PACKAGE_VERSION);
138
+ process.exit(0);
139
+ }
140
+
141
+ if (process.stdin.isTTY && process.stdout.isTTY) {
142
+ console.error([
143
+ "Agent Wonderland MCP server is running.",
144
+ "This process speaks MCP over stdio, so it waits for a client instead of printing a prompt.",
145
+ "Add it to an MCP client config, or press Ctrl+C to stop.",
146
+ "Run `npx @agentwonderland/mcp --help` for setup details.",
147
+ ].join("\n"));
148
+ }
149
+
111
150
  startMcpServer().catch((err) => {
112
151
  console.error("MCP server error:", err);
113
152
  process.exit(1);