@vinkius-core/mcp-fusion-cloudflare 1.0.0 → 3.1.4

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 (2) hide show
  1. package/README.md +81 -0
  2. package/package.json +57 -54
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ <p align="center">
2
+ <h1 align="center">@vinkius-core/mcp-fusion-cloudflare</h1>
3
+ <p align="center">
4
+ <strong>Cloudflare Workers Adapter</strong> — Deploy MCP Fusion servers to the edge with zero config
5
+ </p>
6
+ </p>
7
+
8
+ <p align="center">
9
+ <a href="https://www.npmjs.com/package/@vinkius-core/mcp-fusion-cloudflare"><img src="https://img.shields.io/npm/v/@vinkius-core/mcp-fusion-cloudflare?color=blue" alt="npm" /></a>
10
+ <a href="https://github.com/vinkius-labs/mcp-fusion/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-green" alt="License" /></a>
11
+ <img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="Node" />
12
+ </p>
13
+
14
+ ---
15
+
16
+ > Cloudflare Workers adapter for MCP Fusion. Deploys your MCP server to the edge — stateless JSON-RPC, cold-start caching, native env injection, zero polyfills.
17
+
18
+ ## Quick Start
19
+
20
+ ```typescript
21
+ // src/index.ts (Cloudflare Worker)
22
+ import { createCloudflareHandler } from '@vinkius-core/mcp-fusion-cloudflare';
23
+ import { registry } from './registry.js';
24
+
25
+ export default {
26
+ async fetch(req: Request, env: Env): Promise<Response> {
27
+ const handler = createCloudflareHandler(registry, {
28
+ contextFactory: () => ({
29
+ db: env.DB,
30
+ kv: env.KV_STORE,
31
+ }),
32
+ });
33
+ return handler(req);
34
+ },
35
+ };
36
+ ```
37
+
38
+ ## Features
39
+
40
+ | Feature | Description |
41
+ |---------|-------------|
42
+ | **Zero Polyfills** | Built for the WinterCG runtime, no Node.js shims |
43
+ | **Stateless JSON-RPC** | Each request is a standalone invocation, ideal for edge |
44
+ | **Cold-Start Caching** | Registry and Zod schemas compiled once per isolate |
45
+ | **Native Bindings** | Access KV, D1, R2, and Durable Objects via context |
46
+ | **Wrangler Ready** | Deploy with `wrangler deploy` |
47
+
48
+ ## With D1 Database
49
+
50
+ ```typescript
51
+ const handler = createCloudflareHandler(registry, {
52
+ contextFactory: (env) => ({
53
+ db: env.DB, // D1 binding
54
+ cache: env.KV_CACHE, // KV binding
55
+ role: 'ADMIN',
56
+ }),
57
+ });
58
+ ```
59
+
60
+ ## Installation
61
+
62
+ ```bash
63
+ npm install @vinkius-core/mcp-fusion-cloudflare
64
+ ```
65
+
66
+ ### Peer Dependencies
67
+
68
+ | Package | Version |
69
+ |---------|---------|
70
+ | `@vinkius-core/mcp-fusion` | `^2.0.0` |
71
+ | `@modelcontextprotocol/sdk` | `^1.12.0` |
72
+
73
+ ## Requirements
74
+
75
+ - **Cloudflare Workers** (WinterCG runtime)
76
+ - **MCP Fusion** ≥ 2.0.0 (peer dependency)
77
+ - `wrangler` CLI for deployment
78
+
79
+ ## License
80
+
81
+ [Apache-2.0](https://github.com/vinkius-labs/mcp-fusion/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,54 +1,57 @@
1
- {
2
- "name": "@vinkius-core/mcp-fusion-cloudflare",
3
- "version": "1.0.0",
4
- "description": "Cloudflare Workers adapter for MCP Fusion. Deploys your MCP server to the edge with zero config — stateless JSON-RPC, cold-start caching, and native env injection.",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/index.js",
11
- "types": "./dist/index.d.ts"
12
- }
13
- },
14
- "scripts": {
15
- "build": "tsc",
16
- "prepublishOnly": "npm run build"
17
- },
18
- "keywords": [
19
- "mcp",
20
- "mcp-fusion",
21
- "cloudflare",
22
- "workers",
23
- "edge",
24
- "serverless",
25
- "wintercg",
26
- "ai",
27
- "llm"
28
- ],
29
- "author": "Vinkius Labs",
30
- "repository": {
31
- "type": "git",
32
- "url": "git+https://github.com/vinkius-labs/mcp-fusion.git",
33
- "directory": "packages/cloudflare"
34
- },
35
- "bugs": {
36
- "url": "https://github.com/vinkius-labs/mcp-fusion/issues"
37
- },
38
- "homepage": "https://mcp-fusion.vinkius.com/",
39
- "files": [
40
- "dist",
41
- "README.md"
42
- ],
43
- "engines": {
44
- "node": ">=18.0.0"
45
- },
46
- "publishConfig": {
47
- "access": "public"
48
- },
49
- "peerDependencies": {
50
- "@vinkius-core/mcp-fusion": "^2.0.0",
51
- "@modelcontextprotocol/sdk": "^1.12.0"
52
- },
53
- "license": "Apache-2.0"
54
- }
1
+ {
2
+ "name": "@vinkius-core/mcp-fusion-cloudflare",
3
+ "version": "3.1.4",
4
+ "description": "Cloudflare Workers adapter for MCP Fusion. Deploys your MCP server to the edge with zero config — stateless JSON-RPC, cold-start caching, and native env injection.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "prepublishOnly": "npm run build"
17
+ },
18
+ "keywords": [
19
+ "mcp",
20
+ "mcp-fusion",
21
+ "cloudflare",
22
+ "workers",
23
+ "edge",
24
+ "serverless",
25
+ "wintercg",
26
+ "ai",
27
+ "llm"
28
+ ],
29
+ "author": "Vinkius Labs",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/vinkius-labs/mcp-fusion.git",
33
+ "directory": "packages/cloudflare"
34
+ },
35
+ "bugs": {
36
+ "url": "https://github.com/vinkius-labs/mcp-fusion/issues"
37
+ },
38
+ "homepage": "https://mcp-fusion.vinkius.com/",
39
+ "files": [
40
+ "dist",
41
+ "README.md"
42
+ ],
43
+ "engines": {
44
+ "node": ">=18.0.0"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "peerDependencies": {
50
+ "@vinkius-core/mcp-fusion": "^2.0.0",
51
+ "@modelcontextprotocol/sdk": "^1.12.0"
52
+ },
53
+ "license": "Apache-2.0",
54
+ "devDependencies": {
55
+ "@vinkius-core/mcp-fusion": ">=2.14.0"
56
+ }
57
+ }