You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DX-115085: MCP server hardening — auth, validation, annotations, and smoketests (#86)
Critical fixes:
- Add @secured and @with_metrics decorators to GetDescriptionOfTableOrSchema
so OAuth tokens are properly injected
- Add input validation to GetSchemaOfTable for empty string/list inputs
- Add MCP ToolAnnotations (readOnlyHint/destructiveHint) to all tools;
RunSqlQuery destructiveHint is conditional on allow_dml setting
Medium fixes:
- Sanitize error message in DremioAsyncHttpClient to not leak URI/PAT
- Wrap GetTableOrViewLineage in try/except with sanitized error response
- Return clean error dict for DML rejection in RunSqlQuery
- Rename RunSqlQuery parameter from 's' to 'query' for clarity
- Update GetSchemaOfTable docstring with explicit format examples
- Expand GetUsefulSystemTableNames from 1 to 6 entries (jobs_recent,
engines, users, COLUMNS, VIEWS)
Smoketest improvements:
- Add 11 smoketest cases to stremable_http_cli.py covering all fixes
- Add --token, --local, --check-annotations, --check-new-contract flags
- Add _local_mcp_server context manager with ContextVar propagation
to server thread via settings.with_overrides()
0 commit comments