Skip to content

MCP: Improve documentation#407

Merged
amotl merged 2 commits intomainfrom
mcp-iteration-2
Apr 14, 2025
Merged

MCP: Improve documentation#407
amotl merged 2 commits intomainfrom
mcp-iteration-2

Conversation

@amotl
Copy link
Copy Markdown
Member

@amotl amotl commented Apr 14, 2025

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This set of changes updates both code and documentation related to MCP (Model Context Protocol) servers for PostgreSQL and CrateDB. In the codebase, the McpServer dataclass is extended with new fields for usage examples and issue tracking, and its output formatting is enhanced. The MCP server registry is updated to include these new fields, providing concrete usage examples and relevant issue links for various servers. Documentation is reorganized and expanded: new tutorial and server overview pages are added, existing descriptions are clarified, and usage examples are incorporated throughout. Several documents are retitled or restructured for clarity and modern presentation.

Changes

File(s) Change Summary
cratedb_toolkit/query/mcp/inquiry.py Updated McpServerInquiry class: changed title to "MCP server landscape for PostgreSQL and CrateDB" and revised text to a shorter, more focused description.
cratedb_toolkit/query/mcp/model.py Extended McpServer dataclass with new optional fields: example (string) and issues (list of strings). Updated to_dict and to_markdown methods to include and format these new fields, using indented shell code blocks for clarity.
cratedb_toolkit/query/mcp/registry.py Added example and issues attributes to several MCP server entries; updated command lines and installation instructions; added or clarified usage examples; updated git commit hash for pg_mcp.
doc/conf.py Updated copyright year from "2023-2024" to "2022-2025".
doc/query/index.md Broadened the scope of Query Utilities documentation to include adapters and querying the database; removed infancy note; adjusted formatting.
doc/query/mcp/backlog.md Reorganized and expanded backlog: added documentation tasks, issue lists, validation notes, and moved completed items to a new "Done" section.
doc/query/mcp/index.md Renamed and restructured introduction; clarified language; replaced usage examples with grid-style links; added development resources; updated toctree; pruned some references.
doc/query/mcp/landscape.md Retitled document; revised introduction; added/updated usage examples for several MCP servers; updated tool descriptions and version references; expanded prompt and resource template documentation.
doc/query/mcp/research.md Retitled sections and document; no content changes to URLs.
doc/query/mcp/sandbox.md New tutorial document: walkthrough for using CrateDB with MCP servers, including prerequisites, installation, usage examples, and references to related documentation and tools.
doc/query/mcp/server.md New documentation: overview of MCP servers for PostgreSQL and CrateDB, installation/configuration instructions, sample config snippets, and relevant external links.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Documentation
    participant MCP Server Registry
    participant MCP Server

    User->>Documentation: Reads about MCP servers and usage examples
    Documentation->>MCP Server Registry: References registry for server details
    MCP Server Registry->>MCP Server: Provides example commands and issue links
    User->>MCP Server: Executes example commands (e.g., via CLI)
    MCP Server->>User: Returns query results or output
Loading

Possibly related PRs

  • MCP: Improve documentation #407: Updates McpServerInquiry title and text attributes, extends McpServer dataclass with example and issues fields, and enhances MCP server registry entries with usage examples and issue links; closely related to this PR’s metadata and documentation improvements.

Poem

In the garden of code, new fields have grown,
With examples and issues now clearly shown.
Docs sparkle with guides, both fresh and bright,
Helping explorers set queries right.
Servers line up, their stories retold—
A toolkit expanded, a landscape of gold!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04ddcac and ebee8dc.

📒 Files selected for processing (10)
  • cratedb_toolkit/query/mcp/inquiry.py (1 hunks)
  • cratedb_toolkit/query/mcp/registry.py (7 hunks)
  • doc/conf.py (1 hunks)
  • doc/query/index.md (1 hunks)
  • doc/query/mcp/backlog.md (1 hunks)
  • doc/query/mcp/index.md (1 hunks)
  • doc/query/mcp/landscape.md (11 hunks)
  • doc/query/mcp/research.md (1 hunks)
  • doc/query/mcp/sandbox.md (1 hunks)
  • doc/query/mcp/server.md (1 hunks)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@amotl amotl changed the title MCP: Iteration +1.1 MCP: Improve documentation Apr 14, 2025
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (20)
doc/query/mcp/research.md (1)

