Skip to content

vaur94/mcpbase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

mcpbase

English | Turkce

@vaur94/mcpbase is an ESM-only TypeScript library for building MCP servers with a stdio-first runtime, optional Streamable HTTP transport, capability helpers, security guards, telemetry, and hub-oriented utilities.

What it provides

  • Generic runtime primitives such as bootstrap, ApplicationRuntime, ToolRegistry, and loadConfig
  • MCP capability helpers for resources, prompts, logging, sampling, and roots
  • Security helpers including assertFeatureEnabled, assertAllowedPath, assertAllowedCommand, and createSecurityEnforcementHook
  • Optional in-memory telemetry via createInMemoryTelemetry
  • Subpath exports for @vaur94/mcpbase/examples, @vaur94/mcpbase/security, and @vaur94/mcpbase/hub

Installation

Requirements:

  • Node.js >=22.14.0
  • npm >=10.0.0
npm install @vaur94/mcpbase
npm install zod @modelcontextprotocol/sdk

Quick start

import { bootstrap } from '@vaur94/mcpbase';
import { z } from 'zod';

await bootstrap({
  tools: [
    {
      name: 'greet',
      title: 'Greet',
      description: 'Return a greeting',
      inputSchema: z.object({ name: z.string() }),
      async execute({ name }) {
        return {
          content: [{ type: 'text', text: `Hello, ${name}!` }],
        };
      },
    },
  ],
});

Project development

Use the repository setup flow when working on mcpbase itself:

./scripts/install.sh

Manual equivalent:

npm install
npm run build
node dist/index.js --config examples/mcpbase.config.json

Core commands

npm run build
npm run typecheck
npm run test
npm run test:protocol
npm run ci:check

Documentation

Contributing and support

License

MIT. See LICENSE.

Last updated: 2026-03-11

About

stdio-first MCP sunucu referans deposu / stdio-first reference repository for future MCP servers

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages