Code-Index-MCP: Command for Claude Code

.claude/commands/mcp-tools.md

mcp-tools is a command for Claude Code from Consiliency/Code-Index-MCP. It costs 0 tokens per session (680 once invoked), scanned A, original, MIT.

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

Written for Claude Code: installed under .claude/.

This is Consiliency/Code-Index-MCP's own configuration. It tells Claude Code how to work on Code-Index-MCP itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Code-Index-MCP configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Consiliency/Code-Index-MCP. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Consiliency/Code-Index-MCP/main/.claude/commands/mcp-tools.md
Clone the repo
git clone --depth 1 https://github.com/Consiliency/Code-Index-MCP

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-tools

README.md
[![agentmods](https://agentmods.dev/badge/commands/consiliency/code-index-mcp/mcp-tools/github.svg)](https://agentmods.dev/commands/consiliency/code-index-mcp/mcp-tools)
Your own site
<a href="https://agentmods.dev/commands/consiliency/code-index-mcp/mcp-tools"><img src="https://agentmods.dev/badge/commands/consiliency/code-index-mcp/mcp-tools/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-tools

Your own site · 80×15
<a href="https://agentmods.dev/commands/consiliency/code-index-mcp/mcp-tools"><img src="https://agentmods.dev/badge/commands/consiliency/code-index-mcp/mcp-tools.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00680
Opus 5.5 $0.00000 $0.00272
Sonnet 5.5 $0.00000 $0.00136
Haiku 4.5 $0.00000 $0.00068

Measured 2mo ago against content hash 91e3825872f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (60 stars, last pushed yesterday), 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.

Related

mcp-tools compared with commands from other repositories

mcp-tools next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-toolsConsiliency/Code-Index-MCPCommand60yesterdayMITA0Claude Code
checklistgithub/spec-kitCommand148kyesterdayMITA13Claude Code
clarifygithub/spec-kitCommand148kyesterdayMITA27Claude Code
specifygithub/spec-kitCommand148kyesterdayMITA13Claude Code
analyzegithub/spec-kitCommand148kyesterdayMITA26Claude Code
convergegithub/spec-kitCommand148kyesterdayMITA35Claude Code
implementgithub/spec-kitCommand148kyesterdayMITA14Claude Code