-
Notifications
You must be signed in to change notification settings - Fork 36
list_tables crashes MCP server for large schemas — needs pagination and metadata trimming #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
…r query errors fixes #25
@puneet-sutar -- I made the error handling account for this to provide more meaningful errors. We are running it in prod where there are 1000s of tables and not running into any issues, could you please try the new main branch and see if it gives a more meaningful error message. |
cc: @serprex |
…r query errors (ClickHouse#26) fixes ClickHouse#25
* feat: Add query timeout and thread pool for SELECT queries (ClickHouse#20) * add action to publish to pypi (ClickHouse#19) * add client_name with mcp_clickhouse (ClickHouse#21) * Add descriptions for tools required by Bedrock (ClickHouse#23) Addresses ClickHouse#22 * 0.1.5 * fix: prevent BrokenResourceError by returning structured responses for query errors (ClickHouse#26) fixes ClickHouse#25 * Update README.md - Added link to the Youtube overview (ClickHouse#27) * fix cherry pick issue and add desc * Update publish.yml * change mcp client name --------- Co-authored-by: Kaushik Iska <[email protected]> Co-authored-by: Philip Dubé <[email protected]> Co-authored-by: Mikhail Shustov <[email protected]> Co-authored-by: Dmitry Pavlov <[email protected]> Co-authored-by: Philip Dubé <[email protected]> Co-authored-by: Ryadh DAHIMENE <[email protected]>
I'm trying last version of mcp with Cluade Desktop + Clickhouse Cloud and see similar errors:
Looks like it's getting some data, but can't process response properly. |
Not sure if the error message is the same, but my colleagues were running into a similar issue (crashing at list_tables) until they upgraded from free to Claude Pro. |
When there are many tables, the |
Thanks for reporting this! It seems the core issue is with how We’ll get to this soon. A proper fix will likely involve:
That said, this is a great opportunity for someone looking to dig into the MCP codebase. If you’re interested, happy to onboard and guide you 🙂. Let me know! |
I've tried with Pro, same result |
hi all, I made a PR potentially addressing this, can someone who is able to consistently reproduce this issue try with #34 and see if it resolves it? I tested with a database containing 4000 tables and it worked fine but that was a purely synthetic test. |
list_tables
crashes MCP server for large schemas — needs pagination and metadata trimming📝 Updated Issue Description:
When using
list_tables
on databases with a large number of tables (100+), the MCP server may crash or disconnect. This is likely due to the payload size exceeding internal limits, especially when passed to an LLM or when streaming via stdio.This issue can manifest as
BrokenResourceError
, unhandled exceptions inTaskGroup
, or server transport unexpectedly closing. We've seen this happen in ClickHouse Cloud setups where schemas are large and metadata (like comments) is verbose.✅ Proposed Fix:
Original Description
I am trying it with my clickhouse cloud instance and the project always crashes when list_tables is called on the databases with more then 100 tables.
Anything I can do the fix it?
Pasting some log lines if they help. Let me know if you need more info here.
The text was updated successfully, but these errors were encountered: