Skip to content

AAK-MCP-DEPRECATED-001: Use of deprecated roots capability (roots/list)

Severity
MEDIUM
Category
MCP Configuration (mcp-config)
Scanner
agent_audit_kit/scanners/mcp_deprecated_features.py
Auto-fixable
No.
SARIF name
McpDeprecatedRoots

What it detects

Server or client code declares or exercises the roots capability — the roots/list request, the notifications/roots/list_changed notification, or the SDK aliases (list_roots, ListRootsRequest, send_roots_list_changed). The ratified MCP 2026-07-28 spec deprecates roots (SEP-2577) under the new 12-month deprecation policy (SEP-2596): it stays functional for at least a year but is on the removal path. Roots leaked the client's workspace layout to every connected server, which the RC judged an unnecessary standing surface.

How to fix

Migrate before removal: stop advertising / handling the roots capability and pass the specific workspace paths a tool needs as explicit tool parameters or server configuration instead. Deprecated 2026-07-28; plan to remove ahead of the ~mid-2027 window.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-DEPRECATED-001

Limitations

In .py, .ts, .tsx, .js, .jsx, .mjs, .cjs, .rs, .java and .kt sources it looks for roots/list, notifications/roots/list_changed, ListRootsRequest, ListRootsResult, send_roots_list_changed, sendRootsListChanged and RootsListChangedNotification, and, in a file that also contains modelcontextprotocol, FastMCP, McpServer, @mcp., mcp.server, from mcp, import mcp (each as whole words), ServerCapabilities or mcpServers, for list_roots(, listRoots(, ServerCapabilities( with roots= before its first ), or a capabilities: { ... } literal that names roots before its first closing brace. In JSON, any capabilities object or list that lists roots counts, wherever the key sits, in .mcp.json and any *.mcp.json at any depth, and mcp.json, claude_desktop_config.json, package.json and the per-editor mcp.json files (.cursor, .vscode, .windsurf, .amazonq, .roo, .kiro) directly under the project root. The same roots/list request in a Go file, and a capabilities object in config/servers.json, are not read.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-DEPRECATED-001.md: the page then shows that text, with the registry reference appended under it.