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.
git clone --depth 1 https://github.com/Consiliency/Code-Index-MCPWrote 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.
[](https://agentmods.dev/rules/consiliency/code-index-mcp/ai-integration)<a href="https://agentmods.dev/rules/consiliency/code-index-mcp/ai-integration"><img src="https://agentmods.dev/badge/rules/consiliency/code-index-mcp/ai-integration/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.
<a href="https://agentmods.dev/rules/consiliency/code-index-mcp/ai-integration"><img src="https://agentmods.dev/badge/rules/consiliency/code-index-mcp/ai-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00685 | $0.00685 |
| Opus 5.5 | $0.00274 | $0.00274 |
| Sonnet 5.5 | $0.00137 | $0.00137 |
| Haiku 4.5 | $0.00068 | $0.00068 |
Grade A, and why
ai-integration 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AI Integration Rules for Code-Index-MCP
Overview
This file defines rules and guidelines for AI integration within the Code-Index-MCP project, including embedding services, language models, and semantic search capabilities.
Embedding Services
Voyage AI Integration
- Purpose: Generate code embeddings for semantic search
- Configuration: API key required in environment variables
- Fallback: Local embedding generation if API unavailable
- Caching: Embeddings should be cached locally to reduce API calls
Implementation Guidelines
# Use the semantic_indexer utility
from mcp_server.utils.semantic_indexer import SemanticIndexer
# Initialize with API key
indexer = SemanticIndexer(api_key=os.getenv("VOYAGE_AI_API_KEY"))
# Generate embeddings with caching
embeddings = indexer.get_embeddings(code_snippet, use_cache=True)
Language Model Integration
MCP Protocol
- Purpose: Provide code intelligence to Claude and other LLMs
- Tools: Symbol lookup, code search, definition finding
- Response Format: Structured JSON with location references
Best Practices
- Batch Processing: Group embedding requests to minimize API calls
- Error Handling: Gracefully fall back to fuzzy search on API failures
- Rate Limiting: Respect API rate limits with exponential backoff
- Security: Never log or expose API keys
Semantic Search
Hybrid Approach
- Combine lexical search (fuzzy matching) with semantic search
- Weight results based on confidence scores
- Provide context-aware code suggestions
Query Processing
# Example hybrid search implementation
def hybrid_search(query: str, weights: Dict[str, float] = None):
weights = weights or {"lexical": 0.4, "semantic": 0.6}
# Lexical search using fuzzy indexer
lexical_results = fuzzy_indexer.search(query)
# Semantic search using embeddings
semantic_results = semantic_indexer.search(query)
# Combine and rank results
return combine_results(lexical_results, semantic_results, weights)
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.
- 1mo ago First seen · 102 lines · 685 tokens per session scan A 9fa9ed5f03d2
ai-integration is a cursor rule published in the GitHub repository Consiliency/Code-Index-MCP (59 stars, last pushed 4d ago), licensed MIT. It adds 685 tokens to every session, about $0.0027 per session on Opus 5.5. 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.
Other cursor rules, from other repositories
cardano-mcp
These rules complement our main development collaboration rules, focusing specifically on the Model Context Protocol (MCP) server project with TypeScript. This project serves as a specialized RAG (Retrieval-Augmented Generation) gateway to existing Cardano resources, documentation, and tools to assist with dApp…
005_Dynamo_KV_Cache_Management_KVBM
NVIDIA Dynamo KV Cache Management (KVBM) - Advanced memory management and offloading strategies for optimal performance.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.