Skip to content

Conversation

@concertypin
Copy link

This pull request migrates the project from a Node.js/stdio-based MCP server to a modern, HTTP-based architecture using Hono, Vite, and Cloudflare Workers. It introduces a new API design, improves deployment and developer tooling, and updates documentation to reflect these changes.

Architecture & API Overhaul

  • Replaces the old index.js stdio-based MCP server with a new HTTP API powered by Hono and Cloudflare Workers, supporting Streamable HTTP and optional API key authentication via the PASSWORD environment variable. (src/index.ts [1] src/mcp.ts [2] src/schema.ts [3] index.js [4]
  • Adds schema validation for MDN API responses and improves the structure of tool outputs (including support for result limits and structured content). (src/mcp.ts [1] src/schema.ts [2]

Developer Tooling & Workflow

  • Introduces Vite and Cloudflare build/deployment tooling, including scripts for local development, preview, and deployment, as well as configuration for Prettier, lint-staged, and simple-git-hooks. (package.json [1] vite.config.ts [2] wrangler.jsonc [3] prettier.config.mts [4] lint-staged.config.mjs [5] .simple-git-hooks.mjs [6]
  • Adds .prettierignore and updates example environment variables. (.prettierignore [1] .dev.vars.example [2]

Documentation Updates

  • Updates the README.md to reflect the new HTTP-based API, Cloudflare deployment, usage examples, authentication, and configuration. Removes Docker instructions and stdio references. (README.md [1] [2] [3] [4] [5]
  • Provides a shell script (test_query.sh) for local testing of the new API. (test_query.sh test_query.shR1-R49)

Removed Legacy Code

  • Removes the old Dockerfile and Node.js stdio server implementation. (Dockerfile [1] index.js [2]

Summary of Most Important Changes

1. Migration to HTTP/Cloudflare Workers Architecture

  • Replaces the Node.js stdio MCP server with an HTTP server using Hono, deployable to Cloudflare Workers, and adds support for API key authentication. (src/index.ts [1] wrangler.jsonc [2] vite.config.ts [3] package.json [4]

2. Improved Tooling and Developer Experience

  • Adds scripts and configuration for Vite, Prettier, lint-staged, and simple-git-hooks, and updates package management to pnpm. (package.json [1] .simple-git-hooks.mjs [2] lint-staged.config.mjs [3] prettier.config.mts [4] .prettierignore [5]

3. Enhanced API Design and Validation

  • Implements schema validation for MDN search responses and tool outputs, supports limiting results, and returns structured content for better client integration. (src/mcp.ts [1] src/schema.ts [2]

4. Documentation Overhaul

  • Updates the README.md to describe the new HTTP API, deployment, authentication, and usage, and removes Docker/stdio instructions. (README.md [1] [2] [3] [4] [5]

5. Removal of Legacy Implementation

  • Deletes the old Dockerfile and the Node.js stdio-based server code. (Dockerfile [1] index.js [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant