mcp-tools

A reference guide for using MCP (Model Context Protocol) tools to explore a code repository. It covers finding exact symbols, searching code, checking the search index, and listing supported languages.

In plain words
What is it for?
Use it to locate class, function, method, or variable definitions; search for text, patterns, or concepts; check index health; and follow reindexing guidance.
Why use it?
It helps you choose between indexed searches and ordinary repository search when the index is unavailable or not ready. This reduces the risk of relying on incomplete search results.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/consiliency/code-index-mcp/mcp-tools
Clone the repo
git clone --depth 1 https://github.com/Consiliency/Code-Index-MCP

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 680 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00680
Opus 5 $0.00000 $0.00340
Sonnet 5 $0.00000 $0.00136
Haiku 4.5 $0.00000 $0.00068

Measured 2d ago against content hash 91e3825872f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-tools scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/mcp-tools.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Tools Quick Reference

Complete guide to using MCP (Model Context Protocol) tools for efficient code exploration. Indexed search is authoritative only when repository readiness is ready. If search_code or symbol_lookup returns index_unavailable with safe_fallback: "native_search", use native search and follow the remediation, such as reindex.

Available MCP Tools

1. Symbol Lookup

mcp__code-index-mcp__symbol_lookup(symbol="ClassName")
  • Purpose: Find exact definitions of classes, functions, methods, variables
  • Speed: <100ms
  • Returns: File path, line number, signature, documentation

2. Code Search

mcp__code-index-mcp__search_code(query="pattern", limit=10, semantic=false)
  • Purpose: Search code patterns, text, or concepts
  • Speed: <500ms
  • Features: Regex support, semantic search, context snippets

3. Index Status

mcp__code-index-mcp__get_status()
  • Purpose: Check index health and statistics
  • Returns: Indexed files, languages, plugin status, repository readiness

4. List Plugins

mcp__code-index-mcp__list_plugins()
  • Purpose: See all 48 supported programming languages
  • Returns: Language list with plugin details

5. Reindex

mcp__code-index-mcp__reindex(path="specific/path")
  • Purpose: Update index after file changes
  • Use: After major edits or new files

Search Strategy

Use MCP Indexed Search When Readiness Is ready For:

  • Finding symbol definitions
  • Searching code patterns
  • Understanding code relationships
  • Locating usage examples
  • Semantic concept searches

Use Native Search For:

  • Non-ready repositories
  • Query responses with code: "index_unavailable"
  • Any response carrying safe_fallback: "native_search"
  • Work while reindex or other remediation is pending

Performance Comparison

Operation Native search Ready MCP index Speedup
Find class definition 45s 0.1s 450x
Search pattern 30s 0.5s 60x
Semantic search N/A 1s

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 95 lines · 0 tokens per session scan A 91e3825872f8

Subscribe to this mod's changes

mcp-tools is a command published in the GitHub repository Consiliency/Code-Index-MCP (57 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 680 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.