Skip to content

Support MCP 2026-07-28 stateless serving - #56

Open
benmarks wants to merge 4 commits into
developfrom
feat/mcp-2026-07-28
Open

benmarks wants to merge 4 commits into
developfrom
feat/mcp-2026-07-28

Conversation

@benmarks

@benmarks benmarks commented Sep 3, 2026

Copy link
Copy Markdown
Member

Upgrades the COF onX reference server to MCP 2026-07-28 serving semantics.

What changed

  • Migrates to MCP SDK v2 packages
  • Adds transport-neutral onX MCP server factory
  • Serves MCP 2026-07-28 at /mcp
  • Uses stateless HTTP exchanges with no Mcp-Session-Id requirement
  • Migrates stdio to serveStdio()
  • Preserves /health and /api/tools/* for Juniper compatibility
  • Adds MCP 2026-07-28 protocol and transport integration tests

Validation

  • npm run typecheck: PASS
  • npm test: PASS
  • 19 test files
  • 231 tests

Deliberately out of scope

  • OAuth / authorization hardening
  • Juniper migration from REST to /mcp
  • npm audit remediation

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

HTTP custom-adapter configuration, public type compatibility, and Node runtime documentation need correction.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Migrates the onX reference server to MCP 2026-07-28 with SDK v2 and stateless HTTP serving.

Changes:

  • Adds transport-neutral MCP runtime and /mcp HTTP endpoint.
  • Migrates stdio and protocol error handling to SDK v2.
  • Adds modern protocol integration tests and migration guidance.
File Description
MCP_2026_07_28_MIGRATION.md Documents migration architecture and acceptance criteria.
server/​package.json Adds SDK v2 packages and requires Node 20.
server/​package-lock.json Locks new SDK dependencies.
server/​src/​errors/​error-adapter.ts Migrates error mapping to v2 types.
server/​src/​errors/​index.ts Migrates custom protocol errors.
server/​src/​http-server.ts Adds stateless /mcp serving.
server/​src/​index.ts Exports the new runtime factory.
server/​src/​server.ts Introduces shared runtime and v2 stdio serving.
server/​src/​types/​mcp.ts Migrates MCP type aliases.
server/​tests/​helpers/​test-client.ts Adds modern protocol test support.
server/​tests/​integration/​mcp-http.test.ts Tests stateless HTTP behavior.
server/​tests/​integration/​server.test.ts Tests modern stdio discovery.
Files not reviewed (1)
  • server/package-lock.json: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread server/src/http-server.ts
Comment on lines +82 to +84
package: process.env.ADAPTER_PACKAGE ?? config.adapter.package,
path: process.env.ADAPTER_PATH ?? config.adapter.path,
options: config.adapter.options,
Comment thread server/src/types/mcp.ts
Comment on lines +21 to +22
ProtocolError as McpError,
ProtocolErrorCode
Comment thread server/package.json
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.0.0"
@joshfischer-cin7

Copy link
Copy Markdown

@ajithkuriakose - Can you read over this update. Once you sign-off, we can merge.

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.

3 participants