Skip to content

refactor: consolidate Claude/Codex MCP runtime#15

Merged
benvinegar merged 3 commits intomainfrom
feat/mcp-common
Mar 9, 2026
Merged

refactor: consolidate Claude/Codex MCP runtime#15
benvinegar merged 3 commits intomainfrom
feat/mcp-common

Conversation

@benvinegar
Copy link
Member

Summary

  • consolidate shared Claude/Codex MCP runtime logic into common/mcp/glance-mcp.js
  • replace duplicated plugin server implementations with small wrappers
  • add sync tooling so package-local copies stay aligned with the shared source

What changed

Shared runtime source

  • added common/mcp/glance-mcp.js
    • exports createGlanceRuntime
    • exports createMcpServer
    • exports isMainModule(importMetaUrl, argvPath?)

Claude/Codex wrappers

  • claude/servers/glance-mcp.js now imports shared runtime and only handles process bootstrap
  • codex/servers/glance-mcp.js now imports shared runtime, keeps createCodexMcpServer, and keeps executable entrypoint behavior

Package-local synced copies

To keep standalone package publishing/install behavior intact, synced copies now exist at:

  • claude/common/mcp/glance-mcp.js
  • codex/common/mcp/glance-mcp.js

Sync/check tooling

  • added scripts/sync-mcp-common.mjs
  • root scripts:
    • npm run sync:mcp-common
    • npm run check:mcp-common
  • test and test:coverage now run sync-check first

Packaging updates

  • claude/package.json now includes common/mcp/glance-mcp.js in published files
  • codex/package.json now includes common/mcp/glance-mcp.js in published files

Validation

  • npm test
  • npm run test:coverage
  • npm exec -- tsc --noEmit
  • npm pack --dry-run in codex/ and claude/
  • local codex tarball smoke check (npx -p <tarball> glance-codex) stays running for MCP handshake

@benvinegar benvinegar merged commit a3d16b4 into main Mar 9, 2026
4 checks passed
@benvinegar benvinegar deleted the feat/mcp-common branch March 9, 2026 16:43
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