Skip to content

feat(mcp): component_mcp core tools (Phase 5) - #262

Open
askdba wants to merge 1 commit into
mainfrom
feat/mcp-core-tools
Open

askdba wants to merge 1 commit into
mainfrom
feat/mcp-core-tools

Conversation

@askdba

@askdba askdba commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Phase 5 item from #256: the core tools for the MVP (RFC 0001 §3 lists them as list_databases, list_tables, describe_table, run_query, ping, server_info).

Change

The endpoint had list_databases and run_query. This PR adds four tools, using mysql-mcp-server's names and argument names:

Tool Arguments Runs
list_tables database CALL mysql_mcp.list_tables(...)
describe_table database, table CALL mysql_mcp.describe_table(...)
ping none SELECT 1, then replies {"success","latency_ms","message"}. As in Go, a failure is a result with success: false, not a tool error
server_info none one SELECT of version, engine, version comment, current user and database, character set, collation and max_connections, returned as one object
  • Tool-pack arguments are passed as hex literals (CONVERT(X'…' USING utf8mb4)). They're never parsed as SQL and need no escaping under any sql_mode, NO_BACKSLASH_ESCAPES included.
  • run_query now reads its argument with its length, so a NUL no longer truncates it.
  • server_info doesn't port the Go server's extra fields (uptime, health snapshot, guard settings). The docs say so.

Tests

scripts/test-mcp-endpoint.sh on mysql:26.10.0: 37 passed, 0 failed. New checks:

  • tools/list returns the six tools in order;
  • each new tool works;
  • server_info reports the mapped account and 26.10;
  • argument errors are tool errors;
  • a table name containing \\, ', ) and ; SELECT 1; -- stays a literal (empty result, no error).

Docs: Tools section, CHANGELOG.

Independent of #257–#261.

Part of #256.

🤖 Generated with Claude Code

…g, server_info)

The MVP's core tool set (RFC 0001 §3/§9), with mysql-mcp-server's names
and arguments:
- list_tables(database) and describe_table(database, table) call the
  mysql_mcp tool pack; arguments are hex literals converted to utf8mb4,
  so they are never parsed as SQL and need no escaping in any sql_mode.
- ping: SELECT 1 with the round-trip time; a failure is a result with
  success false, as in the Go server.
- server_info: version, engine, version comment, current user and
  database, character set, collation, max_connections, as one object.
run_query reads its argument with its length (no truncation at NUL).

test-mcp-endpoint.sh: tools/list order, each tool, argument errors, and a
table name with quotes and backslashes staying literal. 37 checks.

Part of #256 (RFC 0001 Phase 5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

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-11-02T10:12:21.044785Z 057cbff PR opened
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026

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 43 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: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e8591ca2-067f-49fd-9d0a-2ca72a082bcb
Commits

Reviewing files that changed from the base of the PR and between ff59fea and 057cbff.

Files selected for processing: 4
  • CHANGELOG.md
  • docs/MCP_COMPONENTS.md
  • scripts/test-mcp-endpoint.sh
  • src/mcp/endpoint/component_mcp.cc
  • 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

This branch has not been deployed

No deployments
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