5-7: Consider formatting bare URLs.

The static analysis tool flags the bare URLs in this section. Consider converting them to proper Markdown links for better readability and accessibility.

-https://mcp.so/
-https://mcphub.tools/
-https://smithery.ai/
+[MCP.so](https://mcp.so/)
+[MCP Hub](https://mcphub.tools/)
+[Smithery AI](https://smithery.ai/)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

5-5: Bare URL used
null

(MD034, no-bare-urls)


6-6: Bare URL used
null

(MD034, no-bare-urls)


7-7: Bare URL used
null

(MD034, no-bare-urls)

doc/query/mcp/backlog.md (2)

4-10: Improve Link Formatting for Issue and Documentation References
The new backlog entries are clear; however, the issue links on lines 7–9 are bare URLs. To comply with MD034 guidelines and enhance readability, consider converting these URLs into proper Markdown link references (or using reference-style links).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

7-7: Bare URL used
null

(MD034, no-bare-urls)


8-8: Bare URL used
null

(MD034, no-bare-urls)


9-9: Bare URL used
null

(MD034, no-bare-urls)


14-16: Clarify the mcptools Recommendation in the 'Done' Section
In the "Done" section, the note "=> Better use mcptools" might benefit from rephrasing for clarity. For example, you could write, "It is recommended to use mcptools for launching the server" to clearly communicate the suggestion.

cratedb_toolkit/query/mcp/inquiry.py (1)

29-33: Refine the Updated Title and Description for Clarity
The new title and description provide a concise overview. As a minor style suggestion, consider replacing "talk to" with "connect to" in the description for a more formal tone (e.g., "focusing on the most popular ones that connect to both PostgreSQL and CrateDB databases").

doc/query/mcp/server.md (4)

3-6: Refine Language in the Overview Section
The overview clearly lists the MCP servers. For a slightly more formal tone, consider changing "that can talk to both PostgreSQL and CrateDB" to "that can connect to both PostgreSQL and CrateDB."


14-19: Enhance the 'See Also' Section Format
The "seealso" block effectively provides additional resources. You might consider reformatting or rephrasing the call-to-action text for even clearer differentiation from the main content, reinforcing how users can explore further MCP API capabilities.


23-26: Improve Wording in the Installation Instructions
The sentence "Please make sure it is installed on the machine where you are invoking the MCP server" could be more formally phrased. Consider replacing "make sure" with "ensure" to strengthen the instruction.

🧰 Tools
🪛 LanguageTool

[style] ~24-~24: Consider using a different verb to strengthen your wording.
Context: ...tten in Python across the board. Please make sure it is installed on the machine where yo...

(MAKE_SURE_ENSURE)


69-78: Verify Link Reference Formatting Consistency
The link references at the bottom (lines 69–78) are essential for easy navigation. Verify that these links follow a consistent style throughout the document. If needed, consider moving them to a dedicated references section to further improve clarity and compliance with Markdown best practices.

doc/query/mcp/index.md (3)

9-11: Clarify Communication Methods Between MCP Clients and Servers
The description of clients invoking servers via subprocess with Standard Input/Output (stdio) or Server-Sent Events (SSE) is informative. For added clarity, consider explicitly grouping the methods (for example, "either by invoking as a subprocess with stdio communication or by using SSE").


15-18: Refine Sentence Structure in the 'What's Inside' Section
The sentence on lines 15–18 currently reads:
"The focus is on MCP servers for [CrateDB], mostly by using relevant PostgreSQL adapter implementations provided by the MCP ecosystem, because CrateDB is compatible with PostgreSQL."
To improve clarity and flow, consider rephrasing to remove or reposition the comma before "because". For example:
"The focus is on MCP servers for [CrateDB] that predominantly use PostgreSQL adapter implementations from the MCP ecosystem because CrateDB is compatible with PostgreSQL."

🧰 Tools
🪛 LanguageTool

[formatting] ~16-~16: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...mentations provided by the MCP ecosystem, because CrateDB is compatible with PostgreSQL. ...

(COMMA_BEFORE_BECAUSE)


94-108: Verify External Link References
Please review the external link references to ensure that all URLs (e.g., [CrateDB], [MCP], etc.) are current and consistent with the latest documentation standards.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

95-95: Link and image reference definitions should be needed
Unused link or image reference definition: "cratedb sqlalchemy dialect"

(MD053, link-image-reference-definitions)


96-96: Link and image reference definitions should be needed
Unused link or image reference definition: "introduction to mcp"

(MD053, link-image-reference-definitions)


97-97: Link and image reference definitions should be needed
Unused link or image reference definition: "jbang"

(MD053, link-image-reference-definitions)


99-99: Link and image reference definitions should be needed
Unused link or image reference definition: "mcp python sdk"

(MD053, link-image-reference-definitions)


100-100: Link and image reference definitions should be needed
Unused link or image reference definition: "mcp sse"

(MD053, link-image-reference-definitions)


101-101: Link and image reference definitions should be needed
Unused link or image reference definition: "model context protocol (mcp) @ cratedb"

(MD053, link-image-reference-definitions)


103-103: Link and image reference definitions should be needed
Unused link or image reference definition: "quarkus-mcp-servers"

(MD053, link-image-reference-definitions)


105-105: Link and image reference definitions should be needed
Unused link or image reference definition: "sqlalchemy"

(MD053, link-image-reference-definitions)


108-108: Link and image reference definitions should be needed
Unused link or image reference definition: "uv"

(MD053, link-image-reference-definitions)

doc/query/mcp/sandbox.md (5)

54-64: Refine the Landscape API Documentation Description
The description of the {doc}landscape page is informative. Consider rephrasing "provides an overview about a fragment of the MCP server landscape" to "provides an overview of a portion of the MCP server landscape" for improved readability. Also, ensure the instructions in the note (lines 59–64) correctly generate the intended output file.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~56-~56: The preposition “of” seems more likely in this position.
Context: ...c}landscape page provides an overview about a fragment of the MCP server landscape,...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


66-77: Streamline the 'Looking Glass' Section Description
The "Looking glass" subsection effectively explains the CTK subsystem. To enhance readability, consider streamlining redundant phrases—such as reducing wordiness around "provides a little wrapper"—to focus on how it assists users in interacting with MCP servers.

🧰 Tools
🪛 LanguageTool

[style] ~72-~72: Consider a shorter alternative to avoid wordiness.
Context: ...MCP servers that wrap database access. In order to get an idea about a fragment of the MCP...

(IN_ORDER_TO_PREMIUM)


81-93: Verify the Registered MCP Servers Output Example
The JSON output example for the command ctk query mcp list appears correct. Please confirm that this list will be updated dynamically as changes occur in the MCP server registry.


105-110: Clarify the To-Do Section for Launching MCP Servers
The {todo} block for launching a registered MCP server currently uses "Launch registered MCP server." Consider reformatting it (for example, "To-Do: Launch registered MCP server") to clearly indicate that this feature is pending. This minor formatting change can help set the correct expectations.

🧰 Tools
🪛 LanguageTool

[grammar] ~105-~105: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”?
Context: ...er-name=postgres-basic inquire :::{todo} Launch registered MCP server.shell...

(TO_DO_HYPHEN)


113-126: Ensure Final Reference Consistency
The reference section at the end lists all external links. Please double-check that these links are correct, current, and formatted consistently throughout the document.

cratedb_toolkit/query/mcp/registry.py (2)

70-74: Usage Example for mcp-alchemy – Version Consistency Check
The example for mcp-alchemy is clearly formatted and informative. However, a small discrepancy was noted: the dependency for sqlalchemy-cratedb is specified as >=0.42.0.dev1 in the requirements while the example uses --with='sqlalchemy-cratedb>=0.42.0.dev2'. Please verify that the version in the example is intentional and aligns with the intended dependency version.


202-213: Side-Effect in the select Method
The select method not only filters servers by name but also calls server.install() when a server matches. This introduces a side effect in what might otherwise be considered a simple getter method. Consider decoupling installation from selection to adhere more strictly to separation of concerns. For example, you might have a dedicated method to install a server after selection.

doc/query/mcp/landscape.md (2)

189-194: Usage Example for mcp-alchemy – Aligning Versions
The example shown for mcp-alchemy is neatly formatted. As with the registry, please double-check that the version specified in the --with flag corresponds with the dependency version expected.


813-819: Consistent and Informative quarkus Example
The updated example for quarkus is consistent with the other server examples. For added clarity, consider providing a brief note on error handling or expected output in case the command fails.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae74de1 and 1c8442f.

📒 Files selected for processing (11)
  • cratedb_toolkit/query/mcp/inquiry.py (1 hunks)
  • cratedb_toolkit/query/mcp/model.py (4 hunks)
  • cratedb_toolkit/query/mcp/registry.py (7 hunks)
  • doc/conf.py (1 hunks)
  • doc/query/index.md (1 hunks)
  • doc/query/mcp/backlog.md (1 hunks)
  • doc/query/mcp/index.md (1 hunks)
  • doc/query/mcp/landscape.md (11 hunks)
  • doc/query/mcp/research.md (1 hunks)
  • doc/query/mcp/sandbox.md (1 hunks)
  • doc/query/mcp/server.md (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
cratedb_toolkit/query/mcp/registry.py (1)
cratedb_toolkit/query/mcp/model.py (1)
  • McpServer (20-144)
🪛 markdownlint-cli2 (0.17.2)
doc/query/mcp/research.md

5-5: Bare URL used
null

(MD034, no-bare-urls)


6-6: Bare URL used
null

(MD034, no-bare-urls)


7-7: Bare URL used
null

(MD034, no-bare-urls)

doc/query/mcp/backlog.md

7-7: Bare URL used
null

(MD034, no-bare-urls)


8-8: Bare URL used
null

(MD034, no-bare-urls)


9-9: Bare URL used
null

(MD034, no-bare-urls)

doc/query/mcp/index.md

35-35: Bare URL used
null

(MD034, no-bare-urls)

🪛 LanguageTool
doc/query/mcp/server.md

[style] ~24-~24: Consider using a different verb to strengthen your wording.
Context: ...tten in Python across the board. Please make sure it is installed on the machine where yo...

(MAKE_SURE_ENSURE)

doc/query/mcp/index.md

[formatting] ~16-~16: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...mentations provided by the MCP ecosystem, because CrateDB is compatible with PostgreSQL. ...

(COMMA_BEFORE_BECAUSE)


[uncategorized] ~72-~72: The preposition “of” seems more likely in this position.
Context: ...for PostgreSQL and CrateDB An overview about a fragment of the MCP server landscape ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)

doc/query/mcp/sandbox.md

[uncategorized] ~56-~56: The preposition “of” seems more likely in this position.
Context: ...c}landscape page provides an overview about a fragment of the MCP server landscape,...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[style] ~72-~72: Consider a shorter alternative to avoid wordiness.
Context: ...MCP servers that wrap database access. In order to get an idea about a fragment of the MCP...

(IN_ORDER_TO_PREMIUM)


[grammar] ~105-~105: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”?
Context: ...er-name=postgres-basic inquire :::{todo} Launch registered MCP server.shell...

(TO_DO_HYPHEN)

🪛 GitHub Check: codecov/patch
cratedb_toolkit/query/mcp/model.py

[warning] 128-130: cratedb_toolkit/query/mcp/model.py#L128-L130
Added lines #L128 - L130 were not covered by tests


[warning] 134-136: cratedb_toolkit/query/mcp/model.py#L134-L136
Added lines #L134 - L136 were not covered by tests

🔇 Additional comments (30)
doc/conf.py (1)

10-10: Copyright years updated appropriately.

The copyright year range has been extended to cover 2022-2025, providing broader time coverage for the project. This is a good maintenance practice.

doc/query/index.md (2)

3-4: Description scope broadened appropriately.

The updated description expands the scope of query utilities to include database querying functionality and explicitly mentions adapters alongside converters. This provides users with a more comprehensive understanding of the module's capabilities.


10-10: Formatting improvement.

Fixed the indentation of the "convert" entry in the toctree for consistent formatting with other entries.

cratedb_toolkit/query/mcp/model.py (5)

10-10: Added import for improved text formatting.

The textwrap module is now imported to support better formatting of code blocks in the markdown output.


35-36: Enhanced McpServer with useful metadata fields.

The dataclass has been extended with two new fields that provide valuable context:

  • example: Optional string to demonstrate usage patterns
  • issues: List of related issue references

These additions improve documentation and usability of MCP servers.


116-116: Updated to_dict to include new example field.

The serialization method now properly includes the example field with whitespace handling.


134-136: Added example section to markdown output.

A formatted example section is now conditionally included in the markdown output when an example is provided, improving documentation clarity.

Similar to the preinstall formatting, these lines aren't covered by tests according to codecov. The same test coverage improvement would apply here.

🧰 Tools
🪛 GitHub Check: codecov/patch

[warning] 134-136: cratedb_toolkit/query/mcp/model.py#L134-L136
Added lines #L134 - L136 were not covered by tests


128-130:

Details

❓ Verification inconclusive

Improved preinstall command formatting in markdown output.

The preinstall command is now properly formatted as a shell code block with consistent labeling and indentation.

These new formatting changes aren't covered by tests according to codecov. Consider adding tests to ensure the markdown output formatting behaves as expected.


🏁 Script executed:

#!/bin/bash
# Search for existing tests of the to_markdown method
rg -A 3 "to_markdown" --type python

Length of output: 66


Action Required: Verify Test Coverage for Markdown Formatting

The changes in cratedb_toolkit/query/mcp/model.py (lines 128-130) now output the preinstall command as a well-formatted shell code block with consistent labeling and indentation. However, these formatting changes are not covered by tests per the codecov report. It’s important to add unit tests (for example, verifying the output of the to_markdown method, if applicable) to ensure that the markdown formatting behaves as expected.

  • Confirm that there is a test (or add one) to verify the markdown output for the preinstall command.
  • Ensure that the to_markdown method (or equivalent functionality) correctly formats and indents the shell code block.
🧰 Tools
🪛 GitHub Check: codecov/patch

[warning] 128-130: cratedb_toolkit/query/mcp/model.py#L128-L130
Added lines #L128 - L130 were not covered by tests

doc/query/mcp/research.md (2)

1-1: Improved document title specificity.

The title has been updated from "MCP notes" to "MCP research notes," better indicating the nature of the content.


3-3: Reduced redundancy in section headers.

Section headers have been simplified by removing the redundant "MCP" prefix, since it's already included in the main title. This improves readability and reduces repetition.

Also applies to: 9-9

doc/query/mcp/index.md (3)

3-4: Rename and Clarify the Introduction Section
Changing the section title to "Introduction" helps set a clear context for MCP. The update is effective and aligns with the improved documentation structure.


20-79: Review the Grid Layout for Navigation
The new grid layout cards for "CrateDB MCP servers" and "CrateDB MCP examples" enhance navigation and presentation. Please verify that all linked targets (e.g., server, sandbox) are correct and that the visual layout meets design expectations.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~72-~72: The preposition “of” seems more likely in this position.
Context: ...for PostgreSQL and CrateDB An overview about a fragment of the MCP server landscape ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)

