Skip to content

Repository files navigation

Bridgent AI logo

Bridgent AI

Expose your existing APIs, databases, and code as production-ready MCP servers in one line.

One command turns your existing OpenAPI / SQL Schema / Prisma / Drizzle / tRPC / Zod into an MCP Server, instantly usable from any MCP host such as Claude Code, Codex, Cursor, or Gemini CLI.

npm License Docs

Website: https://js-mark.com/Bridgent/

Languages: English | 简体中文

Status

🚧 Alpha — current capabilities:

  • Sources: hand-written Zod tools, OpenAPI 3.x specs, Prisma 6.x schemas (read-only by default, audited writes opt-in), Drizzle tables (read-only)
  • Transports: stdio, Streamable HTTP, and runtime-agnostic Web Standard fetch handler (Cloudflare / Deno / Bun)
  • CLI: bridgent init, bridgent dev, bridgent serve, bridgent inspect with source/capability hints before the official MCP Inspector opens
  • Tool metadata: generated tools carry source kind, source reference, read/write capability, safety flags, and optional limits for host/CLI hints
  • Hosts verified by protocol-level harness: Claude Code, Cursor, Codex, Gemini CLI (any 1.x-compliant MCP client)

Roadmap: v0.4 targets local policy enforcement for generated tool surfaces. GraphQL, hosted control plane, and registry/distribution workflows remain later ecosystem directions.

Quick start

# Requires Node >= 22.18
pnpm add -D @bridgent/cli @bridgent/core zod
bridgent init ./server.ts
// Or write server.ts yourself:
import { createStdioServer, defineTool } from '@bridgent/core'
import { z } from 'zod'

await createStdioServer({
  name: 'hello',
  version: '0.0.1',
  tools: [
    defineTool({
      name: 'add',
      description: 'Add two numbers',
      inputSchema: z.object({ a: z.number(), b: z.number() }),
      run: ({ a, b }) => a + b,
    }),
  ],
})
bridgent dev ./server.ts

Hosts

Each IDE-agent has a one-paragraph copy-paste config in the docs:

Repo structure

apps/docs              VitePress site
packages/core          MCP runtime + Zod→tool wrapper
packages/cli           bridgent CLI
packages/source-trpc   tRPC router source adapter
examples/              Usage examples
docs/                  AI progress archive (development docs, not published)

The active planning source is docs/roadmap.md. Older proposal and plan files are historical context.

Development

pnpm install
pnpm turbo run build test typecheck lint

Required tool versions (engines-strict=true):

  • Node >= 22.18
  • pnpm >= 10

License

MIT

About

Bridgent — One line to expose any API / database / framework as an MCP server

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages