Orpc Fn
MCP server by HansKristoffer Verified · npm:orpc-fn
Defines a backend function once as a typed oRPC procedure, with tracing, logging, guards and optional live queries over Redis. Built for TypeScript teams using oRPC who want one definition shared across routes, tools and clients.
Install Orpc Fn
Built from the published package, never by AI.
claude mcp add orpc-fn -- npx -y orpc-fnRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"orpc-fn": {
"args": [
"-y",
"orpc-fn"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"orpc-fn": {
"args": [
"-y",
"orpc-fn"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"orpc-fn": {
"args": [
"-y",
"orpc-fn"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add orpc-fn -- npx -y orpc-fn{
"mcpServers": {
"orpc-fn": {
"args": [
"-y",
"orpc-fn"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add orpc-fn npx -y orpc-fnGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the orpc-fn block.
About
orpc-fn is a TypeScript library for defining a backend function once. Each function becomes a typed oRPC procedure with OpenTelemetry tracing, structured logging, guards, injected handler extras, nested calls and optional live queries over Redis. Adapters expose the same procedure as a Mastra tool, an MCP tool or a Hono route, and client helpers call it from Vue, React or Expo.
Apps keep their own auth, context, database, queues, permissions and other app-specific code, and inject them once with createFn. The package requires ESM, Node 20+ or Bun, TypeScript 5.7+, oRPC 1.14+ and Zod 4. It suits teams building typed backends that want one function definition shared across routes, tools and clients.
Written from the project's README and checked against it.
What you need
- Node.js 20+ or Bun
- TypeScript 5.7+
- oRPC 1.14+
- Zod 4
- Redis for live queries over Redis
Try asking
- Add tracing and a permission guard to my order lookup function
- Turn my getOrder function into a live query that updates on change
- Expose my customer lookup as an MCP tool and a Hono route
Good to know
- ESM only
- Procedure builders must not set an input or output schema; schemas go on routes
- Raw pub/sub streams fail with SERVICE_UNAVAILABLE after detected loss unless an overflow marker is used
- safePublish does not retry or guarantee delivery
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
What you can do with it
- Share one backend function across routes and tools
- Add tracing and guards to API procedures
- Push live query updates over Redis
Alternatives to Orpc Fn
All alternatives →Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.
ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.
Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.
MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.
Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.
MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.
Compare with Supabase, ArcadeDB MCP Server or DBHub
Orpc Fn: common questions
Does orpc-fn work with MCP?
Yes, adapters expose the same procedure as an MCP tool, as well as a Mastra tool and a Hono route.
Is Redis required to use orpc-fn?
No. Live queries over Redis are optional, and the source lists memory as a pub/sub transport alongside Bun Redis and ioredis.
How does orpc-fn handle tracing and logging?
Every call runs in an OpenTelemetry span named after the function and writes one fn.completed log line at info, warn or error.
How do I install Orpc Fn?
In Claude Code run claude mcp add orpc-fn -- npx -y orpc-fn. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Orpc Fn the official server?
Orpc Fn is published by npm:orpc-fn from its verified domain in the official MCP Registry.
Is Orpc Fn free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Orpc Fn safe to use?
It scores 83 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Orpc Fn?
Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.
Does Orpc Fn work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