🪛 markdownlint-cli2 (0.17.2)

35-35: Bare URL used
null

(MD034, no-bare-urls)


82-91: Update Toctree for the New Documentation Structure
The updated toctree now lists "Servers", "Landscape", "Sandbox", "Backlog", and "Research." This reorganization aligns with the documentation improvements. Confirm that each of these entries correctly links to the intended documents and that the toctree renders as expected.

doc/query/mcp/sandbox.md (4)

5-10: Ensure Consistency in the Prerequisites Listing
The prerequisites section clearly lists the necessary tools (e.g., [CrateDB], [CrateDB Toolkit], [mcptools], [uv]). Confirm that these tools and their descriptions match the information provided in other parts of the documentation for consistency.


11-26: Validate Installation Instructions Across Platforms
The installation section—covering Docker invocation and software package installation—is well documented. It might be useful to test these commands on all supported operating systems to ensure comprehensive guidance.


33-52: Review the CLI Usage Examples for Accuracy
The examples for using [cratedb-mcp] and [mcp-alchemy] are clear and practical. Please verify that the Git URLs (especially "git+https://github.com/crate/cratedb-mcp@packaging-adjustments") and version specifications are up-to-date with the current releases.


95-103: Confirm Consistency of Inquiry Command Examples
The CLI examples for inquiring registered MCP servers are consistent with the rest of the documentation. Verify that the commands execute as expected in your testing environment.

