MCPcopy
hub / github.com/trpc/trpc

github.com/trpc/trpc @v11.18.0 sqlite

repository ↗ · DeepWiki ↗ · release v11.18.0 ↗
2,713 symbols 8,966 edges 902 files 146 documented · 5%
README

<img alt="tRPC" src="https://assets.trpc.io/www/trpc-readme.png" />

tRPC

Move fast and break nothing. End-to-end typesafe APIs made easy.

codecov weekly downloads MIT License Discord

Twitter

Demo
The client above is not importing any code from the server, only its type declarations.

Intro

tRPC allows you to easily build & consume fully typesafe APIs without schemas or code generation.

Features

  • ✅  Well-tested and production ready.
  • 🧙‍♂️  Full static typesafety & autocompletion on the client, for inputs, outputs, and errors.
  • 🐎  Snappy DX - No code generation, run-time bloat, or build pipeline.
  • 🍃  Light - tRPC has zero deps and a tiny client-side footprint.
  • 🐻  Easy to add to your existing brownfield project.
  • 🔋  Batteries included - React.js/Next.js/Express.js/Fastify adapters. (But tRPC is not tied to React, and there are many community adapters for other libraries)
  • 🥃  Subscriptions support.
  • ⚡️  Request batching - requests made at the same time can be automatically combined into one
  • 👀  Quite a few examples in the ./examples-folder

Quickstart

There are a few examples that you can use for playing out with tRPC or bootstrapping your new project. For example, if you want a Next.js app, you can use the full-stack Next.js example:

Quick start with a full-stack Next.js example:

# yarn
yarn create next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter

# npm
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter

# pnpm
pnpm create next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter

# bun
bunx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter

# deno
deno init --npm next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter

👉 See full documentation on tRPC.io. 👈

AI Agents

If you use an AI coding agent (Claude Code, Cursor, Windsurf, etc.), install tRPC skills for better code generation:

npx @tanstack/intent@latest install

Star History

Star History Chart

Core Team

Do you want to contribute? First, read the Contributing Guidelines before opening an issue or PR so you understand the branching strategy and local development environment. If you need any more guidance or want to ask more questions, feel free to write to us on Discord!

Project leads

The people who lead the API-design decisions and have the most active role in the development

Alex / KATT Julius Marminge Nick Lucas

Active contributors

People who actively help out improving the codebase by making PRs and reviewing code

Matthieu Hocquart

Special shout-outs

Individuals who have made exceptional contributions to tRPC through code, documentation, community building, and other valuable efforts

Theo Browne Sachin Raja

Sponsors

If you enjoy working with tRPC and want to support us, consider giving a token appreciation by GitHub Sponsors!

🥈 Silver Sponsors

Greptile Greptile CodeRabbit CodeRabbit SerpApi SerpApi

😻 Smaller Backers

Ahoy%20Labs Ahoy Labs Unkey Unkey Dr.%20B Dr. B Proxidize Proxidize Ferry%20Health Ferry Health Liminity%20AB Liminity AB
Ryan%20Magoon Ryan Magoon BestKru BestKru Max%20Greenwald Max Greenwald Dmitry%20Maykov Dmitry Maykov Chris%20Bradley Chris Bradley fanvue fanvue
Drew%20Powers Drew Powers Drizzle%20Team Drizzle Team Spencer%20McKenney Spencer McKenney Kalle Kalle Maicon%20Carraro Maicon Carraro Andrei%20Karushev Andrei Karushev
Stefan%20Wallin Stefan Wallin Venue%20Ink Venue Ink Aerius%20Ventilation%20AB Aerius Ventilation AB Stefan%20Smiljkovic Stefan Smiljkovic Netrouting.com Netrouting.com Erik%20Bj%C3%A4reholt Erik Bjäreholt

All contributors ✨

<img width="720" src="https://contrib.rocks/image?repo=trpc/trpc" alt="A table of avatars from the project's contributors" />


