@samveys/mcp
From packages/mcp/README.md in the framework repository.
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
import { createApp } from '@samveys/core'
import { mcp } from '@samveys/mcp'
export const app = createApp({ name: 'billing', plugins: [mcp()] })Register the server with an agent:
{ "mcpServers": { "billing": { "command": "npx", "args": ["svs", "mcp"] } } }Tools
| Tool | Returns |
|---|---|
app_info | Name, environment, lifecycle state, loaded plugins |
list_routes | Method, pattern, name and middleware of every route |
database_schema | Tables and columns of the default connection (SQLite, MySQL, PostgreSQL) |
config | The resolved configuration, with secrets redacted by @samveys/core |
last_error | The 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.