cratedb_toolkit/query/mcp/registry.py (8)

30-36: Clear and Informative Usage Example for cratedb-mcp
The new raw multiline string provided as the example for the cratedb-mcp server is well formatted and clearly shows how to invoke the server using environment variables and piping the output to jq. The addition of the issue reference further enhances traceability.


41-41: Updated dbhub Command
The updated command for the dbhub server, which now uses npx -y @bytebase/dbhub --transport=stdio --dsn=postgres://crate@localhost:5432/testdrive, simplifies the invocation by removing the npm version pin. This appears appropriate for maintenance.


49-53: Well-Formatted dbhub Usage Example
The usage example for dbhub is consistent in style with the other examples. The clear presentation in a raw multiline string helps users understand how to run the query command.


88-88: Issue Reference for mcp-db
An issue URL is now provided for mcp-db (line 88). Ensure that this reference points to the correct discussion or fix regarding the underlying problems.


115-118: Revised Preinstall Command in pg-mcp
The updated preinstall script for pg-mcp (particularly the new git checkout command on line 115) is more precise in checking out specific files. Make sure that the commit hash and file list are accurate and that the command works reliably across environments.


127-127: Added Issue Reference for pg-mcp
The addition of an issue reference for pg-mcp provides clear traceability for known problems or enhancements.


153-156: Consistent Example for postgres-mcp
The new usage example for postgres-mcp is well formatted and mirrors the style of other examples. Confirm that the --access-mode=unrestricted parameter is correct and intentional for your security and functionality requirements.


168-172: Clear Usage Example for quarkus
The example provided for the quarkus server is consistent and demonstrates how to run a read query via jbang. It may be useful to verify that all command-line arguments are parsed as expected by the underlying tool.

doc/query/mcp/landscape.md (5)

1-5: Updated Title and Introduction
The document title and introductory description have been refreshed for clarity, aligning well with the registry updates. This improves overall user guidance for understanding the MCP server landscape.


16-22: Well-Formatted cratedb-mcp Usage Example
The usage example under the cratedb-mcp section is clear and properly formatted as an indented shell code block. This aids users in quickly understanding the command invocation.


80-88: Simplified dbhub Invocation in Documentation
The dbhub section now presents a simplified :Run: command followed by a clear usage example block. Ensure this command remains consistent with what is defined in the MCP server registry.


414-424: Robust Preinstall Block for pg-mcp
The preinstall script for pg-mcp is included as a formatted shell code block, which enhances clarity. Verify that the checkout command (including the commit hash and file list) is valid and that all commands execute as intended on various systems.


625-629: Example for postgres-mcp with Security Consideration
The usage example for postgres-mcp is well presented. It may be beneficial to reexamine the --access-mode=unrestricted parameter to ensure that its usage is consistent with your security policies.

@amotl amotl force-pushed the mcp-iteration-2 branch from 1c8442f to 04ddcac Compare April 14, 2025 21:19
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
doc/query/mcp/landscape.md (2)

200-210: Consistent Version Information in Tool Descriptions (Part 1)
The YAML entries for tools like all_table_names and filter_table_names now include connection specifics and reference the correct CrateDB version (5.10.4). This consistency improves clarity regarding server requirements.


221-235: Consistent Version Information in Tool Descriptions (Part 2)
The updated descriptions for schema_definitions and execute_query now specify that they are connected to CrateDB version 5.10.4, along with connection details. Ensure that these version references correspond with those in the registry and other documentation.

doc/query/mcp/sandbox.md (1)

105-110: TODO Section for Launching MCP Servers
The TODO block for launching a registered MCP server is a useful reminder. Consider revising the “todo” syntax to include a hyphen (e.g. “to-do”) if that aligns with style guidelines.

🧰 Tools
🪛 LanguageTool

[grammar] ~105-~105: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”?
Context: ...er-name=postgres-basic inquire :::{todo} Launch registered MCP server.shell...

(TO_DO_HYPHEN)

doc/query/mcp/index.md (1)

56-65: Well-Organized Grid Items for Additional Resources
The grid items for “MCP sandbox tutorial” and “API overview” are neatly presented. For the API overview card, consider revising the description on line 71-72. For example, replacing “about a fragment” with “of a fragment” may read more naturally.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c8442f and 04ddcac.

📒 Files selected for processing (10)
  • cratedb_toolkit/query/mcp/inquiry.py (1 hunks)
  • cratedb_toolkit/query/mcp/registry.py (7 hunks)
  • doc/conf.py (1 hunks)
  • doc/query/index.md (1 hunks)
  • doc/query/mcp/backlog.md (1 hunks)
  • doc/query/mcp/index.md (1 hunks)
  • doc/query/mcp/landscape.md (11 hunks)
  • doc/query/mcp/research.md (1 hunks)
  • doc/query/mcp/sandbox.md (1 hunks)
  • doc/query/mcp/server.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • doc/conf.py
🚧 Files skipped from review as they are similar to previous changes (6)
  • doc/query/mcp/research.md
  • doc/query/index.md
  • doc/query/mcp/backlog.md
  • cratedb_toolkit/query/mcp/inquiry.py
  • doc/query/mcp/server.md
  • cratedb_toolkit/query/mcp/registry.py
🧰 Additional context used
🪛 LanguageTool
doc/query/mcp/index.md

[uncategorized] ~72-~72: The preposition “of” seems more likely in this position.
Context: ...for PostgreSQL and CrateDB An overview about a fragment of the MCP server landscape ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)

doc/query/mcp/sandbox.md

[style] ~72-~72: Consider a shorter alternative to avoid wordiness.
Context: ...MCP servers that wrap database access. In order to get an idea about a fragment of the MCP...

(IN_ORDER_TO_PREMIUM)


[grammar] ~105-~105: It appears that a hyphen is missing in the noun “to-do” (= task) or did you mean the verb “to do”?
Context: ...er-name=postgres-basic inquire :::{todo} Launch registered MCP server.shell...

(TO_DO_HYPHEN)

🔇 Additional comments (31)
doc/query/mcp/landscape.md (10)

1-1: Title Update is Clear and Consistent
The new title “MCP server landscape for PostgreSQL and CrateDB” succinctly reflects the focus of the document and aligns with the updated inquiry attribute in the codebase.


3-4: Improved Introductory Description
The revised introduction now clearly emphasizes the coverage of popular MCP servers that support both PostgreSQL and CrateDB. This makes it immediately evident to the reader what to expect.


16-22: Concise and Practical Shell Example for CrateDB MCP
The added example clearly demonstrates how to set the environment variable and invoke the mcpt call query_sql command using uvx. This practical usage snippet aligns well with the updated registry attributes.


82-88: Updated Example for DBHub Command
The new shell command for DBHub—using npx -y @bytebase/dbhub --transport=stdio --dsn=postgres://crate@localhost:5432/testdrive—is clearly presented with proper formatting and a helpful jq post-processing step.


182-187: Enhanced Description for MCP Alchemy Server
The updated description for the MCP Alchemy server now emphasizes its reliance on SQLAlchemy and the invocation options (uv/uvx). This clearer explanation will assist users in understanding its role.


189-194: Well-Formatted Example for MCP Alchemy Usage
The example command for mcp-alchemy is neatly formatted and provides clear instructions. Please verify that the dependency versions (e.g. in the --with parameter) are consistent with the registry requirements.


407-424: Clear Preinstall Instructions for PG-MCP
The preinstall section for the PG-MCP server is comprehensive and clear, detailing steps like cloning the repository, checking out a specific commit, modifying pyproject.toml, and installing the package. Please double-check that the commit hash and configuration details reflect the latest setup intentions.


431-443: Well-Defined Prompt Configuration for PG-MCP
The YAML definition for the nl_to_sql_prompt now appears clean and self-explanatory. Ensure that YAML indentation and line breaks are preserved for proper parsing in downstream tools.


625-629: Accurate Example for postgres-mcp (Postgres Pro)
The new example block for postgres-mcp is clearly formatted and demonstrates the use of uvx with the proper flag (--access-mode=unrestricted). This should serve as a reliable guide for users.


813-818: Clear Example for Quarkus MCP Server
The example command for the Quarkus MCP server is well-documented and consistent with our other examples. The use of jbang and the piped output to jq offers a familiar workflow.

doc/query/mcp/sandbox.md (13)

1-1: New Sandbox Document Title is Informative
The title “CrateDB MCP sandbox” immediately conveys the document’s purpose as a hands-on guide.


3-4: Concise Introduction to the Sandbox
The brief walkthrough text effectively sets the stage for new users by stating that this is a starting guide for using CrateDB with MCP.


7-10: Clear Prerequisites and Environment Options
The prerequisites section lists all necessary components—including CrateDB, CrateDB Toolkit, mcptools, and the [uv] package manager—and even suggests alternative container runtimes. This is helpful for users working in different environments.


13-19: Well-Structured Docker Command for CrateDB
The provided Docker command is precise and easy to follow, specifying port mappings, environment variables (like CRATE_HEAP_SIZE), and the single-node configuration.


22-26: Comprehensive Installation Instructions for Software Packages
The installation commands for Homebrew ensure that users on macOS have clear steps to install all necessary software, including mcptools and Docker Desktop.


29-31: Clear Command to Install CrateDB Toolkit with MCP Support
Using the command uv tool install --upgrade 'cratedb-toolkit[mcp]' makes it explicit that the MCP support is part of the toolkit install.


40-46: Well-Demonstrated CLI Example for cratedb-mcp
The example command for using [cratedb-mcp] is clear and instructive. It correctly sets the environment variable and shows how to invoke the MCP query via mcpt call query_sql.


47-52: Clear CLI Example for mcp-alchemy
The example for [mcp-alchemy] mirrors the structure of the cratedb-mcp command, maintaining consistency in how usage examples are presented.


56-64: Helpful Reference to Landscape API Documentation
The section linking to the landscape page is concise. The note with its rebuild command is a practical touch that guides maintainers on how to regenerate the documentation.


66-77: Informative “Looking glass” Section
The explanation of the “Looking glass” subsystem is well articulated, detailing its purpose and linking it to the registry and inquiry functionalities.

🧰 Tools
🪛 LanguageTool

[style] ~72-~72: Consider a shorter alternative to avoid wordiness.
Context: ...MCP servers that wrap database access. In order to get an idea about a fragment of the MCP...

(IN_ORDER_TO_PREMIUM)


79-93: Useful Examples for Enumerating and Inspecting MCP Servers
The provided shell commands (with both CLI invocation and JSON output sample) offer clear guidance on how to list and inquire about registered MCP servers.


95-103: Consistent Command Examples for Inquiring MCP Servers
The examples for inquiring all registered servers versus a specific server are well differentiated and clear in their intent.


112-127: Comprehensive Reference Link Definitions
The reference links at the end ensure that users have easy access to all external resources. This thoroughness supports the document’s self-containment.

doc/query/mcp/index.md (8)

3-3: Renaming to “Introduction” Enhances Clarity
Changing the introductory section title from “About” to “Introduction” makes the purpose of the section more immediately understandable.


9-11: Expanded Explanation of MCP Client-Server Communication
The revised text now explicitly expands “stdio” to “Standard Input/Output (stdio)” and clarifies the communication methods (including SSE). This improves both clarity and accessibility for new users.


15-17: Focused Description of MCP Servers for CrateDB
The sentence highlighting that MCP servers for CrateDB predominantly use PostgreSQL adapter implementations is clear. This focus reflects the underlying compatibility between CrateDB and PostgreSQL.


20-28: Effective Use of Grid Layout for Content Cards
The grid card section introducing “CrateDB MCP servers” is visually appealing and informative. Ensure that the alt texts and link descriptions are sufficiently descriptive for accessibility.


33-43: Informative Card for CrateDB MCP Examples
The card for “CrateDB MCP examples” is well structured and clearly conveys the availability of ready-to-run MCP client programs.


48-53: Clear “Development” Section and Walkthrough Guidance
The new “Development” section provides valuable links to the sandbox tutorial and API overview, offering users practical starting points.


82-91: Updated Toctree Reflects a Modernized Structure
The revised toctree now includes the new entries (“Servers,” “Sandbox,” “Research”) while pruning outdated ones. This enhances usability and keeps the documentation focused.


93-109: Extensive and Consistent Reference Links
The updated links and external references are well curated and support the overall coherence of the documentation.

@amotl amotl force-pushed the mcp-iteration-2 branch from 04ddcac to ebee8dc Compare April 14, 2025 21:29
@amotl amotl marked this pull request as ready for review April 14, 2025 21:30
@amotl amotl merged commit 25d7c98 into main Apr 14, 2025
14 of 16 checks passed
@amotl amotl deleted the mcp-iteration-2 branch April 14, 2025 21:30
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