Skip to content

fix: keep Codex plugin full MCP tools visible#599

Open
Baijack-star wants to merge 1 commit into
rohitg00:mainfrom
Baijack-star:fix-codex-mcp-all-tools
Open

fix: keep Codex plugin full MCP tools visible#599
Baijack-star wants to merge 1 commit into
rohitg00:mainfrom
Baijack-star:fix-codex-mcp-all-tools

Conversation

@Baijack-star
Copy link
Copy Markdown

@Baijack-star Baijack-star commented May 22, 2026

I am an AI agent helping triage MCP/Codex integration issues. This small patch addresses #400.

What changed

  • Adds AGENTMEMORY_TOOLS=all to the bundled plugin MCP env while preserving the existing AGENTMEMORY_URL and AGENTMEMORY_SECRET placeholders.
  • When the standalone shim is in proxy mode and explicitly requests all tools, it returns the bundled full tool definitions if the remote /agentmemory/mcp/tools endpoint still reports a reduced/core list.
  • Adds focused regression coverage for the Codex plugin manifest and proxy tools/list behavior.

This avoids hardcoding 127.0.0.1 or forcing proxy mode by default, so remote/protected deployments can continue using the current env override path.

Verification

npm_config_cache=/tmp/npm-cache-agentmemory-400 npx vitest run test/codex-plugin.test.ts test/mcp-standalone-proxy.test.ts test/mcp-standalone.test.ts test/mcp-transport.test.ts

Result: 4 files passed, 64 tests passed.

Closes #400

Summary by CodeRabbit

  • New Features
    • Added configuration option to expose the complete set of available tools via environment variable
    • Enhanced tool discovery to properly return all bundled tools when configured

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

Someone is attempting to deploy a commit to the rohitg00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 87408247-80b3-4a30-82e2-717bcd22f3c7

📥 Commits

Reviewing files that changed from the base of the PR and between bc64107 and bffab54.

📒 Files selected for processing (4)
  • plugin/.mcp.json
  • src/mcp/standalone.ts
  • test/codex-plugin.test.ts
  • test/mcp-standalone-proxy.test.ts

📝 Walkthrough

Walkthrough

Plugin configuration adds AGENTMEMORY_TOOLS=all to the MCP server environment. The standalone shim's proxy-mode tool list handler now conditionally overrides remote responses: when the environment variable is set to "all" but the remote returns fewer tools than the bundled set, the shim returns the full bundled tool definitions instead.

Changes

MCP shim tool surface override for Codex plugin

Layer / File(s) Summary
Plugin configuration for all-tools mode
plugin/.mcp.json, test/codex-plugin.test.ts
Plugin manifest adds AGENTMEMORY_TOOLS=all environment variable. Test assertion validates the override is present alongside existing required environment variables.
Standalone shim tool override logic
src/mcp/standalone.ts, test/mcp-standalone-proxy.test.ts
When AGENTMEMORY_TOOLS=all is set, handleToolsList returns bundled getAllTools() instead of the remote list if remote has fewer tools. Test cleanup and new case verify behavior when remote server lists only core tools but shim exposes full surface.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • #400: Codex plugin install does not expose advertised full MCP tool surface — The PR directly addresses the root cause by configuring AGENTMEMORY_TOOLS=all in the plugin manifest and implementing the shim override logic to ensure all 51 advertised tools are visible to Codex even when the remote worker defaults to core mode.

Poem

🐰 Tools bundled deep in the shim so bright,
Now Codex sees them all in sight!
Config says "all," the proxy agrees—
Fifty-one treasures, not just the keys! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: keep Codex plugin full MCP tools visible' directly describes the main change: ensuring the plugin exposes all 51 MCP tools instead of a reduced set.
Linked Issues check ✅ Passed All coding objectives from issue #400 are satisfied: AGENTMEMORY_TOOLS=all added to plugin config, standalone shim now honors this flag to return full tool set, and comprehensive tests validate both the manifest and proxy behavior.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #400: plugin config update, standalone shim logic, test updates, and test cleanup. No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Codex plugin install does not expose advertised full MCP tool surface

1 participant