MCP服务器的TypeScript框架。
演讲者塑造感知。
在您的数据和AI代理之间的一个类型层——剥离未声明的字段,编辑PII,按工作流状态屏蔽工具,并部署到任何边缘。
使用Vurb.ts进行建设? 来和我们谈谈-- 加入 Discord→ 问题、战争故事以及你要运送的东西。创始人就在里面。
](https://www.npmjs.com/package/@vurb/core) ](https://www.npmjs.com/package/@vurb/core)    
文档 · 快速开始 · API 参考 · llms.txt · Discord 的中文翻译是“不和谐”或“纷争”。
为什么选择Vurb.ts?
每个原始MCP服务器都执行相同的操作: JSON.stringify() 数据库行并将其发送到LLM。AI接收 password_hash, customer_ssn, internal_margin --每一列。没有治理。没有规则。没有感知控制。
Vurb.ts为您提供了三种解决方法——选择一种适合您团队的方法:
路径1:声明性YAML——零代码
在单个文件中定义整个MCP服务器 vurb.yaml。没有TypeScript。无构建步骤。
# vurb.yaml — a complete MCP server
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}"]vurb yaml dev # MCP server running — zero TypeScript路径2:演示者流——控制代理感知的内容
Presenter是一个类型化的感知层。您的处理程序返回原始数据。演示者塑造了代理看到的一切:
Handler (raw data) Presenter Agent (LLM)
────────────────── ───────── ──────────
{ amount_cents, → Schema (allowlist) → Structured
password_hash, + Rules (contextual) perception
customer_ssn, + PII redaction package
internal_margin } + Suggested next actions
- password_hash ← STRIPPED
- customer_ssn ← REDACTED
- internal_margin ← STRIPPEDimport { createPresenter, f, t } from '@vurb/core';
const InvoicePresenter = createPresenter('Invoice')
.schema({ id: t.string, amount_cents: t.number, status: t.enum('paid', 'pending') })
.redactPII(['*.customer_ssn'])
.rules(['amount_cents is in CENTS — divide by 100 for display.'])
.suggest((inv) => inv.status === 'pending'
? [suggest('billing.pay', 'Invoice pending — process payment')]
: [suggest('billing.archive', 'Invoice settled — archive it')]);
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 } }));未声明的字段在RAM级别被剥离。PII在UI逻辑运行后被编辑(延迟断头台)。规则随数据一起传播,而不是在系统提示中。接下来的操作是根据数据状态计算的,而不是硬编码的。
路径3:工作流门——仅在有效时显示的工具
FSM状态门使得人工智能在物理上不可能乱调用工具。如果国家是 empty, cart.pay 不存在于 tools/list:
const gate = f.fsm({
id: 'checkout', initial: 'empty',
states: {
empty: { on: { ADD_ITEM: 'has_items' } },
has_items: { on: { CHECKOUT: 'payment' } },
payment: { on: { PAY: 'confirmed' } },
confirmed: { type: 'final' },
},
});
export default f.mutation('cart.pay')
.bindState('payment', 'PAY') // Invisible until 'payment' state
.handle(async (input, ctx) => ctx.db.payments.process(input.method));| 状态 | 可见工具 |
|---|---|
empty | cart.add_item, cart.view |
has_items | cart.add_item, cart.checkout, cart.view |
payment | cart.pay, cart.view |
confirmed | cart.view |
______________________________________________________________________
开始使用
npx @vurb/core create my-server
cd my-server && npm run dev放入文件 src/tools/,restart--这是一个实时MCP工具:
src/tools/
├── billing/
│ ├── get_invoice.ts → billing.get_invoice
│ └── pay.ts → billing.pay
└── users/
└── list.ts → users.list部署
相同的代码,任何平台。零变化:
vurb deploy # Vinkius Edge (default)
vercel deploy # Vercel Functions
wrangler deploy # Cloudflare Workers脚手架选项
vurb create my-server # Vanilla — file-based routing
vurb create my-api --vector prisma # Prisma — CRUD with field-level security
vurb create ops-bridge --vector n8n # n8n — workflow bridge
vurb create petstore --vector openapi # OpenAPI → MCP in one command
vurb create my-server --target vercel --yes # Vercel Functions target
vurb create my-server --target cloudflare --yes # Cloudflare Workers target______________________________________________________________________
零学习曲线
Vurb.ts运送a 技能.md --机器可读的建筑合同。您的AI代理读取规范并写入整个服务器。第一次通过,没有更正。
在中打开项目 光标, 克劳德代码, GitHub Copilot,或 帆板运动 并提示:
*“使用Prisma为患者记录构建MCP服务器。从LLM输出中重新设置SSN和诊断。添加一个FSM,在主治医生签字之前控制出院工具。”*
代理读取规范,生成正确的Presenter、中间件、FSM门控和基于文件的路由。您查看了PR。
📄 机器可读规格: vurb.vinkius.com/llms.txt --针对LLM消耗进行了优化。
______________________________________________________________________
主要特点
出口防火墙(演示者模式允许列表)·使用延迟Guillotine进行PII纠正·FSM状态门(工具按状态消失)·A2A协议桥(@vurb/a2a --通过代理卡和任务委托将MCP服务器暴露为符合A2A的代理)·多代理群(@vurb/swarm --HMAC-SHA256委托、命名空间隔离、W3C跟踪)·中间件(预编译、零分配)·tRPC式类型客户端·自愈错误·状态同步(RFC 7234缓存信号)·零信任沙盒(V8隔离)·提示引擎·代理技能·能力治理(SHA-256锁文件)·检查器(实时TUI仪表板)·声明性YAML引擎(@vurb/yaml)
→ 全部文件
______________________________________________________________________
代码生成器
将现有基础设施转变为MCP服务器:
# OpenAPI / Swagger → typed MCP tools
npx openapi-gen generate -i ./petstore.yaml -o ./generated
# Prisma → CRUD tools with field-level security
npx prisma generate # uses vurb-prisma-gen
# n8n → auto-discover webhook workflows
const n8n = await createN8nConnector({ url, apiKey, includeTags: ['ai-enabled'] });______________________________________________________________________
生态系统
核心
| 包装 | 用途 |
|---|---|
@vurb/core | 框架核心-演示者、Fluent API、中间件、路由 |
@vurb/yaml | 声明性YAML引擎——无需代码即可定义MCP服务器 |
@vurb/swarm | 多代理编排——联邦切换协议 |
@vurb/a2a | A2A协议桥——代理卡、任务委托、结构化消息交换 |
@vurb/testing | 使用MVA层断言进行内存管道测试 |
@vurb/inspector | 通过Shadow Socket实现实时终端仪表板 |
适配器
| 套餐 | 目标 |
|---|---|
@vurb/vercel | Vercel函数(Edge/Node.js) |
@vurb/cloudflare | Cloudflare员工 |
发电机和连接器
| 包装 | 用途 |
|---|---|
@vurb/openapi-gen | OpenAPI 3.x/Swagger 2.0→ MCP工具 |
@vurb/prisma-gen | Prisma模式→ 具有字段级安全性的CRUD工具 |
@vurb/n8n | n8n工作流→ MCP工具 |
@vurb/aws | AWS Lambda和Step函数→ MCP工具 |
@vurb/skills | 代理的渐进式指令分发 |
安全与认证
| 包装 | 用途 |
|---|---|
@vurb/oauth | RFC 8628设备流程 |
@vurb/jwt | JWT验证——HS256/R2256/ES256+JWKS |
@vurb/api-key | API密钥验证与定时安全比较 |
______________________________________________________________________
文档
完整指南、API参考资料和食谱:
vurb.vinkius.com · llms.txt *(AI优化规格)*
贡献
看 贡献.md 用于开发设置和指南。
安全
看 安全.md 用于报告漏洞。
