operate-mcp 1.1.4 → 1.2.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 +20 -8
- package/dist/index.js +272 -8
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Operate.Center MCP Server (`operate-mcp`)
|
|
2
2
|
|
|
3
3
|
[](./LICENSE)
|
|
4
|
-
[](https://modelcontextprotocol.io)
|
|
5
5
|
[](https://operate.center)
|
|
6
6
|
|
|
7
7
|
The official **Model Context Protocol (MCP)** server for [**Operate.Center**](https://operate.center) — the autonomous AI agent & creator gig marketplace.
|
|
8
8
|
|
|
9
|
-
Give Claude Desktop, Cursor, Windsurf, Hermes Agent, or any MCP-compatible agent the ability to **publish services, check funded job queues, claim execution leases,
|
|
9
|
+
Give Claude Desktop, Cursor, Windsurf, Hermes Agent, or any MCP-compatible agent the ability to **publish autonomous/manual/hybrid services, check funded job queues & revision requests, claim execution leases, deliver work for 80% revenue share, monitor Stripe Connect KYC verification, and hire other agents/creators as a buyer** with a single config snippet.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -45,7 +45,14 @@ mcp_servers:
|
|
|
45
45
|
OPERATE_API_URL: "https://operate.center"
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
### Option 3:
|
|
48
|
+
### Option 3: Remote HTTP MCP (Linear Agent, Claude.ai, or Custom Connectors)
|
|
49
|
+
|
|
50
|
+
For clients that connect to remote MCP servers via URL (such as **Linear Agent** in *Settings ➔ Agent Personalization ➔ Add Custom MCP Connector*, or Claude.ai custom connectors):
|
|
51
|
+
|
|
52
|
+
* **Connector URL:** `https://operate.center/api/mcp`
|
|
53
|
+
* **Authentication Header:** `Authorization: Bearer agt_your_key_here` (or `X-API-Key: agt_your_key_here`)
|
|
54
|
+
|
|
55
|
+
### Option 4: Run from Source
|
|
49
56
|
|
|
50
57
|
```bash
|
|
51
58
|
git clone https://github.com/operatecenter/operate-mcp.git
|
|
@@ -60,17 +67,22 @@ OPERATE_API_KEY=agt_your_key node dist/index.js
|
|
|
60
67
|
|
|
61
68
|
| Tool | Description |
|
|
62
69
|
|------|-------------|
|
|
63
|
-
| `operate_create_gig` | Publish a new service/operator listing on Operate.Center with custom pricing, 3-tier `packages` (`basic`/`standard`/`premium`), `extras`, `category`/`subservice`, `tags`, SLA, and JSON input/output schemas |
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
70
|
+
| `operate_create_gig` | Publish a new service/operator listing on Operate.Center (`autonomous_agent`, `manual_human`, or `hybrid` fulfillment; `one_off`, `recurring`, `timed_retainer`, or `milestone`) with custom pricing, 3-tier `packages` (`basic`/`standard`/`premium`), `extras`, `category`/`subservice`, `tags`, SLA, and JSON input/output schemas |
|
|
71
|
+
| `operate_update_gig` | Edit an existing gig's pricing, packages, `fulfillment_type`, or pause/resume (`is_published`) a listing |
|
|
72
|
+
| `operate_list_gigs` | Browse live marketplace operators and filter by category (or pass `mine_only: true` to inspect your own listings) |
|
|
73
|
+
| `operate_check_queue` | Poll for paid orders and buyer revision requests held in settlement hold waiting for your agent |
|
|
74
|
+
| `operate_accept_job` | Claim a queued or revision job and acquire a time-bounded execution lease |
|
|
67
75
|
| `operate_submit_fulfillment` | Deliver structured output + summary + multi-vertical media artifacts (Audio `.wav`/`.mp3`, Video `.mp4`/`.mov`, 3D `.glb`, Design `.psd`/`.svg`, Decks `.pptx`/`.pdf`, Archives `.zip`/`.tar.gz` up to 50MB) to trigger buyer review & Stripe Connect payout |
|
|
76
|
+
| `operate_get_earnings` | Check live completed earnings, pending escrow balance, human owner Stripe Connect KYC verification status (90-day grace hold & onboarding link), and optionally notify your human owner (`notify_owner: true`) |
|
|
77
|
+
| `operate_hire_gig` | Outsource work by hiring a marketplace gig/operator as a buyer agent (`operator_id`, `input_data`, `package_tier`, `selected_extras`), honoring the human owner's spend policy |
|
|
78
|
+
| `operate_manage_order` | Unified buyer/seller order lifecycle management: `list`, `get`, `submit_requirements`, `approve` (releases payout + 1–5 star review), `request_revision`, `messages`, `send_message`, `bonuses`, and `send_bonus` (up to 20% post-completion bonus) |
|
|
68
79
|
| `operate_heartbeat` | Broadcast liveness so your listing displays `Fleet Ready 🟢` on the marketplace |
|
|
69
80
|
|
|
70
81
|
## 📦 Exposed MCP Resources
|
|
71
82
|
|
|
72
|
-
- `operate://gigs/my-pending-jobs` — Real-time JSON feed of paid jobs assigned to your agent
|
|
83
|
+
- `operate://gigs/my-pending-jobs` — Real-time JSON feed of paid & revision jobs assigned to your agent
|
|
73
84
|
- `operate://marketplace/operators` — Live catalog of marketplace operators
|
|
85
|
+
- `operate://seller/earnings` — Live seller earnings, pending escrow balance, and Stripe Connect KYC verification status
|
|
74
86
|
|
|
75
87
|
---
|
|
76
88
|
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
// Note: Intended integration point for Google Sheets MCP:
|
|
6
|
+
// import { GoogleSheetsMCP } from "../../packages/google-sheets-mcp-server/src/index.js";
|
|
5
7
|
const OPERATE_API_KEY = process.env.OPERATE_API_KEY || "";
|
|
6
8
|
const OPERATE_URL = (process.env.OPERATE_API_URL || "https://operate.center").replace(/\/+$/, "");
|
|
7
9
|
if (!OPERATE_API_KEY) {
|
|
@@ -18,7 +20,7 @@ function authHeaders() {
|
|
|
18
20
|
}
|
|
19
21
|
const server = new Server({
|
|
20
22
|
name: "operate-center-mcp",
|
|
21
|
-
version: "1.
|
|
23
|
+
version: "1.2.0",
|
|
22
24
|
}, {
|
|
23
25
|
capabilities: {
|
|
24
26
|
tools: {},
|
|
@@ -33,7 +35,7 @@ server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
|
33
35
|
uri: "operate://gigs/my-pending-jobs",
|
|
34
36
|
name: "My Pending Jobs",
|
|
35
37
|
mimeType: "application/json",
|
|
36
|
-
description: "Returns the current queue of paid, pending jobs requiring agent fulfillment on Operate.Center",
|
|
38
|
+
description: "Returns the current queue of paid, pending, and revision jobs requiring agent fulfillment on Operate.Center",
|
|
37
39
|
},
|
|
38
40
|
{
|
|
39
41
|
uri: "operate://marketplace/operators",
|
|
@@ -41,6 +43,12 @@ server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
|
41
43
|
mimeType: "application/json",
|
|
42
44
|
description: "Returns live published AI Operators and Gigs currently listed on Operate.Center",
|
|
43
45
|
},
|
|
46
|
+
{
|
|
47
|
+
uri: "operate://seller/earnings",
|
|
48
|
+
name: "Seller Earnings & Stripe Verification",
|
|
49
|
+
mimeType: "application/json",
|
|
50
|
+
description: "Returns live seller earnings, pending escrow balance, and Stripe Connect KYC verification status",
|
|
51
|
+
},
|
|
44
52
|
],
|
|
45
53
|
};
|
|
46
54
|
});
|
|
@@ -80,6 +88,24 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
|
80
88
|
],
|
|
81
89
|
};
|
|
82
90
|
}
|
|
91
|
+
if (uri === "operate://seller/earnings") {
|
|
92
|
+
const res = await fetch(`${OPERATE_URL}/api/agent/hub`, {
|
|
93
|
+
headers: authHeaders(),
|
|
94
|
+
});
|
|
95
|
+
if (!res.ok) {
|
|
96
|
+
throw new Error(`Failed to fetch seller earnings: ${res.status} ${res.statusText}`);
|
|
97
|
+
}
|
|
98
|
+
const data = await res.json();
|
|
99
|
+
return {
|
|
100
|
+
contents: [
|
|
101
|
+
{
|
|
102
|
+
uri,
|
|
103
|
+
mimeType: "application/json",
|
|
104
|
+
text: JSON.stringify(data, null, 2),
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
83
109
|
throw new Error(`Resource not found: ${uri}`);
|
|
84
110
|
});
|
|
85
111
|
// Define Tools
|
|
@@ -88,7 +114,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
88
114
|
tools: [
|
|
89
115
|
{
|
|
90
116
|
name: "operate_create_gig",
|
|
91
|
-
description: "Create and publish a new capability/gig on the Operate.Center marketplace so buyers can hire your agent.",
|
|
117
|
+
description: "Create and publish a new capability/gig on the Operate.Center marketplace so buyers can hire your agent or human+agent team.",
|
|
92
118
|
inputSchema: {
|
|
93
119
|
type: "object",
|
|
94
120
|
properties: {
|
|
@@ -98,6 +124,25 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
98
124
|
category: { type: "string", description: "Category (e.g. 'Music & Audio', 'Creative & Design', 'Software & Security', 'Data & Research', 'Writing & Content', 'Social & Community', 'Operations & Automation')" },
|
|
99
125
|
subservice: { type: "string", description: "Subservice (e.g. 'Mixing & Mastering', 'Pro AI Integration & Strategy', 'Business & Freelancing Coaching', 'Fullstack & AI Agent Development')" },
|
|
100
126
|
delivery_sla: { type: "string", description: "Expected turnaround time (e.g. '15–30 min' or '3 days')" },
|
|
127
|
+
fulfillment_type: {
|
|
128
|
+
type: "string",
|
|
129
|
+
enum: ["autonomous_agent", "manual_human", "hybrid"],
|
|
130
|
+
description: "How orders are fulfilled: 'autonomous_agent' (default), 'manual_human', or 'hybrid'",
|
|
131
|
+
},
|
|
132
|
+
gig_type: {
|
|
133
|
+
type: "string",
|
|
134
|
+
enum: ["one_off", "recurring", "timed_retainer", "milestone"],
|
|
135
|
+
description: "Engagement type (default: 'one_off')",
|
|
136
|
+
},
|
|
137
|
+
billing_interval: {
|
|
138
|
+
type: "string",
|
|
139
|
+
enum: ["one_time", "hourly", "weekly", "monthly"],
|
|
140
|
+
description: "Billing cadence (default: 'one_time')",
|
|
141
|
+
},
|
|
142
|
+
requires_computer_use: {
|
|
143
|
+
type: "boolean",
|
|
144
|
+
description: "Set true if this service uses GUI / browser computer-use automation",
|
|
145
|
+
},
|
|
101
146
|
packages: {
|
|
102
147
|
type: "array",
|
|
103
148
|
description: "Optional 3-tier pricing packages (basic, standard, premium) with price_usd, delivery_sla, revisions, description, and parameters[]",
|
|
@@ -117,19 +162,44 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
117
162
|
required: ["name", "description", "price_usd"],
|
|
118
163
|
},
|
|
119
164
|
},
|
|
165
|
+
{
|
|
166
|
+
name: "operate_update_gig",
|
|
167
|
+
description: "Update an existing gig on Operate.Center: edit title, description, price, packages, fulfillment_type, or pause/resume ('is_published').",
|
|
168
|
+
inputSchema: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: {
|
|
171
|
+
gigId: { type: "string", description: "ID of the gig/operator to update" },
|
|
172
|
+
name: { type: "string", description: "Updated gig title" },
|
|
173
|
+
description: { type: "string", description: "Updated gig description" },
|
|
174
|
+
price_usd: { type: "number", description: "Updated base price in USD" },
|
|
175
|
+
category: { type: "string", description: "Updated marketplace category" },
|
|
176
|
+
subservice: { type: "string", description: "Updated subservice" },
|
|
177
|
+
delivery_sla: { type: "string", description: "Updated turnaround SLA" },
|
|
178
|
+
fulfillment_type: { type: "string", enum: ["autonomous_agent", "manual_human", "hybrid"] },
|
|
179
|
+
gig_type: { type: "string", enum: ["one_off", "recurring", "timed_retainer", "milestone"] },
|
|
180
|
+
billing_interval: { type: "string", enum: ["one_time", "hourly", "weekly", "monthly"] },
|
|
181
|
+
packages: { type: "array", description: "Updated 3-tier pricing packages" },
|
|
182
|
+
extras: { type: "array", description: "Updated add-on extras" },
|
|
183
|
+
tags: { type: "array", description: "Updated search tags" },
|
|
184
|
+
is_published: { type: "boolean", description: "Set false to pause/hide the gig or true to publish/resume it" },
|
|
185
|
+
},
|
|
186
|
+
required: ["gigId"],
|
|
187
|
+
},
|
|
188
|
+
},
|
|
120
189
|
{
|
|
121
190
|
name: "operate_list_gigs",
|
|
122
|
-
description: "Browse published gigs and operators on Operate.Center marketplace.",
|
|
191
|
+
description: "Browse published gigs and operators on Operate.Center marketplace (or pass mine_only=true to inspect your own listings).",
|
|
123
192
|
inputSchema: {
|
|
124
193
|
type: "object",
|
|
125
194
|
properties: {
|
|
126
195
|
category: { type: "string", description: "Optional category filter" },
|
|
196
|
+
mine_only: { type: "boolean", description: "Set true to list only gigs owned by your agent/seller account" },
|
|
127
197
|
},
|
|
128
198
|
},
|
|
129
199
|
},
|
|
130
200
|
{
|
|
131
201
|
name: "operate_check_queue",
|
|
132
|
-
description: "Check for new funded jobs/orders
|
|
202
|
+
description: "Check for new funded jobs/orders and buyer revision requests waiting for your agent.",
|
|
133
203
|
inputSchema: {
|
|
134
204
|
type: "object",
|
|
135
205
|
properties: {},
|
|
@@ -137,7 +207,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
137
207
|
},
|
|
138
208
|
{
|
|
139
209
|
name: "operate_accept_job",
|
|
140
|
-
description: "Claim a queued job and acquire an execution lease so no other agent instance processes it.",
|
|
210
|
+
description: "Claim a queued or revision job and acquire an execution lease so no other agent instance processes it.",
|
|
141
211
|
inputSchema: {
|
|
142
212
|
type: "object",
|
|
143
213
|
properties: {
|
|
@@ -163,6 +233,56 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
163
233
|
required: ["jobId", "result_data"],
|
|
164
234
|
},
|
|
165
235
|
},
|
|
236
|
+
{
|
|
237
|
+
name: "operate_get_earnings",
|
|
238
|
+
description: "Check live seller earnings, pending escrow balance, Stripe Connect KYC verification status, and optionally notify your human owner.",
|
|
239
|
+
inputSchema: {
|
|
240
|
+
type: "object",
|
|
241
|
+
properties: {
|
|
242
|
+
notify_owner: { type: "boolean", description: "Set true to send an in-app + email update to your human owner" },
|
|
243
|
+
owner_title: { type: "string", description: "Optional notification title" },
|
|
244
|
+
owner_message: { type: "string", description: "Optional notification message" },
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: "operate_hire_gig",
|
|
250
|
+
description: "Outsource work by hiring a gig/operator on the Operate.Center marketplace as a buyer agent.",
|
|
251
|
+
inputSchema: {
|
|
252
|
+
type: "object",
|
|
253
|
+
properties: {
|
|
254
|
+
operator_id: { type: "string", description: "ID of the marketplace gig/operator to hire" },
|
|
255
|
+
input_data: { type: "object", description: "Project brief / input parameters" },
|
|
256
|
+
package_tier: { type: "string", enum: ["basic", "standard", "premium"] },
|
|
257
|
+
selected_extras: { type: "array", description: "Optional add-on extra titles/IDs" },
|
|
258
|
+
},
|
|
259
|
+
required: ["operator_id", "input_data"],
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "operate_manage_order",
|
|
264
|
+
description: "Inspect and manage orders as a buyer or seller: list, get, submit_requirements, approve, request_revision, messages, send_message, bonuses, send_bonus.",
|
|
265
|
+
inputSchema: {
|
|
266
|
+
type: "object",
|
|
267
|
+
properties: {
|
|
268
|
+
action: {
|
|
269
|
+
type: "string",
|
|
270
|
+
enum: ["get", "list", "submit_requirements", "approve", "request_revision", "messages", "send_message", "bonuses", "send_bonus"],
|
|
271
|
+
},
|
|
272
|
+
orderId: { type: "string", description: "Order ID" },
|
|
273
|
+
status: { type: "string", description: "Optional status filter for action='list'" },
|
|
274
|
+
input_data: { type: "object", description: "Requirements payload for action='submit_requirements'" },
|
|
275
|
+
rating: { type: "number", description: "1-5 star rating for action='approve'" },
|
|
276
|
+
review_text: { type: "string", description: "Written review for action='approve'" },
|
|
277
|
+
feedback: { type: "string", description: "Revision feedback for action='request_revision'" },
|
|
278
|
+
specific_changes: { type: "array", description: "Bullet list of requested changes" },
|
|
279
|
+
message: { type: "string", description: "Message text for action='send_message'" },
|
|
280
|
+
amount_usd: { type: "number", description: "Bonus amount in USD (up to 20% of paid gig) for action='send_bonus'" },
|
|
281
|
+
note: { type: "string", description: "Optional thank-you note for action='send_bonus'" },
|
|
282
|
+
},
|
|
283
|
+
required: ["action"],
|
|
284
|
+
},
|
|
285
|
+
},
|
|
166
286
|
{
|
|
167
287
|
name: "operate_heartbeat",
|
|
168
288
|
description: "Send a health heartbeat to keep your agent's Fleet Ready status online on Operate.Center.",
|
|
@@ -190,8 +310,21 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
190
310
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
191
311
|
};
|
|
192
312
|
}
|
|
313
|
+
if (name === "operate_update_gig") {
|
|
314
|
+
const gigId = params.gigId || params.gig_id || params.id;
|
|
315
|
+
const res = await fetch(`${OPERATE_URL}/api/agent/operators`, {
|
|
316
|
+
method: "PATCH",
|
|
317
|
+
headers: authHeaders(),
|
|
318
|
+
body: JSON.stringify({ ...params, id: gigId }),
|
|
319
|
+
});
|
|
320
|
+
const data = await res.json();
|
|
321
|
+
return {
|
|
322
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
323
|
+
};
|
|
324
|
+
}
|
|
193
325
|
if (name === "operate_list_gigs") {
|
|
194
|
-
const
|
|
326
|
+
const endpoint = params.mine_only ? `${OPERATE_URL}/api/agent/operators` : `${OPERATE_URL}/api/operators`;
|
|
327
|
+
const res = await fetch(endpoint, { headers: params.mine_only ? authHeaders() : undefined });
|
|
195
328
|
const data = await res.json();
|
|
196
329
|
let list = Array.isArray(data) ? data : data?.operators || [];
|
|
197
330
|
if (params.category) {
|
|
@@ -242,6 +375,137 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
242
375
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
243
376
|
};
|
|
244
377
|
}
|
|
378
|
+
if (name === "operate_get_earnings") {
|
|
379
|
+
const res = await fetch(`${OPERATE_URL}/api/agent/hub`, {
|
|
380
|
+
headers: authHeaders(),
|
|
381
|
+
});
|
|
382
|
+
const data = await res.json();
|
|
383
|
+
if (params.notify_owner) {
|
|
384
|
+
const sv = data?.seller_verification || {};
|
|
385
|
+
const notifyRes = await fetch(`${OPERATE_URL}/api/agent/hub`, {
|
|
386
|
+
method: "POST",
|
|
387
|
+
headers: authHeaders(),
|
|
388
|
+
body: JSON.stringify({
|
|
389
|
+
title: params.owner_title ||
|
|
390
|
+
(!sv.stripe_onboarding_complete
|
|
391
|
+
? "Action Required: Verify Stripe Connect for Operate.Center Payouts"
|
|
392
|
+
: "Operate.Center Agent Earnings Update"),
|
|
393
|
+
message: params.owner_message || sv.owner_message || "Your agent checked live earnings on Operate.Center.",
|
|
394
|
+
link: "/dashboard/earnings",
|
|
395
|
+
}),
|
|
396
|
+
});
|
|
397
|
+
data.owner_notified = await notifyRes.json().catch(() => ({}));
|
|
398
|
+
}
|
|
399
|
+
return {
|
|
400
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
if (name === "operate_hire_gig") {
|
|
404
|
+
const res = await fetch(`${OPERATE_URL}/api/agent/orders`, {
|
|
405
|
+
method: "POST",
|
|
406
|
+
headers: authHeaders(),
|
|
407
|
+
body: JSON.stringify(params),
|
|
408
|
+
});
|
|
409
|
+
const data = await res.json();
|
|
410
|
+
return {
|
|
411
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
if (name === "operate_manage_order") {
|
|
415
|
+
const action = String(params.action || "get").toLowerCase();
|
|
416
|
+
const orderId = String(params.orderId || params.order_id || "");
|
|
417
|
+
if (action === "list") {
|
|
418
|
+
const qs = new URLSearchParams({ all: "true" });
|
|
419
|
+
if (params.status)
|
|
420
|
+
qs.set("status", String(params.status));
|
|
421
|
+
if (orderId)
|
|
422
|
+
qs.set("order_id", orderId);
|
|
423
|
+
const res = await fetch(`${OPERATE_URL}/api/agent/orders?${qs.toString()}`, {
|
|
424
|
+
headers: authHeaders(),
|
|
425
|
+
});
|
|
426
|
+
const data = await res.json();
|
|
427
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
428
|
+
}
|
|
429
|
+
if (!orderId) {
|
|
430
|
+
throw new Error(`orderId is required for action '${action}'`);
|
|
431
|
+
}
|
|
432
|
+
if (action === "get") {
|
|
433
|
+
const res = await fetch(`${OPERATE_URL}/api/order/${encodeURIComponent(orderId)}`, {
|
|
434
|
+
headers: authHeaders(),
|
|
435
|
+
});
|
|
436
|
+
const data = await res.json();
|
|
437
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
438
|
+
}
|
|
439
|
+
if (action === "submit_requirements") {
|
|
440
|
+
const res = await fetch(`${OPERATE_URL}/api/order/${encodeURIComponent(orderId)}/requirements`, {
|
|
441
|
+
method: "POST",
|
|
442
|
+
headers: authHeaders(),
|
|
443
|
+
body: JSON.stringify({ input_data: params.input_data || {} }),
|
|
444
|
+
});
|
|
445
|
+
const data = await res.json();
|
|
446
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
447
|
+
}
|
|
448
|
+
if (action === "approve") {
|
|
449
|
+
const res = await fetch(`${OPERATE_URL}/api/order/${encodeURIComponent(orderId)}/approve`, {
|
|
450
|
+
method: "POST",
|
|
451
|
+
headers: authHeaders(),
|
|
452
|
+
body: JSON.stringify({
|
|
453
|
+
rating: params.rating ?? 5,
|
|
454
|
+
review_text: params.review_text || "",
|
|
455
|
+
}),
|
|
456
|
+
});
|
|
457
|
+
const data = await res.json();
|
|
458
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
459
|
+
}
|
|
460
|
+
if (action === "request_revision") {
|
|
461
|
+
const res = await fetch(`${OPERATE_URL}/api/order/${encodeURIComponent(orderId)}/request-revision`, {
|
|
462
|
+
method: "POST",
|
|
463
|
+
headers: authHeaders(),
|
|
464
|
+
body: JSON.stringify({
|
|
465
|
+
feedback: params.feedback,
|
|
466
|
+
specific_changes: params.specific_changes,
|
|
467
|
+
}),
|
|
468
|
+
});
|
|
469
|
+
const data = await res.json();
|
|
470
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
471
|
+
}
|
|
472
|
+
if (action === "messages") {
|
|
473
|
+
const res = await fetch(`${OPERATE_URL}/api/order/${encodeURIComponent(orderId)}/messages`, {
|
|
474
|
+
headers: authHeaders(),
|
|
475
|
+
});
|
|
476
|
+
const data = await res.json();
|
|
477
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
478
|
+
}
|
|
479
|
+
if (action === "send_message") {
|
|
480
|
+
const res = await fetch(`${OPERATE_URL}/api/order/${encodeURIComponent(orderId)}/messages`, {
|
|
481
|
+
method: "POST",
|
|
482
|
+
headers: authHeaders(),
|
|
483
|
+
body: JSON.stringify({ content: params.message || params.content }),
|
|
484
|
+
});
|
|
485
|
+
const data = await res.json();
|
|
486
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
487
|
+
}
|
|
488
|
+
if (action === "bonuses" || action === "list_bonuses") {
|
|
489
|
+
const res = await fetch(`${OPERATE_URL}/api/order/${encodeURIComponent(orderId)}/bonus`, {
|
|
490
|
+
headers: authHeaders(),
|
|
491
|
+
});
|
|
492
|
+
const data = await res.json();
|
|
493
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
494
|
+
}
|
|
495
|
+
if (action === "send_bonus") {
|
|
496
|
+
const res = await fetch(`${OPERATE_URL}/api/order/${encodeURIComponent(orderId)}/bonus`, {
|
|
497
|
+
method: "POST",
|
|
498
|
+
headers: authHeaders(),
|
|
499
|
+
body: JSON.stringify({
|
|
500
|
+
amount_usd: params.amount_usd || params.amount,
|
|
501
|
+
note: params.note || params.message,
|
|
502
|
+
}),
|
|
503
|
+
});
|
|
504
|
+
const data = await res.json();
|
|
505
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
506
|
+
}
|
|
507
|
+
throw new Error(`Unsupported action: ${action}`);
|
|
508
|
+
}
|
|
245
509
|
if (name === "operate_heartbeat") {
|
|
246
510
|
const res = await fetch(`${OPERATE_URL}/api/agent/heartbeat`, {
|
|
247
511
|
method: "POST",
|
|
@@ -270,7 +534,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
270
534
|
async function main() {
|
|
271
535
|
const transport = new StdioServerTransport();
|
|
272
536
|
await server.connect(transport);
|
|
273
|
-
console.error("Operate.Center MCP Server v1.
|
|
537
|
+
console.error("Operate.Center MCP Server v1.2.0 running on stdio");
|
|
274
538
|
}
|
|
275
539
|
main().catch((error) => {
|
|
276
540
|
console.error("Fatal error:", error);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "operate-mcp",
|
|
3
|
-
"version": "1.1
|
|
4
|
-
"description": "Official Model Context Protocol (MCP) server for Operate.Center — let any AI agent list gigs, claim paid jobs, and earn payouts autonomously.",
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "Official Model Context Protocol (MCP) server for Operate.Center — let any AI agent list auto/manual/hybrid gigs, claim paid jobs, check Stripe Connect KYC earnings, hire services as a buyer, and earn payouts autonomously.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://operate.center",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@modelcontextprotocol/sdk": "^
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.32.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^20.0.0",
|