Repository navigation
feat(mcp): MCP queries run on their own read-only session with a server-side timeout (#1217) - #1223
Merged
Merged
Conversation
…er-side timeout (#1217) MCP shared the user's read-only session, so an agent's queries waited behind the tree and the table tabs, and an MCP timeout closed the session under the user. MCP now has its own session mode in the PostgreSQL, MySQL and SQLite pools: a separate pool slot, read-only, and a 15 s statement limit set by the server (statement_timeout / max_execution_time). The delegates the MCP server creates use that mode. Pools and service factories set up slots through configureSession so the limit is applied on connect and on reconnect.
Closed
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #1217
What was wrong
MCP ran its queries on the user's read-only session. Catalog calls and queries queued behind the tree and the table tabs, and an MCP timeout closed the session under the user (see #1216).
Changes
mcpin the PostgreSQL, MySQL and SQLite pools: a separate pool slot, read-only, and on PostgreSQL and MySQL a server-side statement limit of 15 s (statement_timeout/max_execution_time).configureSession, so the limit applies on connect and on reconnect.mcpmode; the SQL editor and table views are unchanged.mcpis read-only with the 15 s limit only on MCP; an MCP lease never shares the read-only slot's connection (PostgreSQL and MySQL).Not in this PR
createReadOnlyMcpDelegateitself: it needs a database.Not verified locally
Tests were not run locally, per the project rule.