Skip to content

test(cli): add MCP client config regression coverage - #37

Merged
marmar9615-cloud merged 1 commit into
mainfrom
test/mcp-client-config-examples
Apr 28, 2026
Merged

test(cli): add MCP client config regression coverage#37
marmar9615-cloud merged 1 commit into
mainfrom
test/mcp-client-config-examples

Conversation

@marmar9615-cloud

Copy link
Copy Markdown
Owner

Summary

Adds regression coverage for MCP client configuration examples after the v0.4.0 HTTP transport release.

  • Adds a CLI test file that validates checked-in Codex TOML, Claude Desktop JSON, Cursor/generic JSON, and HTTP config snippets.
  • Adds npm run validate:mcp-config-examples to exercise the built CLI mcp-config output against the checked-in examples.
  • Polishes example docs so the stdio/default and opt-in HTTP guidance matches v0.4.0.

Context

Parallel safety

This PR does not touch SDK signing paths, core signing paths, manifest spec files, signed-manifest design docs, or MCP runtime files. It is examples/docs/test coverage around existing MCP client configuration shapes only.

Files added

  • packages/cli/src/tests/mcp-config-examples.test.ts
  • scripts/validate-mcp-config-examples.mjs

Files modified

  • CHANGELOG.md
  • examples/README.md
  • examples/http-client-config/README.md
  • examples/mcp-client-config/README.md
  • package.json
  • packages/cli/README.md

Config formats covered

  • Codex config.toml blocks and checked-in TOML files
  • Claude Desktop JSON
  • Cursor/generic MCP JSON
  • Generic Streamable HTTP MCP JSON
  • Built agentbridge mcp-config output

Validation

  • npx vitest run packages/cli/src/tests — passed, 3 files / 32 tests
  • npm run typecheck:clean — passed
  • npm test — passed, 21 files / 302 tests
  • npm run build — passed
  • npm run pack:dry-run — passed, all packages OK
  • npm run validate:mcp-config-examples — passed
  • npm run validate:examples — passed
  • node packages/cli/dist/bin.js mcp-config — passed; includes stdio and HTTP blocks with placeholder auth only

Safety confirmations

  • No SDK/core signing paths touched.
  • No MCP runtime files touched.
  • No package versions changed.
  • No npm publish, git tag, or GitHub release was created.
  • Dependabot PRs were untouched.
  • No signed-manifest APIs or HTTP runtime behavior were implemented.

@marmar9615-cloud
marmar9615-cloud merged commit dc215d0 into main Apr 28, 2026
2 checks passed

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

Copy link
Copy Markdown

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: 7053b27c33

ℹ️ 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".

assert(markdownJsonBlocks.length >= 3, "expected JSON snippets in MCP config examples");
const parsedMarkdownConfigs = markdownJsonBlocks.map((block) => JSON.parse(block));
assert(
parsedMarkdownConfigs.some((config) => getAgentbridgeServer(config).command === "npx"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Filter non-config JSON blocks before MCP assertions

This validation treats every fenced json block in examples/mcp-client-config/README.md and examples/http-client-config/README.md as an MCP server config, so adding any unrelated JSON example (for instance a JSON-RPC payload) will make getAgentbridgeServer(...) throw and fail the check even though the MCP config snippets are still correct. That makes the regression gate brittle and can block doc updates unrelated to client config; parse the blocks, then only apply MCP-specific assertions to objects that actually contain mcpServers.agentbridge.

Useful? React with 👍 / 👎.

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