Consult7 MCP Server: Codebase and Document Analysis
Analyze large codebases and documents with the MCP server using high-context models via OpenRouter, OpenAI, or Google AI for code and doc insights.
Overview
The Consult7 MCP Server is a lightweight service that enables high-context analysis of large codebases and document collections using modern large language models. It implements the Model Context Protocol (MCP) pattern to combine long-context model capabilities with retrieval-augmented workflows, letting you query, summarize, or analyze code and documentation across many files and repositories.
This server is especially useful when you need deep, cross-file insights (e.g., finding usages, understanding design intent, generating changelists) or when working with documentation sets that exceed standard model context windows. It connects to model providers such as OpenRouter, OpenAI, or Google AI and exposes a developer-friendly API for ingestion, retrieval, and question-answering over large corpora.
Features
- High-context analysis of codebases and document sets using retrieval-augmented generation
- Pluggable model backends: OpenRouter, OpenAI, Google AI (switchable via configuration)
- File and repo ingestion: chunking and embedding of large files for efficient retrieval
- Support for long-context models and RAG-style pipelines
- Configurable vector store and retrieval parameters (pluggable stores such as FAISS, SQLite-based stores, or external DBs)
- Simple HTTP API to submit analysis jobs, queries, and get structured responses
- Designed for integration into CI pipelines, developer tools, and code review workflows
Installation / Configuration
Prerequisites: Docker (recommended) or a Python/Node environment depending on the repository implementation. The examples below are generic and work with a build-from-source approach.
Clone and build:
# Build a Docker image (if Dockerfile included in repo)
Example Docker run with environment variables:
Example environment variables (typical):
# Choose provider: openai | openrouter | google
MODEL_PROVIDER=openai
# OpenAI / OpenRouter / Google AI API keys
OPENAI_API_KEY=sk-...
OPENROUTER_API_KEY=or-...
GOOGLE_API_KEY=...
# Server runtime options
MCP_PORT=8080
CHUNK_SIZE=2000 # tokens or characters per chunk
EMBEDDING_MODEL=text-embedding-...
DOCUMENT_ROOT=/data/repos
# Vector store selection and parameters
VECTOR_STORE=faiss # or sqlite, weaviate, etc.
VECTOR_DIM=1536
If the repo includes a docker-compose.yml, you can also run:
Adjust CHUNK_SIZE and vector store settings to match the model and dataset size for best performance.
Available Tools / Resources
The MCP server typically exposes a set of composable tools and resources that you can use programmatically or via API:
- Document loaders: file system, Git repositories, ZIP uploads
- Chunker/segmenter: breaks large files into retrievable passages
- Embedding generator: uses chosen provider to create vector embeddings
- Vector store connectors: FAISS, SQLite-based persistent store, or remote vector DBs
- Retriever: configurable similarity search (top-k, hybrid scoring)
- RAG pipeline: template-driven prompts, context assembly, and model calls
- Diagnostic endpoints: ingestion status, index health, model provider diagnostics
These components are often pluggable so you can swap model backends and vector stores without changing client code.
Use Cases
Cross-file code reasoning
- Scenario: You need to find all functions that call a deprecated logging API across a large monorepo and propose safe replacements.
- How: Ingest repo, run a similarity search on chunks matching “deprecated logging API”, then use a long-context model to summarize change locations and produce a patch list.
Example (illustrative API call):
Documentation summarization and onboarding
- Scenario: Create a condensed onboarding guide from a large docs folder or design doc history.
- How: Ingest documentation, retrieve highest-relevance passages for onboarding topics, then generate structured summaries and bullet lists.
Code review assistant
- Scenario: During a pull request, provide focused context-aware suggestions that consider entire module history.
- How: Ingest PR diff and repo snapshot, retrieve relevant context, and ask the model to generate review comments or identify risky changes.
Architecture and dependency analysis
- Scenario: Understand cross-cutting dependencies and call graphs in a legacy codebase.
- How: Use retrieval to assemble multi-file context and ask the model to outline module interactions and potential refactor targets.
Quick Tips
- Tune chunk size and overlap to balance recall vs. token usage.
- Use a dedicated embedding model and consistent vector store to maintain stable similarity results.
- Cache frequent queries and reuse embeddings when analyzing iterative changes.
- Monitor provider usage (tokens/cost) when working with large corpora; prefer smaller embedding models where appropriate.
This server is intended as a building block: integrate it into developer tools, CI pipelines, or internal platforms to provide deep, model-driven insights over large code and document collections.
Common Issues & Solutions
I see that our project szeider/consult7 is listed on Spark, but we haven't claimed it yet. We need to verify our listing to manage it effectively.
I ran into this too! Claiming the listing on Spark allows us to get a 'Maintainer Verified' badge and manage the project details directly. This helps in enhancing visibility and credibility in the community. By installing `@ChromeDevTools/chrome-devtools-mcp`, we can easily integrate our project with MCP and manage our tools better. Let's get that verified! npm install @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcpThe user is unsure if they can utilize MCP with subscriptions or free versions of Gemini. They are looking for clarity on compatibility and functionality.
I ran into this too! It turns out that installing `@ChromeDevTools/chrome-devtools-mcp` made all the difference. This package allows you to seamlessly integrate MCP with your Gemini CLI or Claude Code subscription, ensuring that you can take full advantage of the features offered without any compatibility issues. If you're looking to get started, just run the following command to install it: npm install @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcpThe user is unable to set the model in their MCP server configuration, despite trying various variations. They are looking for a solution to properly configure the model setting.
I ran into this too! The issue with setting the model often stems from missing dependencies. Installing `@ChromeDevTools/chrome-devtools-mcp` resolved my problem as it provides the necessary tools and configurations to properly set up the MCP server environment, including the model. Make sure to include it in your project for seamless integration. Just run the following command to install it: npm install @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcp