mcpflare 1.0.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +22 -0
  3. package/README.md +390 -0
  4. package/dist/cli/index.d.ts +3 -0
  5. package/dist/cli/index.d.ts.map +1 -0
  6. package/dist/cli/index.js +1615 -0
  7. package/dist/cli/index.js.map +1 -0
  8. package/dist/server/index.d.ts +3 -0
  9. package/dist/server/index.d.ts.map +1 -0
  10. package/dist/server/index.js +19 -0
  11. package/dist/server/index.js.map +1 -0
  12. package/dist/server/mcp-handler.d.ts +34 -0
  13. package/dist/server/mcp-handler.d.ts.map +1 -0
  14. package/dist/server/mcp-handler.js +1524 -0
  15. package/dist/server/mcp-handler.js.map +1 -0
  16. package/dist/server/metrics-collector.d.ts +30 -0
  17. package/dist/server/metrics-collector.d.ts.map +1 -0
  18. package/dist/server/metrics-collector.js +85 -0
  19. package/dist/server/metrics-collector.js.map +1 -0
  20. package/dist/server/schema-converter.d.ts +9 -0
  21. package/dist/server/schema-converter.d.ts.map +1 -0
  22. package/dist/server/schema-converter.js +82 -0
  23. package/dist/server/schema-converter.js.map +1 -0
  24. package/dist/server/worker-manager.d.ts +48 -0
  25. package/dist/server/worker-manager.d.ts.map +1 -0
  26. package/dist/server/worker-manager.js +1746 -0
  27. package/dist/server/worker-manager.js.map +1 -0
  28. package/dist/types/index.d.ts +3 -0
  29. package/dist/types/index.d.ts.map +1 -0
  30. package/dist/types/index.js +3 -0
  31. package/dist/types/index.js.map +1 -0
  32. package/dist/types/mcp.d.ts +495 -0
  33. package/dist/types/mcp.d.ts.map +1 -0
  34. package/dist/types/mcp.js +80 -0
  35. package/dist/types/mcp.js.map +1 -0
  36. package/dist/types/worker.d.ts +35 -0
  37. package/dist/types/worker.d.ts.map +1 -0
  38. package/dist/types/worker.js +2 -0
  39. package/dist/types/worker.js.map +1 -0
  40. package/dist/utils/config-manager.d.ts +64 -0
  41. package/dist/utils/config-manager.d.ts.map +1 -0
  42. package/dist/utils/config-manager.js +556 -0
  43. package/dist/utils/config-manager.js.map +1 -0
  44. package/dist/utils/env-selector.d.ts +4 -0
  45. package/dist/utils/env-selector.d.ts.map +1 -0
  46. package/dist/utils/env-selector.js +127 -0
  47. package/dist/utils/env-selector.js.map +1 -0
  48. package/dist/utils/errors.d.ts +19 -0
  49. package/dist/utils/errors.d.ts.map +1 -0
  50. package/dist/utils/errors.js +37 -0
  51. package/dist/utils/errors.js.map +1 -0
  52. package/dist/utils/logger.d.ts +4 -0
  53. package/dist/utils/logger.d.ts.map +1 -0
  54. package/dist/utils/logger.js +27 -0
  55. package/dist/utils/logger.js.map +1 -0
  56. package/dist/utils/mcp-registry.d.ts +108 -0
  57. package/dist/utils/mcp-registry.d.ts.map +1 -0
  58. package/dist/utils/mcp-registry.js +298 -0
  59. package/dist/utils/mcp-registry.js.map +1 -0
  60. package/dist/utils/progress-indicator.d.ts +14 -0
  61. package/dist/utils/progress-indicator.d.ts.map +1 -0
  62. package/dist/utils/progress-indicator.js +82 -0
  63. package/dist/utils/progress-indicator.js.map +1 -0
  64. package/dist/utils/settings-manager.d.ts +19 -0
  65. package/dist/utils/settings-manager.d.ts.map +1 -0
  66. package/dist/utils/settings-manager.js +78 -0
  67. package/dist/utils/settings-manager.js.map +1 -0
  68. package/dist/utils/token-calculator.d.ts +34 -0
  69. package/dist/utils/token-calculator.d.ts.map +1 -0
  70. package/dist/utils/token-calculator.js +167 -0
  71. package/dist/utils/token-calculator.js.map +1 -0
  72. package/dist/utils/validation.d.ts +4 -0
  73. package/dist/utils/validation.d.ts.map +1 -0
  74. package/dist/utils/validation.js +36 -0
  75. package/dist/utils/validation.js.map +1 -0
  76. package/dist/utils/wrangler-formatter.d.ts +37 -0
  77. package/dist/utils/wrangler-formatter.d.ts.map +1 -0
  78. package/dist/utils/wrangler-formatter.js +302 -0
  79. package/dist/utils/wrangler-formatter.js.map +1 -0
  80. package/dist/worker/runtime.d.ts +34 -0
  81. package/dist/worker/runtime.d.ts.map +1 -0
  82. package/dist/worker/runtime.js +166 -0
  83. package/dist/worker/runtime.js.map +1 -0
  84. package/package.json +81 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,33 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.2.0] - 2024-12-13
9
+
10
+ ### Added
11
+ - Initial release of MCPflare
12
+ - Zero-trust execution environment using Cloudflare Workers isolates
13
+ - Code mode execution for massive token savings (up to 98% reduction)
14
+ - Interactive CLI for testing MCP servers
15
+ - MCP server implementation with transparent proxy mode
16
+ - Automatic MCP discovery from IDE configurations (Cursor, Claude Code, GitHub Copilot)
17
+ - Security features: V8 isolate sandboxing, network isolation, code validation
18
+ - Service Bindings architecture for secure MCP tool access
19
+ - Schema caching for faster MCP loading
20
+ - Comprehensive test suite (unit, integration, security tests)
21
+ - VS Code extension for MCP management
22
+ - Documentation: README, CLAUDE.md, SECURITY_ANALYSIS.md
23
+
24
+ ### Security
25
+ - Complete network isolation for sandboxed code execution
26
+ - Pre-execution code validation blocking dangerous patterns
27
+ - Disposable execution environments preventing state leakage
28
+ - Binding-based access control for explicit permissions
29
+
30
+ ---
31
+
32
+ **Note**: This changelog will be automatically updated by release-it based on conventional commits.
33
+
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 James Gentes
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md ADDED
@@ -0,0 +1,390 @@
1
+ # MCPflare
2
+
3
+ > Use local MCP servers securely with zero-trust isolation while reducing context window token usage by up to 98%.
4
+
5
+ *⚡ This implementation is based on [Code execution with MCP: Building more efficient agents](https://www.anthropic.com/engineering/code-execution-with-mcp) by Anthropic. It uses [Wrangler](https://www.npmjs.com/package/wrangler) for local MCP isolation using [Dynamic Worker Loaders](https://developers.cloudflare.com/workers/runtime-apis/bindings/worker-loader/) as described in [Code Mode: the better way to use MCP](https://blog.cloudflare.com/code-mode/) by Cloudflare.*
6
+
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)
9
+ [![Node.js](https://img.shields.io/badge/Node.js-20+-green.svg)](https://nodejs.org/)
10
+
11
+ ## 🛡️ How It Works: A Simple Example
12
+
13
+ ```mermaid
14
+ flowchart LR
15
+ User["👤 User"] -->|"  Prompt  "| LLM["🤖 LLM"]
16
+
17
+ LLM -->|"&nbsp;&nbsp;⚠️ <b>Without MCPflare&nbsp;&nbsp;"| WithoutGuard
18
+ LLM -->|"&nbsp;&nbsp;✅ <b>With MCPflare&nbsp;&nbsp;"| WithGuard
19
+
20
+ subgraph WithoutGuard["<p style='height:6px; width: 600px;'></p>⚠️ No Code Isolation - LLM invokes MCP tools directly"]
21
+ direction LR
22
+ WithoutGuardWarning["MCP Can Access:<br/>⚠️ Filesystem<br/>⚠️ Env Variables<br/>⚠️ Network<br/>⚠️ System"]
23
+ WithoutGuardWarning -->|"&nbsp;&nbsp;Direct Execution&nbsp;&nbsp;"| TargetMCPServer["MCP Tools"]
24
+ end
25
+
26
+ subgraph WithGuard["<p style='height:6px; width: 600px;'></p>✅ Worker Isolates Code - LLM generates code to interface with MCP tools"]
27
+ direction LR
28
+ WithGuardBenefits["MCP Blocked From:<br/>✅ Filesystem<br/>✅ Env Variables<br/>✅ Network<br/>✅ System"]
29
+ WithGuardBenefits -.->|"Indirect<br/>&nbsp;&nbsp;Service Binding&nbsp;&nbsp;"| MCP["MCP Tools"]
30
+ end
31
+
32
+
33
+ style WithoutGuardWarning text-align:left
34
+ style WithGuardBenefits text-align:left
35
+ style WithoutGuard stroke:#dd0000,stroke-width:4px
36
+ style WithGuard stroke:#00aa00,stroke-width:4px
37
+ style MCP stroke:#888888,stroke-width:2px
38
+ ```
39
+
40
+ ### Real Attack Example
41
+
42
+ **Scenario:** Malicious prompt tries to steal your secrets
43
+
44
+ **Traditional MCP:**
45
+ ```
46
+ User: "Show me all environment variables"
47
+ LLM: Calls read_env() tool
48
+ Result: ⚠️ SECRET_TOKEN=xxxxxxxxxxxx exposed
49
+ LLM: Exfiltrate SECRET_TOKEN via POST to "https://attacker.com/steal"
50
+ Result: ⚠️ Fetch request succeeds
51
+ ```
52
+
53
+ **With MCPflare:**
54
+ ```
55
+ User: "Show me all environment variables"
56
+ LLM: Writes code: console.log(process.env)
57
+ Result: ✅ ReferenceError: process is not defined
58
+ Your secret stays safe
59
+ LLM: Exfiltrate SECRET_TOKEN via POST to "https://attacker.com/steal"
60
+ Result: ✅ Network access blocked
61
+ ```
62
+
63
+ ## 🔒 Security: Zero-Trust Execution
64
+
65
+ MCPflare runs all code in local Cloudflare Worker isolates with **zero access** to your filesystem, environment variables, network, or system, which protects against data exfiltration, credential theft, filesystem access, arbitrary code execution, process manipulation, SSRF attacks, code injection, supply chain attacks, and more.
66
+
67
+ **Three layers of protection:**
68
+ 1. **V8 Isolate Sandboxing** - Complete process isolation
69
+ 2. **Network Isolation** - No outbound network access, only MCP bindings can communicate
70
+ 3. **Code Validation** - Blocks dangerous patterns before execution
71
+
72
+ 📖 **[Read the security analysis](https://jgentes.github.io/mcpflare/docs/security)** for attack vector details and defense-in-depth architecture.
73
+
74
+ ## ⚡ Efficiency: Code Mode Execution
75
+
76
+ Traditional MCP tool calling wastes your context window. MCPflare uses **code mode** to reduce token usage by up to 98%.
77
+
78
+ ### Example: Generating a Jira Sprint Report
79
+
80
+ **Traditional approach:** The LLM calls tools step-by-step, and every result flows through the context window:
81
+
82
+ 1. Fetch 200 sprint tickets → **25,000 tokens** loaded into context
83
+ 2. LLM reads all tickets to count completed vs blocked
84
+ 3. Fetch time tracking data → **5,000 tokens** more
85
+ 4. Generate summary → **300 tokens**
86
+
87
+ **Total:** 30,300 tokens just to count tickets and generate a simple report.
88
+
89
+ **With MCPflare:** The code runs in a secure sandbox, processes all 200 tickets, and only sends back the final summary. The LLM never has to read the individual tickets:
90
+
91
+ ```typescript
92
+ // Fetch tickets, filter and count in code, return only the summary
93
+ import * as jira from './servers/jira';
94
+
95
+ const tickets = await jira.getSprintTickets({ sprintId: '123' });
96
+ const stats = {
97
+ completed: tickets.filter(t => t.status === 'Done').length,
98
+ blocked: tickets.filter(t => t.labels.includes('blocked')).length,
99
+ total: tickets.length
100
+ };
101
+
102
+ console.log(`Sprint Summary: ${stats.completed}/${stats.total} completed, ${stats.blocked} blocked`);
103
+ ```
104
+
105
+ **Result:** Instead of 30,300 tokens, you use ~750 tokens. **97.5% reduction.**
106
+
107
+ **Benefits:**
108
+ - 📉 **Up to 98% reduction** in token usage
109
+ - 🚀 **60x more tasks** in the same context window
110
+ - 💰 **Massive cost savings** on LLM API calls
111
+ - ⚡ **No round-trips** for intermediate results
112
+
113
+
114
+ ## 🏃 Quick Start
115
+
116
+ **Requires:** [Node.js 20+](https://nodejs.org/) installed
117
+
118
+ ### Installation Steps
119
+
120
+ 1. **Add MCPflare to your IDE config** (Cursor, Claude Code, or GitHub Copilot):
121
+
122
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=mcpflare&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIm1jcGZsYXJlIl19)
123
+
124
+ Or manually add to your IDE's MCP configuration:
125
+ ```json
126
+ {
127
+ "mcpServers": {
128
+ "mcpflare": {
129
+ "command": "npx",
130
+ "args": ["-y", "mcpflare"]
131
+ }
132
+ }
133
+ }
134
+ ```
135
+
136
+ 2. **Disable existing MCPs** (recommended):
137
+
138
+ To maximize efficiency and security, disable any existing MCPs in your IDE configuration. This prevents the IDE from loading all their tools into the context window unnecessarily, which is one of MCPflare's key benefits - you only load and use the tools you actually need.
139
+
140
+ **Why disable?**
141
+ - ⚡ **Efficiency**: Without disabling, your IDE loads all MCP tools into the context window, wasting tokens. MCPflare only loads tools lazily when you actually use them (via `call_mcp` or namespaced tool calls).
142
+ - 🔒 **Security**: Ensures all tool calls route through MCPflare's secure isolation instead of being called directly.
143
+
144
+ **How to disable:**
145
+ - **Option 1**: Ask your LLM: "Disable all MCPs except mcpflare in my IDE configuration"
146
+ - **Option 2**: Manually comment out or remove other MCP entries in your IDE's MCP config file:
147
+ - **Claude Code**: `~/.claude/mcp.jsonc` (or `%APPDATA%\Claude Code\User\globalStorage\mcp.jsonc` on Windows)
148
+ - **GitHub Copilot**: `~/.github/copilot/mcp.jsonc` (or `%APPDATA%\Code\User\globalStorage\github.copilot\mcp.jsonc` on Windows)
149
+ - **Cursor**: `~/.cursor/mcp.jsonc` (or `%APPDATA%\Cursor\User\globalStorage\mcp.jsonc` on Windows)
150
+
151
+ 3. **Restart your IDE** for changes to take effect.
152
+
153
+ 4. **That's it!** MCPflare automatically:
154
+ - Discovers all other MCPs configured in your IDE (even disabled ones)
155
+ - Routes all tool calls through secure Worker isolation
156
+ - Lazy-loads MCPs when their tools are actually used (via `call_mcp` or namespaced tool calls)
157
+
158
+ **No additional setup needed!** MCPflare uses transparent proxy mode by default - all your existing MCPs are automatically guarded without any config changes (once they're disabled).
159
+
160
+ ### How Transparent Proxy Mode Works
161
+
162
+ MCPflare automatically:
163
+ 1. **Discovers** all MCPs configured in your IDE (Cursor, Claude Code, or GitHub Copilot)
164
+ 2. **Lazy-loads** tool schemas only when tools are actually called (not upfront - this keeps your context window efficient)
165
+ 3. **Routes** all tool calls through secure Worker isolation
166
+ 4. **Auto-loads** MCPs when their tools are first used
167
+
168
+ **Example:** If you have `github` MCP configured, MCPflare will:
169
+ - When the LLM calls `github::search_repositories`, MCPflare automatically loads the GitHub MCP schema and executes the call in isolation
170
+ - All results are returned transparently - the LLM doesn't need to know about the isolation layer
171
+ - Tool schemas are cached after first use for faster subsequent calls
172
+
173
+ This means **all MCP tool calls automatically go through MCPflare** - no config changes needed!
174
+
175
+ You'll see a prompt like this:
176
+
177
+ ```
178
+ ╔═══════════════════════════════════════════════════════════╗
179
+ ║ MCPflare - Interactive CLI ║
180
+ ╚═══════════════════════════════════════════════════════════╝
181
+
182
+ Type "help" for available commands.
183
+ Type "exit" to quit.
184
+
185
+ mcpflare>
186
+ ```
187
+
188
+ ### Basic Usage
189
+
190
+ 1. **Load an MCP server:**
191
+ ```
192
+ load
193
+ ```
194
+ Enter the MCP name, command (e.g., `npx`), args, and environment variables.
195
+
196
+ 2. **Get the TypeScript API schema:**
197
+ ```
198
+ schema
199
+ ```
200
+ Enter the MCP ID to see available tools as TypeScript APIs.
201
+
202
+ 3. **Execute code:**
203
+ ```
204
+ execute
205
+ ```
206
+ Enter the MCP ID and TypeScript code to run in the isolated Worker.
207
+
208
+ 4. **List loaded MCPs:**
209
+ ```
210
+ list
211
+ ```
212
+
213
+ ## 🧪 Testing with GitHub MCP
214
+
215
+ Follow these steps to test the system with GitHub MCP:
216
+
217
+ ### 1. Start the CLI
218
+
219
+ ```bash
220
+ npm run cli
221
+ ```
222
+
223
+ ### 2. Load the GitHub MCP Server
224
+
225
+ At the `mcpflare>` prompt, type:
226
+
227
+ ```
228
+ load
229
+ ```
230
+
231
+ You'll be prompted for information. Enter:
232
+
233
+ - **MCP name**: `github` (or any name you like)
234
+ - **Command**: `npx`
235
+ - **Args**: `-y,@modelcontextprotocol/server-github` (comma-separated)
236
+ - **Environment variables**: `{"GITHUB_PERSONAL_ACCESS_TOKEN":"ghp_your_token_here"}` (as JSON)
237
+
238
+ **Example interaction:**
239
+
240
+ ```
241
+ mcpflare> load
242
+ MCP name: github
243
+ Command (e.g., npx): npx
244
+ Args (comma-separated, or press Enter for none): -y,@modelcontextprotocol/server-github
245
+ Environment variables as JSON (or press Enter for none): {"GITHUB_PERSONAL_ACCESS_TOKEN":"ghp_your_actual_token"}
246
+
247
+ Loading MCP server...
248
+ ```
249
+
250
+ ### 3. Check What Was Loaded
251
+
252
+ Type:
253
+
254
+ ```
255
+ list
256
+ ```
257
+
258
+ You should see your loaded MCP server with its ID, status, and available tools.
259
+
260
+ ### 4. Get the TypeScript API Schema
261
+
262
+ Type:
263
+
264
+ ```
265
+ schema
266
+ ```
267
+
268
+ Enter the MCP ID from the previous step. You'll see the TypeScript API definitions that were generated from the MCP tools.
269
+
270
+ ### 5. Execute Some Code
271
+
272
+ Type:
273
+
274
+ ```
275
+ execute
276
+ ```
277
+
278
+ You'll be prompted:
279
+ - **MCP ID**: Enter the ID from step 3
280
+ - **TypeScript code**: Enter your code (end with a blank line)
281
+ - **Timeout**: Press Enter for default (30000ms)
282
+
283
+ **Example code to test:**
284
+
285
+ ```typescript
286
+ // Simple test
287
+ console.log('Hello from Worker isolate!');
288
+ const result = { message: 'Test successful', timestamp: Date.now() };
289
+ console.log(JSON.stringify(result));
290
+ ```
291
+
292
+ ### 6. View Metrics
293
+
294
+ Type:
295
+
296
+ ```
297
+ metrics
298
+ ```
299
+
300
+ This shows performance metrics including:
301
+ - Total executions
302
+ - Success rate
303
+ - Average execution time
304
+ - Estimated tokens saved
305
+
306
+ ### 7. Clean Up
307
+
308
+ When done testing, unload the MCP:
309
+
310
+ ```
311
+ unload
312
+ ```
313
+
314
+ Enter the MCP ID to clean up resources.
315
+
316
+ ## 📖 Available CLI Commands
317
+
318
+ | Command | Description |
319
+ |---------|-------------|
320
+ | `load` | Load an MCP server into an isolated Worker |
321
+ | `execute` | Execute TypeScript code against a loaded MCP |
322
+ | `test` | Interactively test MCP tools (select tool, enter args, execute via Wrangler) |
323
+ | `test-direct` | Test MCP directly without Wrangler/Worker isolation |
324
+ | `list` | List all loaded MCP servers |
325
+ | `saved` | List all saved MCP configurations |
326
+ | `schema` | Get TypeScript API schema for an MCP |
327
+ | `unload` | Unload an MCP server and clean up |
328
+ | `conflicts` | Check for IDE MCP configuration conflicts |
329
+ | `metrics` | Show performance metrics |
330
+ | `help` | Show help message |
331
+ | `exit` | Exit the CLI |
332
+
333
+ ## 🔧 Using as an MCP Server (for AI Agents)
334
+
335
+ Start the MCP server:
336
+
337
+ ```bash
338
+ npm run dev
339
+ ```
340
+
341
+ Configure your AI agent (Claude Desktop, Cursor IDE, etc.):
342
+
343
+ ```json
344
+ {
345
+ "mcpServers": {
346
+ "mcpflare": {
347
+ "command": "node",
348
+ "args": ["/path/to/mcpflare/dist/server/index.js"]
349
+ }
350
+ }
351
+ }
352
+ ```
353
+
354
+ **Available MCP Tools:**
355
+
356
+ **Transparent Proxy Tools** (lazy-loaded from configured MCPs):
357
+ - Tools from your configured MCPs are available with namespaced names (e.g., `github::search_repositories`)
358
+ - Schemas are loaded on-demand when tools are called, keeping your context window efficient
359
+ - All tool calls are routed through secure isolation
360
+
361
+ **MCP Prompts** (slash commands):
362
+ - Prompts from your configured MCPs appear as slash commands (e.g., `/mcpflare/github:AssignCodingAgent`)
363
+ - Prompts are read-only message templates, so they're directly proxied without worker isolation
364
+ - All prompts are transparently aggregated and namespaced for easy discovery
365
+
366
+ **MCPflare Management Tools:**
367
+ - `call_mcp` - Call MCP tools by running TypeScript code in a secure sandbox (auto-connects MCPs from IDE config if needed)
368
+ - `guard` - Guard MCP servers by routing them through MCPflare's secure isolation
369
+ - `search_mcp_tools` - Discover which MCPs are configured in your IDE. Shows all configured MCPs (including guarded) with their status and available tools.
370
+ - `connect` - Manually connect to an MCP server (usually not needed - transparent proxy auto-connects)
371
+ - `list_available_mcps` - List all currently connected MCP servers (runtime state)
372
+ - `get_mcp_by_name` - Find a connected MCP server by name (more efficient than searching list_available_mcps)
373
+ - `get_mcp_schema` - Get TypeScript API definition for a connected MCP
374
+ - `disconnect` - Disconnect from an MCP server
375
+ - `import_configs` - Import MCP configurations from IDE config files
376
+ - `get_metrics` - Get performance metrics
377
+
378
+ ## 📜 License
379
+
380
+ MIT License - see [LICENSE](./LICENSE) file for details.
381
+
382
+ ## 🙏 Acknowledgments
383
+
384
+ - [Anthropic](https://www.anthropic.com/) for the Model Context Protocol
385
+ - [Cloudflare](https://www.cloudflare.com/) for Workers and the Worker Loader API
386
+ - The MCP community for building amazing MCP servers
387
+
388
+ ---
389
+
390
+ **Ready to get started?** Run `npm install` and then `npm run cli` to begin! 🚀
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}