feat(mcp): pare default tool surface to codegraph_explore alone + redux-thunk synthesizer
This commit is contained in:
@@ -31,20 +31,21 @@ export function getMcpServerConfig(): { type: string; command: string; args: str
|
||||
|
||||
/**
|
||||
* Permissions list for Claude `settings.json`. Other targets that
|
||||
* have a permissions concept can compose this list directly. The
|
||||
* permission strings follow Claude's `mcp__<server>__<tool>` format.
|
||||
* have a permissions concept can compose this list directly.
|
||||
*
|
||||
* One server-scoped wildcard rather than a per-tool list. By default only
|
||||
* `codegraph_explore` is even LISTED to the agent (see DEFAULT_MCP_TOOLS in
|
||||
* mcp/tools.ts), so in practice explore is the only tool this auto-approves —
|
||||
* but the wildcard means that if a user re-enables another tool via
|
||||
* CODEGRAPH_MCP_TOOLS, it's already pre-approved (no permission prompt, no
|
||||
* hand-editing settings.json), and future tools are covered too. Claude only
|
||||
* honors globs after a literal `mcp__<server>__` prefix, so this exact string
|
||||
* is the way to allow-all for one server; a bare `mcp__codegraph` or `*` is
|
||||
* ignored. The allowlist gates PROMPTING, not visibility, so a superset here
|
||||
* never makes a hidden tool appear.
|
||||
*/
|
||||
export function getCodeGraphPermissions(): string[] {
|
||||
return [
|
||||
'mcp__codegraph__codegraph_explore',
|
||||
'mcp__codegraph__codegraph_search',
|
||||
'mcp__codegraph__codegraph_node',
|
||||
'mcp__codegraph__codegraph_callers',
|
||||
'mcp__codegraph__codegraph_callees',
|
||||
'mcp__codegraph__codegraph_impact',
|
||||
'mcp__codegraph__codegraph_files',
|
||||
'mcp__codegraph__codegraph_status',
|
||||
];
|
||||
return ['mcp__codegraph__*'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user