πŸš€ Big News:Socket Has Acquired Secure Annex.Learn More β†’
Socket
Book a DemoSign in
Socket

@vurb/core

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vurb/core

MVA (Model-View-Agent) framework for the Model Context Protocol. Structured perception packages with Presenters, cognitive guardrails, self-healing errors, action consolidation, and tRPC-style type safety β€” so AI agents perceive and act on your data deter

latest
Source
npmnpm
Version
3.19.5
Version published
Maintainers
1
Created
Source
image

The TypeScript framework for MCP Servers.

Presenters shape perception.
A typed layer between your data and the AI agent β€” strips undeclared fields, redacts PII, gates tools by workflow state, and deploys to any edge.

npm version Downloads TypeScript MCP Standard License llms.txt

Documentation Β· Quick Start Β· API Reference Β· llms.txt

demo

Why Vurb.ts?

Every raw MCP server does the same thing: JSON.stringify() the database row and ships it to the LLM. The AI receives password_hash, customer_ssn, internal_margin β€” every column. No governance. No rules. No perception control.

Vurb.ts gives you three ways to fix this β€” pick the one that fits your team:

Path 1: Declarative YAML β€” zero code

Define your entire MCP server in a single vurb.yaml. No TypeScript. No build step.

# 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

Path 2: Presenter flow β€” control what the agent perceives

The Presenter is a typed perception layer. Your handler returns raw data. The Presenter shapes everything the agent sees:

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 ← STRIPPED
import { 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 } }));

Undeclared fields are stripped at RAM level. PII is redacted after UI logic runs (Late Guillotine). Rules travel with data, not in the system prompt. Next actions are computed from data state, not hardcoded.

Path 3: Workflow gates β€” tools that appear only when valid

The FSM State Gate makes it physically impossible for the AI to call tools out of order. If the state is empty, cart.pay doesn't exist in 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));
StateVisible tools
emptycart.add_item, cart.view
has_itemscart.add_item, cart.checkout, cart.view
paymentcart.pay, cart.view
confirmedcart.view

Get Started

npx @vurb/core create my-server
cd my-server && npm run dev

Drop a file in src/tools/, restart β€” 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

Same code, any platform. Zero changes:

vurb deploy                  # Vinkius Edge (default)
vercel deploy                # Vercel Functions
wrangler deploy              # Cloudflare Workers

Scaffold Options

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

Zero Learning Curve

Vurb.ts ships a SKILL.md β€” a machine-readable architectural contract. Your AI agent reads the spec and writes the entire server. First pass, no corrections.

Open your project in Cursor, Claude Code, GitHub Copilot, or Windsurf and prompt:

"Build an MCP server for patient records with Prisma. Redact SSN and diagnosis from LLM output. Add an FSM that gates discharge tools until attending physician signs off."

The agent reads the spec, produces correct Presenters, middleware, FSM gating, and file-based routing. You review the PR.

πŸ“„ Machine-readable spec: vurb.vinkius.com/llms.txt β€” optimized for LLM consumption.

Key Features

Egress Firewall (Presenter schema allowlist) Β· PII Redaction with Late Guillotine Β· FSM State Gate (tools disappear by state) Β· A2A Protocol Bridge (@vurb/a2a β€” expose MCP servers as A2A-compliant agents with Agent Cards and task delegation) Β· Multi-Agent Swarm (@vurb/swarm β€” HMAC-SHA256 delegation, namespace isolation, W3C tracing) Β· Middleware (pre-compiled, zero-allocation) Β· tRPC-style typed client Β· Self-healing errors Β· State Sync (RFC 7234 cache signals) Β· Zero-trust Sandbox (V8 isolate) Β· Prompt Engine Β· Agent Skills Β· Capability Governance (SHA-256 lockfile) Β· Inspector (real-time TUI dashboard) Β· Declarative YAML engine (@vurb/yaml)

β†’ Full documentation

Code Generators

Turn existing infrastructure into MCP servers:

# 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'] });

Ecosystem

Core

PackagePurpose
@vurb/coreFramework core β€” Presenters, Fluent API, middleware, routing
@vurb/yamlDeclarative YAML engine β€” define MCP servers without code
@vurb/swarmMulti-agent orchestration β€” Federated Handoff Protocol
@vurb/a2aA2A Protocol Bridge β€” Agent Cards, task delegation, structured message exchange
@vurb/testingIn-memory pipeline testing with MVA layer assertions
@vurb/inspectorReal-time terminal dashboard via Shadow Socket

Adapters

PackageTarget
@vurb/vercelVercel Functions (Edge / Node.js)
@vurb/cloudflareCloudflare Workers

Generators & Connectors

PackagePurpose
@vurb/openapi-genOpenAPI 3.x / Swagger 2.0 β†’ MCP tools
@vurb/prisma-genPrisma schema β†’ CRUD tools with field-level security
@vurb/n8nn8n workflows β†’ MCP tools
@vurb/awsAWS Lambda & Step Functions β†’ MCP tools
@vurb/skillsProgressive instruction distribution for agents

Security & Auth

PackagePurpose
@vurb/oauthRFC 8628 Device Flow
@vurb/jwtJWT verification β€” HS256 / RS256 / ES256 + JWKS
@vurb/api-keyAPI key validation with timing-safe comparison

Documentation

Full guides, API reference, and cookbook recipes:

vurb.vinkius.com Β· llms.txt (AI-optimized spec)

Contributing

See CONTRIBUTING.md for development setup and guidelines.

Security

See SECURITY.md for reporting vulnerabilities.

License

Apache 2.0

Keywords

mcp

FAQs

Package last updated on 07 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts