mcp-production-kit

mcp-production-kit

A production-ready MCP server template with OAuth 2.1, RBAC, and audit logging for building secure, observable tool servers.

Category
Visit Server

README

mcp-production-kit

Production-ready TypeScript MCP server template — OAuth 2.1, RBAC, audit logs.

CI

Most MCP server examples stop at "it works in the Inspector". Production needs the other 80%: who is calling, what are they allowed to do, and what did they actually do. This is a clone-and-adapt remote MCP server that ships that part:

  • Streamable HTTP transport via the official @modelcontextprotocol/sdk
  • OAuth 2.1 resource server — token validation (JWKS), protected-resource metadata, audience binding, per the current MCP authorization spec
  • Per-tool RBAC — deny-by-default scope map; read-only tools by default, write tools behind explicit scopes + confirmation payloads
  • Append-only audit logging — actor, tool, args hash, status, latency, trace id for every call; GDPR-aware (args hashed, PII redaction hooks)
  • Rate limiting, tests, evals — vitest + scripted MCP Inspector flows
  • EU-first deployment — Hetzner runbook (Fly.io alternative), Keycloak as the default self-hosted IdP

What this is not

Not a gateway, not a multi-tenant control plane, not a hosted service, not a tool marketplace. One server, one SaaS, done well.

Status

Early — M1 of the roadmap is done: the Streamable HTTP server runs, every tool call is audited (stdout JSON + Postgres sink), health endpoints and the Hetzner deploy path are in place. OAuth 2.1 + RBAC against a real IdP (M2) and the runnable example (M3) are next — until M2 lands, scopes come from the DEV_GRANTED_SCOPES dev-only escape hatch, so don't point this at production data yet.

Layout

src/server.ts        Streamable HTTP transport, session handling      (M1)
src/tools/           tool registry — zod schemas, task-oriented tools
src/auth/            OAuth 2.1 resource server                        (M2)
src/rbac/            per-tool scope map, deny-by-default
src/audit/           structured audit middleware, append-only sink
src/rate-limit/      per-client + per-tool limits                     (M3)
src/observability/   OpenTelemetry, health endpoints                  (M1)
adapters/            IdP adapters: Keycloak (default), Auth0, WorkOS
example/             Supabase demo SaaS, 5 tools                      (M3)
test/                vitest + MCP Inspector scripts + tool evals
deploy/              Dockerfile, compose, Hetzner runbook             (M1)
docs/                tool-design guide, adaptation guide, SECURITY.md

Development

Node ≥ 22, pnpm.

pnpm install
pnpm lint && pnpm test && pnpm build

Design principles live in docs/tool-design.md — start there before adding tools.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured