GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcpx: honour ?codemode=false on /mcp — expose raw tools (PLG-35 of #1940) by dezren39 · Pull Request #2992 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Implements PLG-35 of #1940 (queue task 3240): the daemon's /mcp endpoint honours ?codemode=false by exposing the raw upstream tools surface instead of the code-mode surface. Absence of the parameter — and any value other than exactly false — changes nothing. This does not close #1940: CODE-53 (docs) and PLG-38 (plugin abort) remain open slices on the issue.

What

  • internal/mcpserver/codemode.go (new): the switch is read once in ServeHTTP from the request URL and rides the request context. That request's tools/list is every upstream tool, flat, under <namespace>_<tool> (the registry's existing Native spelling); the gateway's own tools are absent from that surface, and tools/call for a raw name routes to its owning upstream under the upstream's own name via Backend.Call. Gateway tools called through the raw surface are refused (-32602, via the surface check).
  • New optional backend interface mcpserver.RawToolsBackend; collisions that join to the same exposed name are refused rather than silently resolved (same rule as pass-through), and a backend/upstream that cannot be listed is an error (-32603), never a partial catalogue.
  • internal/cli/serve.go: mcpBackend.RawTools lists each visible namespace through the same UpstreamTools pass-through mode uses.
  • Capabilities: the raw list varies like the pass-through list, so tools.listChanged follows it on a codemode=false request.
  • Docs: docs/mcp.md gains the per-connection raw surface; register row PLG-35 updated to "honours, does not send" with a dated detail note (mcpx as a client sending the parameter remains open and is recorded there).

Tests

New HTTP-level tests in internal/mcpserver/codemode_test.go (the switch lives on the URL, so they go through ServeHTTP):

  • raw list is exactly the namespaced upstream tools, sorted, with no gateway tools
  • absent / true / 1 / FALSE values keep the gateway surface
  • a raw call reaches the right upstream under its own name
  • mcpx_exec through the raw surface is -32602
  • unlistable backend and down upstream are -32603, not an empty list

Verified on the laptop: go test ./internal/mcpserver/ pass, go test ./internal/cli/ pass, go vet clean, gofmt clean.

Refs #1940


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dezren39
mcpx: honour ?codemode=false on /mcp — expose raw tools (PLG-35 of #1940
213d743
)

ServeHTTP reads codemode=false from the request URL; that request gets the raw surface instead of the code-mode surface: every upstream tool flat under <namespace>_<tool>, gateway tools absent, tools/call routed to the owning upstream under its own name. New mcpserver.RawToolsBackend, implemented by the CLI backend over the visible namespaces (UpstreamTools per namespace); an unlistable namespace fails the whole list rather than serving a partial catalogue. Absence and any other value change nothing.

Tests: 5 new HTTP-level cases in internal/mcpserver/codemode_test.go (raw list, unchanged default/other values, call routing, gateway tools refused -32602, unlistable backend/upstream = -32603). go test ./internal/mcpserver/ and ./internal/cli/ pass on the laptop; go vet clean.
@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 08:22
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd6c0687-63e0-495e-bf97-1ca67b138ea2
Commits

Reviewing files that changed from the base of the PR and between c1b9052 and a71c550.

Files selected for processing: 14
  • pkgs/mcpx/docs/compare/register/plugin-apis.md
  • pkgs/mcpx/docs/mcp.md
  • pkgs/mcpx/internal/cli/serve.go
  • pkgs/mcpx/internal/cli/serve_ask.go
  • pkgs/mcpx/internal/cli/serve_ask_raw_test.go
  • pkgs/mcpx/internal/mcpserver/ask.go
  • pkgs/mcpx/internal/mcpserver/codemode.go
  • pkgs/mcpx/internal/mcpserver/codemode_test.go
  • pkgs/mcpx/internal/mcpserver/export_test.go
  • pkgs/mcpx/internal/mcpserver/listen.go
  • pkgs/mcpx/internal/mcpserver/passthrough.go
  • pkgs/mcpx/internal/mcpserver/server.go
  • pkgs/mcpx/internal/mcpserver/tasks.go
  • pkgs/mcpx/internal/mcpserver/transport.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T10:49:19.761381Z a71c550 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39

dezren39 commented Oct 31, 2026

Copy link
Copy Markdown
Member Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 31, 2026
mcpx and opencode code mode: nested code mode, ?codemode=false, and what a harness expects of mcpx_exec #1940
Closed
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 31, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 213d74349d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/mcpserver/server.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/mcpserver/server.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/mcpserver/server.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
mcpx: carry the raw (codemode=false) surface through tasks, the ask b…
a05c6e6
…ridge, and list-changed delivery

Codex review round on #2992, three P2 threads:

- Tasks: runInner now takes the request context and re-applies its
  raw-surface selection to the task body context. The task store runs
  the body on a fresh background context, so the inner tools/call was
  judged against the gateway surface and a validated raw name was
  refused with -32602.
- Ask bridge: daemonAsker.Begin resolves raw names through the new
  mcpserver.RawToolOf (the request raw lookup, mirroring PassToolOf)
  to namespace + the upstream own tool name, with client capabilities
  relayed as on the pass-through path. Raw names previously fell to
  ErrNotInterruptible and ran with no ask attribution.
- Notifications: one predicate, toolsListChangedFor, now decides
  tools.listChanged in capabilities(), the subscriptions/listen
  agreement, and the legacy notifier stream. The latter two used only
  toolsVary(), so a raw request was advertised listChanged:true but
  never delivered a tools/list_changed.

Regression tests cover each fix and were verified to fail pre-fix.
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 31, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a05c6e6195

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/mcpserver/codemode.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/mcpserver/server.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/mcpx/internal/mcpserver/server.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
mcpx: treat raw (codemode=false) calls as direct upstream calls for t…
cbf364f
…asks, capabilities, and protocol errors

Round-2 Codex review on #2992 (PLG-35 of #1940):
- taskSupportOf/legacyTaskSupport now consult the request raw tool definitions, so a raw tool execution.taskSupport is honoured (required -> -32021 without the tasks extension; legacy task-augmented calls follow the declaration instead of always -32601).
- mcpBackend.Call forwards DeclaredCapabilities for raw calls (isRawCall via RawToolOf), not only pass-through namespaces, so upstreams narrow by what the caller can answer.
- The same direct treatment applies to relayedFault in mcpBackend.Call and to passCall in the ask bridge, so upstream JSON-RPC errors (incl. -32021 with its data) relay as errors instead of flattening into isError results.

Tests: TestCodemodeFalseRequiredRawToolWithoutTheExtensionIsMissingCapability, TestCodemodeFalseLegacyTaskAugmentedRawCalls, TestCodemodeFalseAskBridgeRelaysUpstreamProtocolErrors; full mcpserver+cli suites pass on laptop.
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 31, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cbf364f4c7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/cli/serve_ask.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned dezren39 Oct 31, 2026
@dezren39
mcpx ask bridge: resolve raw calls before decoding gateway arguments (#…
a71c550
…1940, Codex PR #2992 round 3)
@dezren39

dezren39 commented Oct 31, 2026

Copy link
Copy Markdown
Member Author

@codex review

Round-3 finding fixed in a71c550 (raw resolution before gateway argument decoding, with regression test). Please re-review the new head.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: a71c550b68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 37df0a6 into main Oct 31, 2026
14 of 18 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/3240-1940-codemode-false branch October 31, 2026 15:42
@developing-today developing-today Bot mentioned this pull request Nov 8, 2026
mcpx docs: show the codemode:false opt-out for opencode users and correct the stale v2 caveat (CODE-53 of #1940) #7075
Closed
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 26, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

mcpx and opencode code mode: nested code mode, ?codemode=false, and what a harness expects of mcpx_exec

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.