Skip to content

fix: use @modelcontextprotocol/sdk for blind-fill MCP server#85

Merged
matthiastjong merged 1 commit into
mainfrom
fix/blind-fill-mcp-sdk
May 17, 2026
Merged

fix: use @modelcontextprotocol/sdk for blind-fill MCP server#85
matthiastjong merged 1 commit into
mainfrom
fix/blind-fill-mcp-sdk

Conversation

@matthiastjong
Copy link
Copy Markdown
Owner

Summary

  • Rewrites blind-fill.mjs to use McpServer + StdioServerTransport from @modelcontextprotocol/sdk instead of manual Content-Length framing, which Claude Code (v2.1.92+) cannot connect to
  • Adds esbuild bundling (npm run build:blind-fill) to produce a self-contained blind-fill.bundle.mjs with all dependencies (SDK, zod, ws) inlined
  • Updates Dockerfile to run the bundle step before the main build, and serve endpoint to serve the bundled file

Context

Claude Code stays stuck on "pending" status when connecting to MCP servers that use handmatige Content-Length framing. All working MCP servers (playwright, filesystem, etc.) use the official @modelcontextprotocol/sdk StdioServerTransport. The tool logic (CDP connection, vault secret fetching, DOM injection, origin validation) is unchanged.

Test plan

  • Run npm run build:blind-fill — produces src/local-mcp/blind-fill.bundle.mjs
  • Start dev server, GET /api/local-mcp/blind-fill returns the bundled script
  • Configure blind-fill as MCP server in Claude Code — status should be "connected" (not "pending")
  • Test blind_fill and blind_type tools with a vault secret and browser target
  • Docker build succeeds with the new bundle step

🤖 Generated with Claude Code

Claude Code cannot connect to MCP servers using manual Content-Length
framing — they stay stuck on "pending" status. Rewrite blind-fill to
use McpServer + StdioServerTransport from @modelcontextprotocol/sdk
and bundle with esbuild into a self-contained .mjs file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matthiastjong matthiastjong merged commit 557ac2c into main May 17, 2026
3 checks passed
matthiastjong pushed a commit that referenced this pull request May 17, 2026
…sdk"

This reverts commit 557ac2c, reversing
changes made to 02d80b0.
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