MCP Server Registry#
MassGen includes a curated registry of recommended MCP (Model Context Protocol) servers that are automatically available when auto-discovery is enabled.
Overview#
The MCP server registry provides pre-configured, tested MCP servers that extend
agent capabilities. When you enable auto_discover_custom_tools: true in your
configuration, these servers are automatically included if their API keys are
available (or not required).
Registry Location: massgen/mcp_tools/server_registry.py
Available Servers#
Context7#
Purpose: Up-to-date code documentation for libraries and frameworks
Type: stdio (local) or streamable-http (remote)
API Key: Optional (CONTEXT7_API_KEY)
Connection:
mcp_servers:
- name: "context7"
type: "stdio"
command: "npx"
args: ["-y", "@upstash/context7-mcp"]
Tools:
resolve_context7_library_id- Convert library names to Context7 IDsget_library_docs- Fetch version-specific documentation (1K-50K tokens)
Key Features:
No API key required for basic use
Get API key at https://context7.com/dashboard for higher rate limits
Eliminates outdated information and hallucinated APIs
Provides current, version-specific documentation
Important Notes:
Outputs can be very large (5K-50K tokens)
Recommended: Write output to file first, then parse
Use
topicparameter to narrow resultsAdjust
tokensparameter (default: 5000, max: 50000)
Use Cases:
Getting latest framework documentation (React, Next.js, Vue, etc.)
Finding current API references
Learning about new features in recent versions
Avoiding outdated or hallucinated information
Example:
# See: massgen/configs/tools/mcp/context7_documentation_example.yaml
Brave Search#
Purpose: Web search via Brave API
Type: stdio
API Key: Required (BRAVE_API_KEY)
Connection:
mcp_servers:
- name: "brave_search"
type: "stdio"
command: "npx"
args: ["-y", "@brave/brave-search-mcp-server"]
env:
BRAVE_API_KEY: "${BRAVE_API_KEY}"
Tools:
brave_web_search- Perform web searchesAdditional tools for local search, summarization (Pro tier)
Key Features:
Real-time web search results
Free tier: 2000 queries/month
Pro tier: Enhanced features (local search, summarization, extra snippets)
API Key Setup:
Sign up at https://brave.com/search/api/
Generate API key from dashboard
Add to
.env:BRAVE_API_KEY="your_key_here"
Rate Limit Warning:
⚠️ Free tier limited to 2000 queries/month
Execute searches sequentially, not in parallel
Avoid repeated searches
Combine multiple questions into single queries
Consider Pro tier for heavy usage
Use Cases:
Current events and recent information
Latest trends and updates
Real-time data queries
Information not in LLM training data
Fact verification
Example:
# See: massgen/configs/tools/mcp/brave_search_example.yaml
Auto-Discovery#
When auto_discover_custom_tools: true is set in your backend configuration,
MassGen automatically includes registry servers that are available:
Always Included:
Context7 (no API key required)
Conditionally Included:
Brave Search (only if
BRAVE_API_KEYis set in.env)
Behavior:
Checks which registry servers have required API keys available
Merges available servers into
mcp_serversconfigurationAvoids duplicates if server is already manually configured
Logs which servers were added and which were skipped
Example:
agents:
- id: "research_agent"
backend:
type: "gemini"
model: "gemini-2.5-flash"
auto_discover_custom_tools: true # Automatically adds registry servers!
Log Output:
[gemini] Auto-discovery enabled: Added MCP servers from registry: context7
[gemini] Registry servers not added (missing API keys): brave_search (needs BRAVE_API_KEY)
Registry Summary Table#
Server |
Type |
API Key |
Rate Limits |
Notes |
|---|---|---|---|---|
Context7 |
stdio |
Optional |
None |
Large outputs (write to files). Optional API key for higher rate limits. |
Brave Search |
stdio |
Required |
2000/month (free) |
Avoid parallel queries. Pro tier available for heavy usage. |
Manual Configuration#
You can manually configure any registry server without auto-discovery:
agents:
- id: "my_agent"
backend:
type: "claude"
model: "claude-sonnet-4"
mcp_servers:
- name: "context7"
type: "stdio"
command: "npx"
args: ["-y", "@upstash/context7-mcp"]
This gives you full control over which servers to include and their configuration.
See Also#
MCP Integration - Complete MCP integration guide
YAML Configuration Reference - YAML configuration schema
massgen/configs/tools/mcp/- Example configurations