MCP FUSION
MCP Fusion is a TypeScript framework for building secure and governed MCP servers with egress firewalls, state-machine gating, and AI-friendly skill contracts.
README
MCP FUSION
The TypeScript framework for secure MCP servers.
MCP Fusion is a TypeScript framework that enforces security at the architectural level of every MCP server. Raw data never reaches the LLM without passing through a typed egress firewall. Tools are physically removed from the agent's namespace when the workflow state forbids them. Every behavioral surface is hashed, locked, and auditable in version control.
The framework ships with a SKILL.md — a machine-readable architectural contract. AI coding agents read the Skill and produce correct, governed servers on the first pass.
The Skill — AI Writes the Server
MCP Fusion includes a SKILL.md that encodes the entire MVA architecture, security patterns, and governance rules into a format AI coding agents consume directly.
Open your project in Cursor, Claude Code, GitHub Copilot, Windsurf, or Hermes Agent / NemoHermes and describe what you need:
"Build an MCP server for patient records with Prisma. Redact SSN and diagnosis from LLM output. Gate discharge tools until attending physician signs off."
The agent reads the Skill. It produces defineModel() declarations with m.hidden() for sensitive fields, definePresenter() with .redactPII(['*.ssn', '*.diagnosis']) for DLP compliance, FSM state gating via .bindState() for workflow enforcement, and file-based routing under src/tools/. You review the PR.
The Skill is not documentation. It is the security contract. Every server the AI produces inherits the governance stack because the Skill encodes Presenters, state machines, and lockfile generation as mandatory structural patterns.
📄 SKILL.md · llms.txt (complete API reference for LLM consumption)
Security Architecture
Egress Firewall — Presenter
The Presenter validates every response through a Zod schema compiled from defineModel(). Undeclared fields are stripped in RAM before serialization. PII is redacted via V8-optimized fast-redact compiled functions. Rules travel with data, not in the system prompt. The Late Guillotine pattern applies redaction after UI blocks render — charts and suggestions always see full data, the wire never does.
const PatientPresenter = createPresenter('Patient')
.schema(PatientModel)
.redactPII(['*.ssn', '*.diagnosis'])
.rules((p) => [
p.status === 'critical' ? 'PRIORITY: Patient is critical.' : null,
])
.suggest((p) => p.status === 'admitted'
? [suggest('ward.discharge', 'Begin discharge protocol')]
: []);
The Presenter also runs a PromptFirewall — an LLM-as-Judge that evaluates dynamically generated system rules for prompt injection before they reach the agent. Fail-closed by default.
State Gate — FSM
Tools bound to FSM states are physically removed from tools/list when the current state does not match. The LLM cannot call what does not exist in its namespace. Powered by XState v5 with manual fallback when XState is not installed.
const gate = f.fsm({
id: 'discharge', initial: 'admitted',
states: {
admitted: { on: { PHYSICIAN_SIGNOFF: 'approved' } },
approved: { on: { DISCHARGE: 'discharged' } },
discharged: { type: 'final' },
},
});
export default f.mutation('ward.discharge')
.bindState('approved', 'DISCHARGE')
.handle(async (input, ctx) => ctx.db.patients.discharge(input.id));
| State | Visible tools |
|---|---|
admitted |
ward.view, ward.update_vitals |
approved |
ward.discharge, ward.view |
discharged |
ward.view |
Serverless-compatible: FsmStateStore persists state to Redis/KV across request boundaries. Each request gets an isolated gate.clone().
Governance Stack
Eight introspection modules that make behavioral changes visible and auditable:
| Module | What it does |
|---|---|
| ToolContract | Materializes the complete behavioral surface of each tool |
| BehaviorDigest | SHA-256 hash of the behavioral surface |
| CapabilityLockfile | mcpfusion.lock — git-diffable behavioral snapshot, CI gate via fusion lock --check |
| CryptoAttestation | HMAC-SHA256 runtime verification — fail-fast if behavioral digest drifts |
| ContractDiff | Per-field diff between lockfile versions |
| EntitlementScanner | Static analysis of handler source for I/O capabilities (fs, network, subprocess, eval) with evasion heuristics |
| SemanticProbe | LLM-as-Judge for detecting semantic drift in handler output |
| TokenEconomics | Context window inflation risk profiling |
Sandbox
SandboxEngine executes LLM-provided JavaScript in a sealed V8 isolate. No process, require, fs, or network access. One isolate per engine, fresh empty context per execution. Memory-limited, timeout-enforced, output-capped, abort-signal-compatible.
Three Pathways
1. YAML — Zero Code
version: "1.0"
server:
name: "github-tools"
connections:
github:
type: rest
base_url: "https://api.github.com"
auth:
type: bearer
token: "${SECRETS.GITHUB_TOKEN}"
tools:
- name: search_repos
description: "Search GitHub repositories"
instruction: "Use for finding projects by topic or keyword."
rules:
- "Max 10 results per query"
parameters:
query: { type: string, required: true }
execute:
connection: github
method: GET
path: "/search/repositories"
query: { q: "{{query}}", per_page: "10" }
response:
extract: ["items[].{full_name, description, stargazers_count, html_url}"]
mcpfusion yaml dev
2. Typed MVA — Full Control
export const InvoiceModel = defineModel('Invoice', m => {
m.casts({
id: m.string(),
amount_cents: m.number('CRITICAL: in CENTS. Divide by 100 for display.'),
status: m.enum('Status', ['paid', 'pending', 'overdue']),
});
m.hidden(['password_hash', 'internal_margin']);
});
export const InvoicePresenter = definePresenter({
name: 'Invoice',
schema: InvoiceModel,
suggestActions: (inv) => inv.status === 'pending'
? [{ tool: 'billing.pay', reason: 'Process payment', args: { id: inv.id } }]
: [],
});
export default f.query('billing.get_invoice')
.describe('Get an invoice by ID')
.withString('id', 'Invoice ID')
.returns(InvoicePresenter)
.handle(async (input, ctx) => ctx.db.invoices.findUnique({ where: { id: input.id } }));
3. FSM — Deterministic Workflow Enforcement
State-gated tool discovery. Tools appear and disappear based on the current state.
Get Started
npx @mcpfusion/core create my-server
cd my-server && npm run dev
File-based routing — drop a file, restart, and it's a live MCP tool:
src/tools/
├── billing/
│ ├── get_invoice.ts → billing.get_invoice
│ └── pay.ts → billing.pay
└── users/
└── list.ts → users.list
Deploy
mcpfusion deploy # Vinkius Edge (V8 Isolate)
vercel deploy # Vercel Functions
wrangler deploy # Cloudflare Workers
Scaffold
mcpfusion create my-server # Vanilla
mcpfusion create my-api --vector prisma # Prisma + field-level security
mcpfusion create ops-bridge --vector n8n # n8n workflow bridge
mcpfusion create petstore --vector openapi # OpenAPI → MCP
mcpfusion create my-server --target vercel --yes # Vercel Functions
mcpfusion create my-server --target cloudflare --yes # Cloudflare Workers
Ecosystem
Core
| Package | Purpose |
|---|---|
@mcpfusion/core |
Framework core — Presenters, Fluent API, middleware, routing, governance |
@mcpfusion/yaml |
Declarative YAML engine |
@mcpfusion/swarm |
Multi-agent orchestration — HMAC-SHA256 delegation, namespace isolation, W3C tracing |
@mcpfusion/control-plane |
JE centralized control plane — fleet registry, audit, auth, admin API/UI, aggregation |
@mcpfusion/a2a |
A2A Protocol Bridge — Agent Cards, task delegation |
@mcpfusion/skills |
Progressive SKILL.md disclosure for agents |
@mcpfusion/testing |
In-memory MVA pipeline testing |
@mcpfusion/inspector |
Real-time TUI dashboard |
Adapters
| Package | Target |
|---|---|
@mcpfusion/vercel |
Vercel Functions (Edge / Node.js) |
@mcpfusion/cloudflare |
Cloudflare Workers |
Generators & Connectors
| Package | Purpose |
|---|---|
@mcpfusion/openapi-gen |
OpenAPI 3.x / Swagger 2.0 → MCP tools |
@mcpfusion/prisma-gen |
Prisma schema → CRUD tools with field-level security |
@mcpfusion/n8n |
n8n workflows → MCP tools |
@mcpfusion/aws |
AWS Lambda & Step Functions → MCP tools |
Security & Auth
| Package | Purpose |
|---|---|
@mcpfusion/oauth |
RFC 8628 Device Flow |
@mcpfusion/jwt |
JWT verification — HS256 / RS256 / ES256 + JWKS |
@mcpfusion/api-key |
API key validation with timing-safe comparison |
Ship Your MCP Server to the Same Infrastructure — Free
Your server runs alongside Salesforce, Stripe, OpenAI, and 4,000+ others. V8 sandbox isolation, DLP, audit trails, and kill switch — all included. No credit card required.
- Sign up at vinkius.com
- Create an App Connector in the dashboard
- Copy your deploy token from the connector settings
- Build your MCP server with MCP Fusion
- Deploy
mcpfusion deploy
Your MCP server is live.
Powering Vinkius — 4,000+ MCP Servers in Production
Every MCP server on vinkius.com is built with MCP Fusion.
Salesforce (12 tools), Slack (8 tools), Stripe, OpenAI, Gmail, WhatsApp Business, Instagram, PayPal, CrowdStrike Falcon, SAP S/4HANA, Workday, DocuSign, Zendesk, Okta, Twilio, Tableau, HubSpot, Shopify, WooCommerce, Airbnb, Tesla Fleet API, NVIDIA AI, Mistral AI, Anthropic, Box, Meta Ads, X Ads, Reddit, Notion, Supabase, Pinecone, Datadog, Sentry — and thousands more.
Four verticals. 36+ subcategories. All governed.
AI Stack — Cognition & RAG, Code Execution, Databases, Observability, DevOps, AI Models, Agent Coordination, Security, Payments & Infra.
Enterprise — CRM, ERP, HR, Legal & Compliance, Customer Support, Marketing, BI & Analytics, Identity & IAM, Communications, E-Commerce, Accounting, Project Management.
Industries — Hospitality, Healthcare, Energy & Commodities, Construction, Real Estate, Agriculture, Wine & Spirits, Education, Logistics, Insurance, Fitness, Travel.
World Data — Economy & Finance, Central Banks, Securities & Markets, Weather & Climate, Demographics, Space & Astronomy, Health & Medicine, Environment, Energy, Food & Nutrition, Government, Trade & Labor.
Every server runs inside V8 isolate sandboxes on AWS. Ed25519 signed audit chains. Sub-40ms cold starts. DLP redaction on every response. Kill switch for instant shutdown. Every tool call logged and auditable.
vinkius.com/discover — Browse the catalog. vinkius.com/developers — Build your own with MCP Fusion.
Documentation
mcpfusion.vinkius.com · llms.txt · SKILL.md
Contributing
See CONTRIBUTING.md for development setup and guidelines.
Security
See SECURITY.md for reporting vulnerabilities.
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。