The type-safe bridge between Python and TypeScript.

Define your API once in Python. Consume it in TypeScript with end-to-end type safety. No schema drift. No hand-written clients.

uv add pyrpc-core
from pyrpc_core import rpc, model
 
@model
class Post:
    id: int
    title: str
    published: bool = False
 
@rpc
def get_post(id: int) -> Post:
    return Post(id=id, title="Hello pyRPC")

Supported Frameworks

Next.jsNext.js
ReactReact
VueVue
SvelteSvelte
FastAPIFastAPI
FlaskFlask
DjangoDjango

Ship in three commands.

From zero to a type-safe API in under two minutes.

uv add pyrpc-core installs the core runtime with Pydantic-powered validation and async support.
server.py
from pyrpc_core import rpc, model @model class User: name: str @rpc def greet(name: str) -> User: return User(name=name)

Connect MCP clients to pyRPC:

  • ClaudeClaude
  • CursorCursor
  • VS CodeVS Code
  • WindsurfWindsurf
  • ClineCline
  • ZedZed
  • CodexCodex
  • GrokGrok
  • AntigravityAntigravity
  • OpenCodeOpenCode
  • ClaudeClaude
  • CursorCursor
  • VS CodeVS Code
  • WindsurfWindsurf
  • ClineCline
  • ZedZed
  • CodexCodex
  • GrokGrok
  • AntigravityAntigravity
  • OpenCodeOpenCode

What builders say.

if there an option for compatibility with oRPC RPC/OpenAPI client v2, you will get support from me.
Định LêĐịnh LêCreator, oRPC
Dude, love this. As someone who uses FastAPI a lot, I'm gonna try this.
SankuSanku@sankalpa_02
We deleted our whole hand-written API layer. After running pyrpc dev, every procedure shows up fully typed in VS Code autocomplete, with no more stale wrappers or outdated docs to keep in sync.
Amer AbdulquemAmer AbdulquemFull-Stack Developer
Nice seems like a cool project.
FrectonzFrectonzDeveloper, evpin.com
Renaming a Python procedure flagged every call site in our frontend before we even ran the build. This is what API development should feel like.
Brook TeklebrhanBrook TeklebrhanMobile Developer
Bro this is so fkn cool 🔥
SeefunSeefunBackend Developer
Ayyy this is veryy dope fr! Smooth and well functional amazing work brother! 👏 you gotta push it well fr
Cyber GuardiansCyber GuardiansFull-Stack Developer
Good work 👏
ኢዮብ z ሽቱኢዮብ z ሽቱ@kilopal_
Built something with pyRPC?
We’d love to hear itPost it on

Ship end-to-end types.

Define procedures in Python. Consume them in TypeScript with full type safety. No schema drift, no codegen pipelines.

-- / month
-- downloads
-- stars