TrpcSAFE
Serve tRPC routes as an MCP server
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Serve tRPC routes via MCP.
Usage
2. Add to meta
import { initTRPC } from '@trpc/server';
import { type McpMeta } from 'trpc-to-openapi';
const t = initTRPC.meta().create();3. Enable for routes
export const appRouter = t.router({
sayHello: t.procedure
.meta({ openapi: { enabled: true, description: 'Greet the user' } })
.input(z.object({ name: z.string() }))
.output(z.object({ greeting: z.string() }))
.query(({ input }) => {
return { greeting: `Hello ${input.name}!` };
});
});4. Serve
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { createMcpServer } from 'trpc-mcp';
const mcpServer = createMcpServer(
{ name: 'trpc-mcp-example', version: '0.0.1' },
appRouter,
);
const transport = new StdioServerTransport();
await mcpServer.connect(transport);b80b619ed32aOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add trpc-mcp -- npx -y trpc-mcp
{
"mcpServers": {
"trpc-mcp": {
"command": "npx",
"args": [
"-y",
"trpc-mcp"
]
}
}
}Exposed tools (1)
1 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
give_feedback | read | Give feedback to the tool provider |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (1)
@modelcontextprotocol/sdk, zod-to-json-schema, typescript, zod
Gates applied: no_behavioural_pass.
b80b619ed32afull audit observations/trust-audit/mcp-server/jacse__trpc.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | b80b619ed32a | SAFE | B | 89 | first audit |
Questions
What is the Trpc MCP server?
Serve tRPC routes as an MCP server
What tools does Trpc expose?
1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Trpc safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Trpc need?
No credential environment variables were found in its source, so it appears to need none.
How does Trpc run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as trpc-mcp.
How current is this page?
The grade is for one exact copy of the source (b80b619ed32a), read on 2026-10-08. The repository is watched and re-audited when it changes.