Project Overview

The Simple RPC AI Backend exposes a tRPC-powered API that implements the Model Context Protocol for AI assistants. It provides:

  • Unified provider orchestration across Anthropic, OpenAI, Google Gemini, OpenRouter, and custom registries.
  • MCP tooling and resource access so assistants can browse workspaces, call tools, and retrieve documents.
  • Production-ready ergonomics including workspace isolation, provider health checks, and registry fallbacks.

Use the links below to set up the project locally and explore the platform capabilities.

Developer Tooling

The backend ships with a small set of helper UIs that make development and manual testing easier. Add the bundled CLIs to your consumer project for quick access:

// package.json
"scripts": {
  "trpc:build": "simple-rpc-gen-methods",
  "dev:panel": "simple-rpc-dev-panel --server-port 8000",
  "dev:server": "tsx watch src/index.ts",
  "dev": "concurrently \"pnpm dev:server\" \"pnpm dev:panel\"",
  "build": "tsc"
}

Install the helper dev dependency once: pnpm add -D concurrently.

Run each command in a separate terminal once your server is listening:

Tool Default URL Purpose
Dev Panel (pnpm dev:panel) http://localhost:8080 Dashboards for MCP tools, server workspaces, tRPC procedures, and the generated OpenRPC schema. Automatically launches MCP Jam if the optional dependency @mcpjam/inspector is available.
tRPC Playground http://localhost:8080/trpc-playground Interactive UI (bundled with the dev panel) to issue queries/mutations against /trpc/*.
OpenRPC Inspector https://inspector.open-rpc.org/?url=http://localhost:8000/openrpc.json Remote viewer for the JSON-RPC schema. Allow its origin in cors.origin (e.g. add https://inspector.open-rpc.org).
OpenRPC Playground https://playground.open-rpc.org/?url=http://localhost:8000/openrpc.json Interactive request builder for /rpc. Requires the same CORS adjustments as the inspector.

ℹ️ To skip MCP Jam entirely, install the backend with pnpm install --no-optional (or run pnpm prune --prod --no-optional after install). The dev panel simply omits MCP Jam when the optional dependency is absent.

ℹ️ Re-run pnpm trpc:build whenever you change tRPC routers— the dev panel and JSON-RPC schema read from the generated trpc-methods.json and do not watch source files automatically.

ℹ️ These CLIs respect AI_SERVER_PORT. Override it (for example AI_SERVER_PORT=9000 pnpm dev:panel) if your API server runs on a non-standard port. Adapt the dev/build scripts to match your app layout (multiple entry points, custom bundlers, etc.). For convenience you can start the API server and dev panel together via pnpm dev (using concurrently).

Examples

The GitHub repository includes runnable samples under examples/. They demonstrate how to compose routers, MCP integrations, and authentication flows:

Clone an example, run pnpm install, then start the server with pnpm dev to explore the workflows via the dev panel.