fetchsandbox-mcp 0.1.0 → 0.2.0
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 +133 -20
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/tools/run_all_workflows.d.ts +61 -0
- package/dist/tools/run_all_workflows.js +57 -0
- package/dist/tools/run_all_workflows.js.map +1 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Turn any OpenAPI spec into a working sandbox your AI agent can use, right from your IDE.
|
|
4
4
|
|
|
5
|
-
This is the Model Context Protocol (MCP) server for [FetchSandbox](https://fetchsandbox.com). It exposes three tools that let
|
|
5
|
+
This is the Model Context Protocol (MCP) server for [FetchSandbox](https://fetchsandbox.com). It exposes three tools that let any MCP-compatible agent ingest an OpenAPI spec, list its workflows, and run them — with realistic, schema-validated responses for every endpoint.
|
|
6
6
|
|
|
7
7
|
## Why
|
|
8
8
|
|
|
@@ -10,11 +10,13 @@ Agents read raw OpenAPI specs and hallucinate. They guess field names, invent ID
|
|
|
10
10
|
|
|
11
11
|
Plug it into your IDE once, and any time you ask your agent "let me try the Stripe API" or "show me the GitHub issue lifecycle," it can do that — for real, end-to-end.
|
|
12
12
|
|
|
13
|
-
## Install
|
|
13
|
+
## Install — by agent
|
|
14
14
|
|
|
15
|
-
The MCP runs as a stdio process spawned by your IDE. There's nothing to install globally — `npx` runs the latest published version on demand.
|
|
15
|
+
The MCP runs as a stdio process spawned by your IDE. There's nothing to install globally — `npx` runs the latest published version on demand. Pick your tool below, paste the snippet, restart.
|
|
16
16
|
|
|
17
|
-
### Claude
|
|
17
|
+
### Claude Desktop
|
|
18
|
+
|
|
19
|
+
File: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows)
|
|
18
20
|
|
|
19
21
|
```json
|
|
20
22
|
{
|
|
@@ -27,7 +29,28 @@ The MCP runs as a stdio process spawned by your IDE. There's nothing to install
|
|
|
27
29
|
}
|
|
28
30
|
```
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
Quit and reopen Claude Desktop (Cmd+Q, then reopen — not just close window).
|
|
33
|
+
|
|
34
|
+
### Claude Code
|
|
35
|
+
|
|
36
|
+
User-level (all projects): `~/.claude/settings.json`. Or project-level: `.mcp.json` in the repo root.
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"fetchsandbox": {
|
|
42
|
+
"command": "npx",
|
|
43
|
+
"args": ["-y", "fetchsandbox-mcp"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Restart the Claude Code session.
|
|
50
|
+
|
|
51
|
+
### Cursor
|
|
52
|
+
|
|
53
|
+
File: `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project)
|
|
31
54
|
|
|
32
55
|
```json
|
|
33
56
|
{
|
|
@@ -40,7 +63,107 @@ The MCP runs as a stdio process spawned by your IDE. There's nothing to install
|
|
|
40
63
|
}
|
|
41
64
|
```
|
|
42
65
|
|
|
43
|
-
Restart
|
|
66
|
+
Restart Cursor.
|
|
67
|
+
|
|
68
|
+
### Cline (VS Code extension)
|
|
69
|
+
|
|
70
|
+
Open the Cline panel → settings cog → MCP Servers → add a new server with:
|
|
71
|
+
|
|
72
|
+
- Command: `npx`
|
|
73
|
+
- Args: `-y fetchsandbox-mcp`
|
|
74
|
+
|
|
75
|
+
Reload the VS Code window.
|
|
76
|
+
|
|
77
|
+
### Continue.dev
|
|
78
|
+
|
|
79
|
+
File: `~/.continue/config.yaml`
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
mcpServers:
|
|
83
|
+
- name: fetchsandbox
|
|
84
|
+
command: npx
|
|
85
|
+
args:
|
|
86
|
+
- -y
|
|
87
|
+
- fetchsandbox-mcp
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Restart your IDE.
|
|
91
|
+
|
|
92
|
+
### Codex CLI (OpenAI)
|
|
93
|
+
|
|
94
|
+
File: `~/.codex/config.toml`
|
|
95
|
+
|
|
96
|
+
```toml
|
|
97
|
+
[mcp_servers.fetchsandbox]
|
|
98
|
+
command = "npx"
|
|
99
|
+
args = ["-y", "fetchsandbox-mcp"]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Restart Codex.
|
|
103
|
+
|
|
104
|
+
### Zed
|
|
105
|
+
|
|
106
|
+
File: `~/.config/zed/settings.json`
|
|
107
|
+
|
|
108
|
+
```json
|
|
109
|
+
{
|
|
110
|
+
"context_servers": {
|
|
111
|
+
"fetchsandbox": {
|
|
112
|
+
"command": {
|
|
113
|
+
"path": "npx",
|
|
114
|
+
"args": ["-y", "fetchsandbox-mcp"]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### GitHub Copilot
|
|
122
|
+
|
|
123
|
+
GitHub Copilot doesn't currently support the Model Context Protocol. Track [github/copilot#feedback](https://github.com/orgs/community/discussions) for updates. In the meantime, run any MCP-compatible chat (Claude Code, Cursor, Cline) alongside Copilot.
|
|
124
|
+
|
|
125
|
+
### Anything else (Roo, Goose, etc.)
|
|
126
|
+
|
|
127
|
+
If your agent speaks MCP, it accepts a stdio command. Use:
|
|
128
|
+
|
|
129
|
+
- Command: `npx`
|
|
130
|
+
- Args: `["-y", "fetchsandbox-mcp"]`
|
|
131
|
+
|
|
132
|
+
## Try it now
|
|
133
|
+
|
|
134
|
+
After restarting your agent, paste any of these prompts. Each hits a hand-curated workflow with realistic IDs and real state transitions.
|
|
135
|
+
|
|
136
|
+
### Stripe — accept a payment
|
|
137
|
+
|
|
138
|
+
> Use fetchsandbox to import the Stripe spec from `https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json` and run the `accept_payment` workflow. Show me the trace.
|
|
139
|
+
|
|
140
|
+
The agent imports 587 endpoints, matches the bundled curated Stripe sandbox, and runs a 6-step workflow: create customer (`cus_…`) → create PaymentIntent (`pi_…`, `$49.99 USD`, `requires_payment_method`) → confirm (`requires_capture`) → capture (`succeeded`) → retrieve → verify webhooks (`payment_intent.created`, `payment_intent.succeeded`).
|
|
141
|
+
|
|
142
|
+
### Twilio — send an SMS
|
|
143
|
+
|
|
144
|
+
> Use fetchsandbox to import the Twilio Messaging spec from `https://raw.githubusercontent.com/twilio/twilio-oai/main/spec/yaml/twilio_messaging_v1.yaml` and run the `send_sms` workflow.
|
|
145
|
+
|
|
146
|
+
The agent imports the messaging API and runs a curated send-and-verify flow with realistic Twilio-formatted message SIDs (`SM…`).
|
|
147
|
+
|
|
148
|
+
### GitHub — issue lifecycle
|
|
149
|
+
|
|
150
|
+
> Use fetchsandbox to import the GitHub REST API from `https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json` and run the `issue_lifecycle` workflow.
|
|
151
|
+
|
|
152
|
+
The agent walks the create → comment → close → reopen flow against a real-shaped GitHub sandbox.
|
|
153
|
+
|
|
154
|
+
### Paddle — paste-content variant
|
|
155
|
+
|
|
156
|
+
If a vendor doesn't publish their spec at a stable URL (Paddle, Notion, Linear), paste the content directly:
|
|
157
|
+
|
|
158
|
+
> Here's the Paddle Billing OpenAPI spec — `<paste JSON or YAML>`. Use fetchsandbox to import it and run the `subscriptions_canceled` workflow.
|
|
159
|
+
|
|
160
|
+
Same engine path; same curated quality if the spec's `info.title` matches a bundled config.
|
|
161
|
+
|
|
162
|
+
### Any other API
|
|
163
|
+
|
|
164
|
+
> Use fetchsandbox to import `<your OpenAPI URL>` — list the workflows and tell me which is most interesting.
|
|
165
|
+
|
|
166
|
+
For specs we don't have curated configs for, the engine auto-enumerates `create + verify` workflows for every detected resource. Honest about what it shows: UUIDs instead of vendor-style IDs, generic enum values instead of API-specific ones — but the request/response shape and template substitution between steps still work.
|
|
44
167
|
|
|
45
168
|
## Tools
|
|
46
169
|
|
|
@@ -54,7 +177,7 @@ content: "<paste OpenAPI JSON or YAML here>"
|
|
|
54
177
|
name: "Optional friendly name"
|
|
55
178
|
```
|
|
56
179
|
|
|
57
|
-
Returns `spec_id`, `sandbox_id`, `base_url` (proxy that serves real-shaped responses),
|
|
180
|
+
Returns `spec_id`, `sandbox_id`, `base_url` (proxy that serves real-shaped responses), `workflows_preview` (first 10), `matched_bundled` (true if we matched a curated config), and a `dashboard_url` to view everything in the browser.
|
|
58
181
|
|
|
59
182
|
### `list_workflows`
|
|
60
183
|
|
|
@@ -82,7 +205,7 @@ workflow_name: "<id or name from list_workflows>"
|
|
|
82
205
|
|
|
83
206
|
### What we record
|
|
84
207
|
|
|
85
|
-
When telemetry is on, each tool call records: an opaque per-machine session id (random UUID stored at `~/.fetchsandbox/session.json`), the tool name, latency, success/failure, and the spec URL or `"pasted"`. We do **not** record spec content, request bodies, or credentials. We use this to count daily-active sessions and learn which APIs people are bringing to the platform
|
|
208
|
+
When telemetry is on, each tool call records: an opaque per-machine session id (random UUID stored at `~/.fetchsandbox/session.json`), the tool name, latency, success/failure, and the spec URL or `"pasted"`. We do **not** record spec content, request bodies, or credentials. We use this to count daily-active sessions and learn which APIs people are bringing to the platform.
|
|
86
209
|
|
|
87
210
|
To opt out:
|
|
88
211
|
|
|
@@ -90,16 +213,6 @@ To opt out:
|
|
|
90
213
|
export FETCHSANDBOX_TELEMETRY=0
|
|
91
214
|
```
|
|
92
215
|
|
|
93
|
-
## Example session
|
|
94
|
-
|
|
95
|
-
> **You:** Try the Stripe API. Use this spec: https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json
|
|
96
|
-
>
|
|
97
|
-
> **Agent:** *(calls `import_spec`)* Imported. 471 endpoints, 12 workflows including customer-create, subscription-lifecycle, refund-flow.
|
|
98
|
-
>
|
|
99
|
-
> **You:** Run the subscription-lifecycle one.
|
|
100
|
-
>
|
|
101
|
-
> **Agent:** *(calls `run_workflow`)* All 5 steps passed: created customer (cus_LJ4nQ...), attached payment method (pm_8K2...), created subscription (sub_R6F...), updated to a different price (sub.items.0 swap), canceled subscription. Here's the trace: ...
|
|
102
|
-
|
|
103
216
|
## License
|
|
104
217
|
|
|
105
218
|
MIT — see [LICENSE](LICENSE).
|
|
@@ -107,5 +220,5 @@ MIT — see [LICENSE](LICENSE).
|
|
|
107
220
|
## Links
|
|
108
221
|
|
|
109
222
|
- [FetchSandbox](https://fetchsandbox.com)
|
|
110
|
-
- [Source code](https://github.com/
|
|
111
|
-
- [Issues](https://github.com/
|
|
223
|
+
- [Source code](https://github.com/fetchsandbox/mcp)
|
|
224
|
+
- [Issues](https://github.com/fetchsandbox/mcp/issues)
|
package/dist/index.js
CHANGED
|
@@ -19,10 +19,11 @@ import { ToolError, getBaseUrl } from "./client.js";
|
|
|
19
19
|
import { importSpecTool, runImportSpec } from "./tools/import_spec.js";
|
|
20
20
|
import { listWorkflowsTool, runListWorkflows } from "./tools/list_workflows.js";
|
|
21
21
|
import { runRunWorkflow, runWorkflowTool } from "./tools/run_workflow.js";
|
|
22
|
-
|
|
22
|
+
import { runRunAllWorkflows, runAllWorkflowsTool } from "./tools/run_all_workflows.js";
|
|
23
|
+
const VERSION = "0.2.0";
|
|
23
24
|
const server = new Server({ name: "fetchsandbox", version: VERSION }, { capabilities: { tools: {} } });
|
|
24
25
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
25
|
-
tools: [importSpecTool, listWorkflowsTool, runWorkflowTool],
|
|
26
|
+
tools: [importSpecTool, listWorkflowsTool, runWorkflowTool, runAllWorkflowsTool],
|
|
26
27
|
}));
|
|
27
28
|
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
28
29
|
const { name, arguments: args } = req.params;
|
|
@@ -48,6 +49,14 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
48
49
|
workflow_name: typeof a.workflow_name === "string" ? a.workflow_name : "",
|
|
49
50
|
});
|
|
50
51
|
break;
|
|
52
|
+
case runAllWorkflowsTool.name:
|
|
53
|
+
result = await runRunAllWorkflows({
|
|
54
|
+
sandbox_id: typeof a.sandbox_id === "string" ? a.sandbox_id : "",
|
|
55
|
+
workflow_names: Array.isArray(a.workflow_names)
|
|
56
|
+
? a.workflow_names.filter((x) => typeof x === "string")
|
|
57
|
+
: undefined,
|
|
58
|
+
});
|
|
59
|
+
break;
|
|
51
60
|
default:
|
|
52
61
|
throw new ToolError(`Unknown tool: ${name}`);
|
|
53
62
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,aAAa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ACF,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,GAAG,EAAE,KAAK,IAAI,GAAG,IAAI,CAAC,CAAC;IACzE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export interface RunAllWorkflowsInput {
|
|
2
|
+
sandbox_id: string;
|
|
3
|
+
workflow_names?: string[];
|
|
4
|
+
}
|
|
5
|
+
interface BatchStepResult {
|
|
6
|
+
name?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
status?: string;
|
|
9
|
+
detail?: string;
|
|
10
|
+
duration_ms?: number;
|
|
11
|
+
data?: unknown;
|
|
12
|
+
}
|
|
13
|
+
interface BatchWorkflowResult {
|
|
14
|
+
workflow_id: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
passed: boolean;
|
|
17
|
+
steps_total?: number;
|
|
18
|
+
steps_passed?: number;
|
|
19
|
+
total_duration_ms?: number;
|
|
20
|
+
steps?: BatchStepResult[];
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface NormalizedBatchResult {
|
|
24
|
+
sandbox_id: string;
|
|
25
|
+
total: number;
|
|
26
|
+
passed: number;
|
|
27
|
+
failed: number;
|
|
28
|
+
duration_ms: number;
|
|
29
|
+
summary: Array<{
|
|
30
|
+
workflow_id: string;
|
|
31
|
+
status: "pass" | "fail";
|
|
32
|
+
steps_passed: number;
|
|
33
|
+
steps_total: number;
|
|
34
|
+
duration_ms: number;
|
|
35
|
+
}>;
|
|
36
|
+
results: BatchWorkflowResult[];
|
|
37
|
+
}
|
|
38
|
+
export declare const runAllWorkflowsTool: {
|
|
39
|
+
readonly name: "run_all_workflows";
|
|
40
|
+
readonly description: string;
|
|
41
|
+
readonly inputSchema: {
|
|
42
|
+
readonly type: "object";
|
|
43
|
+
readonly properties: {
|
|
44
|
+
readonly sandbox_id: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
readonly description: "The sandbox_id returned by import_spec.";
|
|
47
|
+
};
|
|
48
|
+
readonly workflow_names: {
|
|
49
|
+
readonly type: "array";
|
|
50
|
+
readonly items: {
|
|
51
|
+
readonly type: "string";
|
|
52
|
+
};
|
|
53
|
+
readonly description: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly required: readonly ["sandbox_id"];
|
|
57
|
+
readonly additionalProperties: false;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export declare function runRunAllWorkflows(input: RunAllWorkflowsInput): Promise<NormalizedBatchResult>;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { postJson, ToolError } from "../client.js";
|
|
2
|
+
export const runAllWorkflowsTool = {
|
|
3
|
+
name: "run_all_workflows",
|
|
4
|
+
description: "Execute EVERY workflow (or a named subset) for a sandbox in one call, " +
|
|
5
|
+
"returning the full result set in one response. Strongly preferred over " +
|
|
6
|
+
"looping run_workflow when validating a spec — IDEs like Cursor approve " +
|
|
7
|
+
"each MCP call individually, so 18 workflows = 18 approval clicks. This " +
|
|
8
|
+
"tool collapses that to ONE approval click. Use this for: 'validate ' +" +
|
|
9
|
+
"this integration', 'run all workflows', 'check coverage' style requests. " +
|
|
10
|
+
"Optionally filter to a named subset via workflow_names. Returns a " +
|
|
11
|
+
"summary table + the full step trace per workflow.",
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
sandbox_id: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "The sandbox_id returned by import_spec.",
|
|
18
|
+
},
|
|
19
|
+
workflow_names: {
|
|
20
|
+
type: "array",
|
|
21
|
+
items: { type: "string" },
|
|
22
|
+
description: "Optional list of workflow ids/names to run. Case-insensitive; " +
|
|
23
|
+
"dashes and underscores are interchangeable. Omit to run every " +
|
|
24
|
+
"workflow for the spec.",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ["sandbox_id"],
|
|
28
|
+
additionalProperties: false,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export async function runRunAllWorkflows(input) {
|
|
32
|
+
if (!input.sandbox_id)
|
|
33
|
+
throw new ToolError("sandbox_id is required.");
|
|
34
|
+
const path = `/api/sandboxes/${encodeURIComponent(input.sandbox_id)}/workflows/run-all`;
|
|
35
|
+
const body = {};
|
|
36
|
+
if (input.workflow_names && input.workflow_names.length > 0) {
|
|
37
|
+
body.workflow_names = input.workflow_names;
|
|
38
|
+
}
|
|
39
|
+
const raw = await postJson(path, body);
|
|
40
|
+
const summary = (raw.results ?? []).map((r) => ({
|
|
41
|
+
workflow_id: r.workflow_id,
|
|
42
|
+
status: r.passed ? "pass" : "fail",
|
|
43
|
+
steps_passed: r.steps_passed ?? 0,
|
|
44
|
+
steps_total: r.steps_total ?? 0,
|
|
45
|
+
duration_ms: r.total_duration_ms ?? 0,
|
|
46
|
+
}));
|
|
47
|
+
return {
|
|
48
|
+
sandbox_id: raw.sandbox_id,
|
|
49
|
+
total: raw.total,
|
|
50
|
+
passed: raw.passed,
|
|
51
|
+
failed: raw.failed,
|
|
52
|
+
duration_ms: raw.duration_ms,
|
|
53
|
+
summary,
|
|
54
|
+
results: raw.results ?? [],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=run_all_workflows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run_all_workflows.js","sourceRoot":"","sources":["../../src/tools/run_all_workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAqDnD,MAAM,CAAC,MAAM,mBAAmB,G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AC,CAAE,MAAgB,CAAC,CAAC,CAAE,MAAgB;QACxD,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,CAAC;QACjC,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,CAAC;QAC/B,WAAW,EAAE,CAAC,CAAC,iBAAiB,IAAI,CAAC;KACtC,CAAC,CAAC,CAAC;IACJ,OAAO;QACL,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,WAAW,EAAE,GAAG,CAAC,WAAW;QAC5B,OAAO;QACP,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE;KAC3B,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fetchsandbox-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Turn any OpenAPI spec into a working sandbox your AI agent can use. MCP server for Claude Code, Cursor, and any other MCP-compatible LLM IDE.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "FetchSandbox",
|
|
7
7
|
"homepage": "https://fetchsandbox.com",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
11
|
-
|
|
10
|
+
"url": "git+https://github.com/fetchsandbox/mcp.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/fetchsandbox/mcp/issues"
|
|
12
14
|
},
|
|
13
15
|
"keywords": [
|
|
14
16
|
"mcp",
|