tewariaman/agent-dynamic-js-mcp ? reverse-engineered prompt

Reverse engineered prompt

Build me a Node.js tool that can take almost any installed JavaScript library and turn it into a ready to use MCP server for AI agents.

I want it to inspect the library’s exports, figure out which ones are plain functions, classes, static methods, and instance methods, then generate a clean manifest I can review before any code is written. After that, it should generate a complete server project with the usual files, plus support for stateful builder style APIs so it can create instances, call methods on them, and dispose of them properly.

Please make the output safe and agent friendly, with good error handling and sensible serialization so weird objects don’t break everything. It would be great if it can use TypeScript type files when they exist, but still work without them.

Also add a simple CLI with commands to analyze, generate, build, and test the result, and include a demo using a small mock library so I can see the flow end to end. If you need to check current MCP docs online while building it, go ahead.