modelcontextprotocol/example-remote-server — reverse-engineered prompt
Reverse engineered prompt
Build me a complete example remote MCP server in TypeScript that I can run locally and use to learn the whole Model Context Protocol.
It should include working examples of tools, resources, prompts, sampling, elicitation, pagination, subscriptions, and both modern HTTP transport plus legacy SSE if that’s part of the protocol. I want OAuth 2.0 authentication included, with an easy local mode where auth runs in the same process, and another mode where the auth server runs separately so it looks more like a real deployment.
Please make it simple to start with npm, connect with MCP Inspector at a local URL, authenticate, and explore everything. Include environment configuration, a sample env file, Redis backed sessions as an optional Docker setup, and in memory sessions for the easy path. Add useful docs explaining how to run development mode, production mode, internal auth, external auth, and Redis.
Keep the code clean and educational, with tests, TypeScript build scripts, and comments where they help someone use this as a starting template.
Want more depth? Deep Reverse