mcp-server-boilerplate

chrisleekr/mcp-server-boilerplate

3.3

If you are the rightful owner of mcp-server-boilerplate and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP Server Boilerplate is a comprehensive framework for building Model Context Protocol servers with OAuth integration, designed to facilitate secure and scalable client-server interactions.

The MCP Server Boilerplate is a robust framework designed to implement a Model Context Protocol (MCP) server using TypeScript and Streamable HTTP transport. It integrates OAuth Proxy for third-party authorization servers like Auth0, enabling secure and scalable client-server interactions. The boilerplate supports Dynamic Application Registration, allowing MCP clients to automatically register with new servers and obtain OAuth client IDs without user interaction. This feature is crucial for scalability and security, as it prevents the need for manual registration and the sharing of OAuth client IDs and secrets. The project addresses the security risks associated with Dynamic Application Registration by delegating authorization to third-party servers, thus preventing abuse such as unwanted client registrations. The boilerplate includes built-in sample tools for demonstration purposes and provides endpoints for various OAuth and MCP operations, making it a comprehensive solution for developers looking to implement MCP servers with OAuth capabilities.

Features

  • HTTP-Based Streamable transport using @modelcontextprotocol/sdk
  • OAuth authentication with third-party authorization servers
  • Dynamic Application Registration for MCP clients
  • Built-in sample tools for demonstration
  • Comprehensive endpoint support for OAuth and MCP operations

Usages

usage with cursor

{
  "mcpServers": {
    "mcp-server-boilerplate-cursor": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

usage with inspector

bash
npx @modelcontextprotocol/inspector -y --config ./mcp-config.json --server mcp-server-boilerplate-cursor

Tools

  1. echo

    A tool for echoing back input data.

  2. system-time

    A tool for retrieving the current system time.

  3. project

    A tool for managing project-related tasks.