Structured code search mcp
Skill yeaight7/agent-powerups/plugins/tool-integrations/skills/structured-code-search-mcp
Use when designing or using MCP-backed structured code search with search, AST query, symbol inventory, and bounded extraction workflows.From its SKILL.md
npx -y skills add yeaight7/agent-powerups --skill structured-code-search-mcpAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.0 KB, 602 tokens by cl100k_base, as published. Nobody here has run it
Structured Code Search MCP
When to use
Use when an agent needs to search, navigate, or extract code using structural queries — AST patterns, symbol lookups, or cross-file reference tracing — beyond what simple grep or glob can provide, via an MCP-backed code search server.
Requirements / Checks
- Prefer installed/pinned structured code search binaries over remote
npx -y ...@latestexecution. - Confirm the MCP client supports the required transport and method filtering.
- Bound any search path to the current workspace unless the user explicitly approves otherwise.
Workflow
-
Choose the right tool for the query:
Need Tool Text/boolean search across files search_codeStructural pattern (function shape, class with field) query_codeExtract a specific file, range, or symbol extract_codeList all symbols in target files symbols_code -
Bound scope before searching — set base path and default paths to the workspace. Set a result limit before running broad queries (e.g., max 20 results).
-
Iterate from broad to narrow:
- Start with
search_codeorsymbols_codeto identify candidate files. - Use
query_codeto narrow to the specific structural pattern. - Use
extract_codeto retrieve the exact code range needed.
- Start with
-
Filter methods at the server — use allowlists for read/search methods. Block write and edit methods by default; only enable if code modification is explicitly part of the task.
-
Handle transport — support stdio or HTTP intentionally; set connect and tool call timeouts.
-
Debug minimally — enable debug logs only long enough to capture connection, tool discovery, and failed calls. Disable after diagnosis.
Tool Interface (illustrative — actual names depend on your server)
search_code— text/boolean search with session dedup and result limits.query_code— AST/structural search for code shapes.extract_code— file/line/symbol extraction after search narrows scope.symbols_code— symbol inventory for target files.
Exact tool names and schemas vary by implementation. Read the server's tool list before assuming names.
Safety Constraints
- Validate all input arguments against the defined JSON schema before execution.
- Enforce strict path boundaries — refuse requests for paths outside the workspace.
- Do not expose write or edit modes unless code modification is explicitly requested.
- Do not include test files or broad directories by default when the task asks for production behavior only.
Validation / Done Criteria
- MCP setup has bounded paths, strict schemas, filtered methods, and timeouts configured.
- Search and extract workflow returns enough source context without flooding the model context window.
References
references/code-search-tool-selection.md
What ships with it: 1 file
1.1 KB alongside SKILL.md