Code & Doc Search MCPs
Relevant source files
The following files were used as context for generating this wiki page:
The ai-dev-atelier project leverages several MCP (Meta-tool Control Protocol) servers to provide robust search capabilities to its AI agents. These servers abstract away various search backends, offering a unified interface for searching the web, library documentation, academic papers, and source code. These capabilities are primarily consumed by skills such as search and research to ground agent decisions in factual, up-to-date information.
The integration of these MCPs allows agents to perform complex tasks like literature reviews, troubleshooting, and evidence-based code review validation. Configuration for these servers is managed through mcp.json, and API keys are set via a .env file.
Sources: README.md:19-23, AGENTS.md:5-9, skills/search/SKILL.md, skills/research/SKILL.md
MCP Overview
The project defines a suite of MCP servers, each tailored for a specific search domain. The following table summarizes the available search-related MCPs, their purpose, and any required environment variables for authentication.
| MCP Server | Purpose | Required Key / Env Var |
|---|---|---|
tavily-remote-mcp | General web search and research. | TAVILY_API_KEY |
context7 | Search library documentation. | CONTEXT7_API_KEY (Optional) |
grep | Search code within GitHub repositories. | None |
openalex-research | Search for academic papers and citation networks. | OPENALEX_EMAIL |
pdf-reader | Extract text content from PDF files. | None |
paper-search | Search for academic papers across multiple platforms. | Optional |
zai-zread | Perform semantic search on GitHub repos (issues, PRs, docs). | Z_AI_API_KEY |
zai-vision | Analyze images/videos, generate UI code, and interpret diagrams. | Z_AI_API_KEY |
Sources: README.md:46-57, AGENTS.md:73-86
Integration with Skills
MCPs are not used directly but are invoked by agents through specialized skills. This creates a layered architecture where skills define the "how" and MCPs provide the "what".
This diagram illustrates the general flow of an agent using a skill that relies on an MCP server for information.
Sources: skills/README.md:65-72, AGENTS.md:10-12
search Skill
The search skill is designed for looking up documentation, code examples, and best practices. It primarily utilizes the following MCPs:
- Tavily (
tavily-remote-mcp): For general web searches. - Context7: For targeted searches within library documentation.
Sources: skills/search/SKILL.md, skills/README.md:48-51
research Skill
The research skill orchestrates a more complex, multi-source discovery process for conducting academic research and producing evidence-based reports. It uses a combination of MCPs in parallel.
The sequence diagram below shows how the research skill might use multiple MCPs to gather both academic and non-academic sources.
This workflow involves:
- Academic Discovery: Using
openalex-researchto find highly-cited and recent papers. - Non-Academic Discovery: Using
tavily-remote-mcp(via thesearchskill) to find blog posts, tutorials, and case studies. - Content Extraction: Using
pdf-readerto extract text from downloaded academic papers. - Synthesis: The skill then synthesizes these varied sources into evidence cards.
Sources: skills/research/SKILL.md, skills/research/references/guides/guide-workflow.md:38-60
pr-comment-reviewer Agent
The specialized pr-comment-reviewer agent is expected to be autonomous and uses search tools to research issues before deciding on a fix or deferring to a human. For example, when encountering a potential security vulnerability, it will use search to understand the vulnerability type (e.g., OWASP, CWE) and find recommended mitigation patterns.
Sources: agents/pr-comment-reviewer.md:40-45
Configuration
MCP Server Definition
The MCP servers are defined in mcp.json. While the file's content is not fully available, it is the central registry for MCP servers used by the agent system. The install.sh script installs these configurations for the agent to use.
Sources: AGENTS.md:23, README.md:22
API Keys
API keys for MCPs that require them (like Tavily and Z.AI) must be set in a .env file at the project root before running the install.sh script.
Sources: README.md:19-20, AGENTS.md:92-93
Tool Filtering
For agents like OpenCode, specific MCP tools can be disabled to save costs or avoid redundancy with native agent tools. This is done by adding a "tools" object to the agent's configuration file (e.g., ~/.opencode/opencode.json).
The following tools are recommended for disabling:
zai-zread_read_file: Can be replaced bywebfetch.zai-zread_get_repo_structure: Can be replaced bygh api.zai-vision_image_analysis: Can be replaced by the nativelook_attool.zai-vision_extract_text_from_screenshot: Can be replaced by the nativelook_attool for OCR.
{
"tools": {
"zai-zread_read_file": false,
"zai-zread_get_repo_structure": false,
"zai-vision_image_analysis": false,
"zai-vision_extract_text_from_screenshot": false
}
}
Sources: AGENTS.md:95-111
Conclusion
The Code & Doc Search MCPs are a cornerstone of the ai-dev-atelier project, empowering AI agents with the ability to access and synthesize a wide range of external information. By abstracting different search backends into a consistent MCP interface, the system allows skills like search and research to perform sophisticated, evidence-based analysis. This architecture ensures that agents can operate with a high degree of autonomy and accuracy, whether they are writing documentation, reviewing code, or researching complex technical topics.
Sources: AGENTS.md:5-9, README.md:40-45