MCP Hub
Back to servers

MCP Server Templates

Provides production-grade starter templates for MCP servers with permission boundaries, integration tests, and eval contracts, enabling rapid development of secure and testable MCP servers.

glama
Updated
May 1, 2026

MCP Server Templates

Production-grade MCP server starter templates with permission boundaries, integration tests, and eval contracts.

Templates

TemplateDescriptionKey Features
basicMinimal MCP serverEcho + calculate tools, Zod validation
databaseRead-only database accessSQL validation, schema introspection, permission boundaries
api-gatewayExternal API proxyRate limiting, credential scoping, endpoint configuration

Quick Start

  1. Clone this repo or use "Use this template" on GitHub
  2. Navigate to the template you want: cd templates/basic
  3. Install dependencies: pnpm install
  4. Start the server: pnpm start

Architecture

Each template follows the same patterns:

  • Permission engine — Declarative rules (allow/deny) evaluated before every tool invocation
  • In-memory test client — Integration tests via MCP SDK's InMemoryTransport
  • Eval contracts — YAML eval specs compatible with @visystems/claude-eval-runner

Shared Utilities

The shared/ directory contains reusable utilities:

  • permissions/ — Permission policy types, engine, and PermissionDeniedError
  • testing/ — In-memory MCP test client for integration tests
  • errors/ — Typed error classes

Development

pnpm install
pnpm typecheck    # TypeScript type checking
pnpm test         # Run all tests
pnpm test:shared  # Run shared utility tests only
pnpm test:basic   # Run basic template tests only

License

Apache 2.0 — see LICENSE.

Reviews

No reviews yet

Sign in to write a review