/ Каталог / Песочница / vurb.ts
● Сообщество vinkius-labs ⚡ Сразу

vurb.ts

автор vinkius-labs · vinkius-labs/vurb.ts

A TypeScript framework for building MCP servers with type-safe tools, PII redaction, and FSM state gates — think Express.js for MCP.

Vurb.ts is a framework, not an MCP server. It's for developers building their own MCP servers. Ships with a presenter layer that strips undeclared DB columns, PII redaction at a 'Late Guillotine' stage, FSM state gates preventing out-of-order tool calls, and a scaffolding CLI that supports Prisma, n8n, and OpenAPI vectors.

Зачем использовать

Ключевые функции

Живое демо

Как выглядит на практике

vurb-ts.replay ▶ готово
0/0

Установка

Выберите клиент

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "vurb-ts": {
      "command": "npx",
      "args": [
        "-y",
        "vurb.ts"
      ],
      "_inferred": true
    }
  }
}

Откройте Claude Desktop → Settings → Developer → Edit Config. Перезапустите после сохранения.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "vurb-ts": {
      "command": "npx",
      "args": [
        "-y",
        "vurb.ts"
      ],
      "_inferred": true
    }
  }
}

Cursor использует ту же схему mcpServers, что и Claude Desktop. Конфиг проекта приоритетнее глобального.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "vurb-ts": {
      "command": "npx",
      "args": [
        "-y",
        "vurb.ts"
      ],
      "_inferred": true
    }
  }
}

Щёлкните значок MCP Servers на боковой панели Cline, затем "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "vurb-ts": {
      "command": "npx",
      "args": [
        "-y",
        "vurb.ts"
      ],
      "_inferred": true
    }
  }
}

Тот же формат, что и Claude Desktop. Перезапустите Windsurf для применения.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "vurb-ts",
      "command": "npx",
      "args": [
        "-y",
        "vurb.ts"
      ]
    }
  ]
}

Continue использует массив объектов серверов, а не map.

~/.config/zed/settings.json
{
  "context_servers": {
    "vurb-ts": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "vurb.ts"
        ]
      }
    }
  }
}

Добавьте в context_servers. Zed перезагружается автоматически.

claude mcp add vurb-ts -- npx -y vurb.ts

Однострочная команда. Проверить: claude mcp list. Удалить: claude mcp remove.

Сценарии использования

Реальные сценарии: vurb.ts

How to build a PII-safe MCP server with Vurb.ts

👤 Developers building an MCP for a product with customer data ⏱ ~60 min advanced

Когда использовать: You're wrapping an internal system and must guarantee PII never leaves the perimeter.

Предварительные требования
  • Node 20+ and npm — Standard
  • Vurb CLI — npm install -g @vurb/cli
Поток
  1. Scaffold
    Run vurb create customer-mcp with the prisma vector, and open the generated src/tools/ folder.✓ Скопировано
    → Scaffolded project
  2. Declare a presenter
    Add a presenter for the Customer model that exposes only id, plan, and country. Everything else (email, phone, address) is physically stripped.✓ Скопировано
    → LLM sees only declared fields
  3. Add PII redaction on free-text fields
    On the Note model's body field, apply .redactPII() at the Late Guillotine.✓ Скопировано
    → Emails/phones inside note bodies masked
  4. Test with the in-memory pipeline
    Write a @vurb/testing case that feeds a record with fake PII and asserts the output is redacted.✓ Скопировано
    → Test passes

Итог: An MCP server where PII leakage is a compile/runtime impossibility, not a code review item.

Подводные камни
  • Redaction regex never catches everything — Combine presenter whitelist + redaction — don't rely on redaction alone
  • Presenter drift over time — CI assertion: snapshot presenter output for key models; fail PRs that change it without review

Enforce correct tool-call order with FSM state gates

👤 MCP authors building multi-step flows (booking, checkout) ⏱ ~30 min intermediate

Когда использовать: You have tools that must run in a specific order; you want the framework to enforce it.

Поток
  1. Define state machine
    Create an FSM for checkout: cart → quote → payment → confirm. Each tool gated by the state.✓ Скопировано
    → State definition file
  2. Attach gates to tools
    Tool confirm_order only allowed from state=payment.✓ Скопировано
    → Calling out-of-order returns a gate error

Итог: Agents physically cannot skip prerequisite steps.

Deploy a Vurb MCP to Cloudflare Workers or Vinkius Edge

👤 Builders wanting global low-latency MCPs ⏱ ~20 min intermediate

Когда использовать: You want the MCP close to users, not in a single region.

Поток
  1. Choose target
    vurb deploy --target cloudflare✓ Скопировано
    → Worker published
  2. Smoke test
    List tools via the deployed URL.✓ Скопировано
    → Tool list returns from CF

Итог: A globally distributed MCP server.

Комбинации

Сочетайте с другими MCP — эффект x10

vurb-ts + jetski

Build with Vurb; operate behind Jetski for OAuth + analytics

Generate a Vurb MCP and deploy behind Jetski so users authenticate via OAuth and we get prompt analytics.✓ Скопировано
vurb-ts + proxy-2

Aggregate your Vurb MCP alongside third-party MCPs via mcp-proxy

Register the deployed Vurb MCP as an upstream of mcp-proxy so teammates see it alongside github/sentry.✓ Скопировано

Инструменты

Что предоставляет этот MCP

ИнструментВходные данныеКогда вызыватьСтоимость
(framework) You write tools; framework exposes them N/A — Vurb.ts is for authoring MCP servers, not a runtime MCP to call n/a

Стоимость и лимиты

Во что обходится

Квота API
Framework itself has no runtime cost; hosting costs depend on deploy target
Токенов на вызов
Varies by the tools you build
Деньги
Free, open source
Совет
Edge deploys are cheap (CF Workers free tier handles modest traffic).

Безопасность

Права, секреты, радиус поражения

Хранение учётных данных: Whatever your deployed tools need; framework provides middleware hooks for injection
Исходящий трафик: Depends entirely on the tools you write

Устранение неполадок

Частые ошибки и исправления

Tool file added but not showing up

File-based router watches src/tools/; restart dev server or check the export pattern.

Проверить: vurb dev logs
Presenter strips too much

Ensure presenter fields match the schema; add missing fields back explicitly.

Проверить: Unit test presenter output
State gate error on a valid call

Check FSM transitions — source state might not match. Print current state in middleware.

Проверить: Add a log in state middleware

Альтернативы

vurb.ts в сравнении

АльтернативаКогда использоватьКомпромисс
FastMCP (TypeScript)You want the minimum boilerplate, no opinionated guardsNo PII/FSM features — you bolt them on
@modelcontextprotocol/sdkYou want raw protocol controlBring your own auth, redaction, tests
volcano-agent-sdkYou're building agents that *consume* MCPs, not serversDifferent role in the stack

Ещё

Ресурсы

📖 Читать официальный README на GitHub

🐙 Открытые задачи

🔍 Все 400+ MCP-серверов и Skills