mcp -playground
A playground for Model Context Protocol (MCP) server built with TypeScript and Streamable HTTP transport with an OAuth Proxy for 3rd party authorization servers like Auth0
claude mcp add --transport stdio chrisleekr-mcp-server-playground node dist/server.js \ --env PORT="3000" \ --env LOG_LEVEL="info" \ --env REDIS_URL="<redis-url>" \ --env OAUTH_DOMAIN="<your-auth0-domain>" \ --env SESSION_STORE="valkey|memory" \ --env AUTH0_AUDIENCE="<your-auth0-audience>" \ --env EVENTSTORE_URL="<eventstore-url>" \ --env ALLOWED_ORIGINS="<comma-separated-or-wildcards>" \ --env OAUTH_CLIENT_ID="<your-client-id>" \ --env OAUTH_CLIENT_SECRET="<your-client-secret>"
How to use
This MCP server playground provides a TypeScript-based implementation of a Model Context Protocol (MCP) server with a Streamable HTTP transport and an OAuth proxy. It exposes an HTTP-based MCP endpoint under /mcp and includes an OAuth authorization flow (via the /oauth endpoints) and dynamic client registration through an external authorization server. The server is designed to support SSE resumability, tool execution, and session replay for stateful deployments. Tools exposed in this playground include aws-ecs for inspecting ECS resources, aws-s3 for listing S3 buckets/objects, system-time for time formatting, echo for string transformations, streaming for real-time data simulation, and project for keyword searches within the project directory. You can test MCP requests against POST /mcp, terminate sessions with DELETE /mcp, and explore OAuth metadata at /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource. Use the inspector tooling described in the Getting Started section to validate MCP requests, or curl directly against the endpoints to observe behavior.
How to install
Prerequisites:
- Node.js installed (or Bun as the project package manager used in this repository)
- Git
- Access to a compatible OAuth provider (Auth0 or similar) for the proxy
Installation steps:
-
Clone the repository: git clone <repository-url> cd mcp-server-playground
-
Install dependencies (the repo uses Bun in the walkthrough, you can adapt to npm/yarn if preferred): bun install
-
Set up environment variables (copy the example and fill in values): cp .env.example .env
-
Build or prepare the server (if applicable in this project): bun run build # if there is a build step
-
Start the server in development mode: bun run dev:setup
or run the server directly if a start script exists via node
node dist/server.js
-
Optional: configure and run inspector or other tooling as described in the documentation: docker compose up -d bunx @modelcontextprotocol/inspector -y --config ./mcp-config.json --server mcp-server-playground-inspector
Additional notes
Notes and tips:
- The server relies on an OAuth proxy setup and external 3rd party authorization servers like Auth0 for token issuance and validation. Ensure your OAuth settings (domain, client ID, client secret, audience) are correctly configured in the .env file.
- SSE resumability is supported through an EventStore backend; ensure EventStore is reachable and properly configured to enable reconnect with Last-Event-ID.
- The storage layer is pluggable (Memory/Valkey) for session state. When running in a clustered deployment, distributed session state requires a shared store like Valkey.
- The endpoints expose MCP interactions and OAuth metadata. If you encounter issues with dynamic client registration, verify that the dynamic registration policy is allowed by your OAuth provider and that the proxy is correctly delegating authorization requests.
- Environment variables can be adjusted per deployment. Common variables include PORT, OAUTH_DOMAIN, OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, and EVENTSTORE_URL. Review .env.example for a full list and descriptions.
Related MCP Servers
mcp-graphql
Model Context Protocol server for GraphQL
anytype
An MCP server enabling AI assistants to interact with Anytype - your encrypted, local and collaborative wiki - to organize objects, lists, and more through natural language.
one-search
🚀 OneSearch MCP Server: Web Search & Scraper & Extract, Support agent-browser, SearXNG, Tavily, DuckDuckGo, Bing, etc.
kollektiv
Kollektiv MCP enables you to chat with and query your own documents directly from IDEs and MCP clients. Private, secure, and integrated into your favorite code editor
aica
aica(AI Code Analyzer) reviews your code using AI. Supports CLI and GitHub Actions.
claude -scheduler
Use Claude API to prompt remote agents on a cron interval but use local MCPs to handle tool calls for context