<img src="https://github.com/trpc/trpc/raw/v11.18.0/www/static/img/powered-by-vercel.svg" alt="Powered by Vercel" title="Powered by Vercel">

Extension points exported contracts — how you extend this code

Request (Interface)
* Represents a WebSocket request managed by the RequestManager. * Combines the network message, a utility promise (`end
packages/client/src/links/wsLink/wsClient/requestManager.ts
TreeNode (Interface)
A tree node with children of the same type
packages/openapi/test/routers/cyclicTypesRouter.router.ts
TrpcMiddlewareArguments (Interface)
* See @sentry/node trpc middleware: * https://github.com/getsentry/sentry-javascript/blob/6d424571e3cd5e99991b711f4e23d
packages/tests/server/regression/issue-5037-context-inference.test.ts
Props (Interface)
(no doc)
www/src/components/YouTubeEmbed.tsx
TwoslashBlock (Interface)
(no doc)
www/scripts/check-twoslash.ts
Post (Interface)
(no doc)
packages/react-query/test/overrides.test.tsx
ProcedureResolverOptions (Interface)
(no doc)
packages/server/src/unstable-core-do-not-import/procedureBuilder.ts
CreateTRPCContextResult (Interface)
(no doc)
packages/tanstack-react-query/src/internals/Context.tsx

Core symbols most depended-on inside this repo

query
called by 1049
packages/server/src/unstable-core-do-not-import/procedureBuilder.ts
input
called by 442
packages/server/src/unstable-core-do-not-import/procedureBuilder.ts
create
called by 347
packages/openapi/test/routers/appRouter-heyapi/sdk.gen.ts
next
called by 186
packages/client/src/links/wsLink/wsClient/wsClient.ts
get
called by 154
packages/openapi/test/routers/appRouter-heyapi/sdk.gen.ts
close
called by 152
packages/client/src/links/wsLink/wsClient/wsClient.ts
mutation
called by 141
packages/server/src/unstable-core-do-not-import/procedureBuilder.ts
subscribe
called by 129
packages/server/src/observable/types.ts

Shape

Function 1,746
Interface 445
Method 349
Class 170
Enum 3

Languages

TypeScript100%

Modules by API surface

packages/openapi/test/routers/appRouter-heyapi/sdk.gen.ts98 symbols
packages/openapi/src/generate.ts56 symbols
packages/server/src/unstable-core-do-not-import/stream/jsonl.ts37 symbols
packages/openapi/test/routers/edgeCaseRouter-heyapi/sdk.gen.ts37 symbols
packages/server/src/unstable-core-do-not-import/procedureBuilder.ts31 symbols
packages/openapi/test/types.ts30 symbols
packages/openapi/test/routers/cyclicTypesRouter-heyapi/sdk.gen.ts30 symbols
packages/server/src/unstable-core-do-not-import/stream/sse.ts27 symbols
packages/openapi/test/routers/descriptionsRouter-heyapi/sdk.gen.ts24 symbols
packages/openapi/src/schemaExtraction.ts21 symbols
packages/openapi/test/routers/superjsonRouter-heyapi/client/utils.gen.ts20 symbols
packages/openapi/test/routers/nodeModulesJsDocRouter-heyapi/client/utils.gen.ts20 symbols

Used by 3 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@actions/core3.0.0 · 1×
@actions/github9.0.0 · 1×
@algolia/client-search5.0.0 · 1×
@babel/core7.23.2 · 1×
@babel/preset-env7.23.2 · 1×
@bomb.sh/args0.3.1 · 1×
@clack/prompts1.2.0 · 1×
@cloudflare/workers-types4.20250505.0 · 1×
@docusaurus/core3.7.0 · 1×
@docusaurus/faster3.7.0 · 1×
@docusaurus/module-type-aliases3.7.0 · 1×
@docusaurus/plugin-content-blog3.7.0 · 1×

For agents

$ claude mcp add trpc \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact