Translate Python MCP Server to TypeScript with HTTP Transport Support #242
+4,746
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR translates the DocumentDB MCP Server from Python to TypeScript, creating a complete TypeScript implementation in the
./mcp_tsdirectory with support for both stdio and HTTP transports.Overview
The TypeScript MCP server provides the same functionality as the Python version while following TypeScript best practices and integrating with the Node.js ecosystem. The implementation uses the official
@modelcontextprotocol/sdkand MongoDB Node.js driver.Key Features
Complete Tool Set (25+ tools)
Transport Support
Architecture Highlights
@modelcontextprotocol/sdkfor protocol compliancemongodbNode.js driver replacing PyMongoImplementation Details
The server maintains the same tool interface as the Python version while providing enhanced TypeScript type safety and better integration with the existing codebase patterns.
Transport Configuration
stdio (Default)
streamable-http
When using HTTP transport, the server provides:
http://localhost:8070/mcpProject Structure
Dependencies Mapping
mcp@modelcontextprotocol/sdkpymongomongodb(official driver)uvicornexpress+ built-in HTTP serverhttpxfetch(built-in)The TypeScript implementation supports both stdio and HTTP transports as specified in the MCP SDK documentation.
Fixes #240.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.