Back to Home
chrisleekr icon

mcp-server-playground

Verified Safe

by chrisleekr

Overview

A playground and reference implementation for a Model Context Protocol (MCP) server, featuring streamable HTTP transport, OAuth proxy for third-party authorization servers like Auth0, and stateful session management.

Installation

Run Command
npm run docker:run

Environment Variables

  • MCP_CONFIG_TOOLS_PROJECT_PATH
  • MCP_CONFIG_SERVER_AUTH_ENABLED
  • MCP_CONFIG_SERVER_AUTH_JWTSECRET
  • MCP_CONFIG_SERVER_AUTH_AUTH0_DOMAIN
  • MCP_CONFIG_SERVER_AUTH_AUTH0_CLIENTID
  • MCP_CONFIG_SERVER_AUTH_AUTH0_CLIENTSECRET
  • MCP_CONFIG_SERVER_AUTH_AUTH0_AUDIENCE
  • MCP_CONFIG_SERVER_AUTH_AUTH0_SCOPE
  • MCP_CONFIG_TOOLS_AWS_REGION
  • MCP_CONFIG_TOOLS_AWS_PROFILE
  • MCP_CONFIG_TOOLS_AWS_CREDENTIALS_ACCESSKEYID
  • MCP_CONFIG_TOOLS_AWS_CREDENTIALS_SECRETACCESSKEY
  • MCP_CONFIG_TOOLS_AWS_BEDROCK_REGION
  • MCP_CONFIG_TOOLS_AWS_BEDROCK_PROFILE
  • MCP_CONFIG_TOOLS_AWS_BEDROCK_CREDENTIALS_ACCESSKEYID
  • MCP_CONFIG_TOOLS_AWS_BEDROCK_CREDENTIALS_SECRETACCESSKEY
  • MCP_CONFIG_TOOLS_AWS_BEDROCK_MODEL
  • MCP_LOG_LEVEL

Security Notes

The server uses standard security practices for Express applications, including `helmet` for security headers and `express-rate-limit` for rate limiting. Input validation is rigorously enforced using Zod schemas for all tool and API inputs, significantly reducing injection risks. Secrets such as JWT keys and Auth0 credentials are designed to be loaded from environment variables, preventing hardcoding. The OAuth proxy implementation addresses the security concerns of dynamic client registration by delegating authorization to a third-party provider (Auth0) while managing local client registration and token flows using PKCE. The CORS header `Access-Control-Allow-Origin: *` is broadly permissive, which is acceptable for a 'playground' but would typically be narrowed in a production environment. The integration with AWS Bedrock for the `aws-ecs` tool has a maximum output token limit, and the prompt construction relies on stringifying internal data, reducing direct injection risk into the LLM prompt itself.

Similar Servers

Stats

Interest Score25
Security Score8
Cost ClassMedium
Avg Tokens2000
Stars7
Forks0
Last Update2025-12-31

Tags

MCP ServerTypeScriptOAuth ProxyAWSSession Management