@samveys/mcp

Versi
1.0.35 Nov 2026
Pasang
pnpm add @samveys/mcp

Dari packages/mcp/README.md di repository framework.

Halaman ini belum diterjemahkan. Kamu sedang membaca versi bahasa Inggris.

svs mcp serves your app to AI coding agents over the Model Context Protocol on stdio, so an agent reads the real routes and schema instead of guessing them. Every tool is read-only.

Use it

ts
import { createApp } from '@samveys/core'
import { mcp } from '@samveys/mcp'

export const app = createApp({ name: 'billing', plugins: [mcp()] })

Register the server with an agent:

json
{ "mcpServers": { "billing": { "command": "npx", "args": ["svs", "mcp"] } } }

Tools

ToolReturns
app_infoName, environment, lifecycle state, loaded plugins
list_routesMethod, pattern, name and middleware of every route
database_schemaTables and columns of the default connection (SQLite, MySQL, PostgreSQL)
configThe resolved configuration, with secrets redacted by @samveys/core
last_errorThe most recent error the app reported (name, message, code, time)

Packages and apps add tools with mcp({ tools: [...] }), and ship agent guidelines as MCP prompts with mcp({ guidelines: [{ name, description, text }] }).

Protocol versions 2025-06-18, 2025-03-26 and 2024-11-05 are accepted. Logs must go to stderr, because stdout carries the protocol.