Multi-Agent Research System MCP Server
Provides web search capabilities for the research agent to discover and retrieve information from the web.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Multi-Agent Research System MCP ServerResearch the latest advancements in renewable energy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Multi-Agent Research System MCP Server
Advanced Multi-Agent Architecture for VS Code Copilot Integration
A next-generation Model Context Protocol (MCP) server that demonstrates how to build powerful multi-agent systems with sophisticated tooling, breaking away from traditional specialized-tool-only MCP implementations.
π Table of Contents
Related MCP server: AI Collaboration MCP Server
π― Overview
This project represents a paradigm shift in MCP server design. While traditional MCP servers focus on exposing simple, specialized tools, this implementation leverages multi-agent orchestration to create a sophisticated research system that can be seamlessly integrated into VS Code Copilot.
The system combines three specialized AI agents with powerful internal tools to perform comprehensive research tasksβall exposed through simple, intuitive MCP tools.
Why This Matters
Traditional MCP: Single-purpose tools exposed directly to clients
This Approach: Multi-agent coordination, tool orchestration, and intelligent workflow management wrapped in a clean interface
Result: More powerful, context-aware, and reliable results delivered through familiar tools
ποΈ Architecture
System Overview
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β VS Code Copilot β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
MCP Protocol (STDIO)
β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β FastMCP Server (Entry Point) β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Exposed Tools: β β
β β β’ run_research_graph(query, num_sources) β β
β β β’ workflow_info() β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β Invokes
β
βββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LangGraph Workflow (State Management) β
β β
β START β Research Agent β Validator Agent β Final Output β END
β Agent Agent Agent
ββββββ¬ββββββββββ¬βββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Internal Tools (Not Exposed to Client) β
β ββββββββββββββββββ ββββββββββββββββββββββββββββββββββββ
β β Web Tools β β LLM Agents (Groq - 70B) ββ
β β β’ web_search β β β’ Research Analysis ββ
β β β’ fetch_page β β β’ Validation & Scoring ββ
β β β’ search_news β β β’ Report Generation ββ
β ββββββββββββββββββ ββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββAgent Pipeline
1. RESEARCH AGENT
ββ Performs web searches using DuckDuckGo
ββ Fetches detailed content from URLs
ββ Performs LLM-based analysis
ββ Extracts facts and insights
ββ Outputs: summary, key_facts, insights
2. VALIDATOR AGENT
ββ Evaluates research quality
ββ Scores reliability (0-100)
ββ Identifies issues and gaps
ββ Provides improvement recommendations
ββ Outputs: validation_score, reliability, status
3. FINAL OUTPUT AGENT
ββ Synthesizes all agent outputs
ββ Generates professional markdown report
ββ Organizes findings hierarchically
ββ Includes sources and recommendations
ββ Outputs: final_report (professional documentation)β¨ Key Features
π€ Multi-Agent Orchestration
Three Specialized Agents: Research, Validation, and Output generation
Sequential Workflow: Each agent refines the previous agent's output
State Preservation: TypedDict-based state management ensures data consistency
π§ Advanced Tooling
Web Search: DuckDuckGo integration for source discovery
Content Extraction: Beautiful Soup-based webpage parsing
News Search: Specialized news discovery capability
All Internal: Tools not exposed to clientsβonly results are shared
π§ Intelligent Analysis
LLM-Powered: Groq's Llama 3.3 (70B) for accurate analysis
Temperature Control: Optimized settings per agent (Research: 0.3, Validation: 0.2, Output: 0.4)
JSON Parsing: Structured output with fallback mechanisms
π Quality Assurance
Validation Scoring: 0-100 confidence scoring system
Reliability Assessment: Multi-factor reliability ratings
Error Tracking: Issue identification and recommendations
π Secure Integration
Environment Variables: API keys managed via
.envSTDIO Transport: Safe MCP communication channel
No Data Leakage: Internal tools hidden from client
π οΈ Technology Stack
Component | Technology | Purpose |
Agent Framework | LangGraph | Workflow orchestration & state management |
LLM Provider | Groq (Llama 3.3 70B) | Advanced reasoning & analysis |
Language | Python 3.10+ | Implementation language |
MCP Framework | FastMCP | Server protocol & tool exposure |
HTTP Client | HTTPX | Async web requests |
HTML Parser | BeautifulSoup 4 | Content extraction |
Chat Models | LangChain | LLM integration abstraction |
π Project Structure
AgentsCrossToolMCP/
βββ server.py # FastMCP server & tool definitions
βββ graph_workflow.py # LangGraph workflow pipeline
βββ state.py # Shared state TypedDict definition
βββ requirements.txt # Python dependencies
βββ pyproject.toml # Project metadata
β
βββ agents/ # Multi-agent components
β βββ __init__.py
β βββ research_agent.py # Source discovery & analysis
β βββ validator_agent.py # Quality validation & scoring
β βββ final_output_agent.py # Report generation
β
βββ tools/ # Internal tool library
βββ __init__.py
βββ web_tools.py # Web search, fetch, news search
βββ __pycache__/π¦ Installation
Prerequisites
Python 3.10 or higher
Groq API key (get one at https://console.groq.com)
VS Code with Copilot extension
Setup Steps
Clone or download the project
cd d:\GENAI\AgentsCrossToolMCPCreate virtual environment
python -m venv .venv .\.venv\Scripts\Activate.ps1Install dependencies
pip install -r requirements.txtConfigure environment variables Create a
.envfile in the project root:GROQ_API_KEY=your_groq_api_key_hereVerify installation
python server.pyYou should see the FastMCP banner and server startup messages.
βοΈ Configuration
Environment Variables
# Required
GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Optional (uses defaults if not set)
GROQ_MODEL=llama-3.3-70b-versatile # Model for all agents
RESEARCH_TEMPERATURE=0.3 # Research agent creativity
VALIDATOR_TEMPERATURE=0.2 # Validator strictness
OUTPUT_TEMPERATURE=0.4 # Output composition creativityMCP Server Configuration
The MCP server is configured in VS Code through the settings:
{
"mcpServers": {
"my-mcp-server": {
"command": "python",
"args": ["d:\\GENAI\\AgentsCrossToolMCP\\server.py"],
"disabled": false,
"alwaysAllow": ["run_research_graph", "workflow_info"]
}
}
}π Usage
Via VS Code Copilot
Once connected, you can use the system directly in Copilot:
Example Prompt:
@my-mcp-server Use run_research_graph to research "AI safety in Large Language Models"
with 5 sources and provide a comprehensive analysis.Copilot will:
Call
run_research_graph(query, 5)Display the multi-page research report
Cite sources and validation metrics
Programmatic Usage
from server import run_research_graph
import asyncio
async def main():
result = await run_research_graph(
query="Is Indian GDP growing? Current growth rate and challenges",
num_sources=5
)
print(result)
asyncio.run(main())Command Line
# Start the server
python server.py
# In another terminal, test via MCP client
# (Configure in VS Code settings)π Workflow Pipeline
Step-by-Step Execution
1οΈβ£ Initialization
User provides query and source count
System initializes ResearchState object
Workflow begins
2οΈβ£ Research Agent Processing
Input: query, num_sources
ββ web_search(query) β 5 search results
ββ fetch_webpage(url) for top 2 results β raw content
ββ LLM Analysis with tools
ββ Output: summary, key_facts, insights3οΈβ£ Validation Agent Processing
Input: research_summary, key_facts
ββ LLM Assessment of quality
ββ Scoring (0-100)
ββ Reliability rating
ββ Output: validation_score, status, issues4οΈβ£ Final Output Agent Processing
Input: all previous outputs + sources
ββ Combine all findings
ββ Format as markdown report
ββ Add structure & organization
ββ Output: final_report (professional document)5οΈβ£ Return to Client
MCP server returns final_report
Copilot displays in editor
Sources and validation metrics included
π VS Code Integration
Setup Instructions
Open VS Code Settings (
Ctrl+,)Go to MCP Servers section
Add configuration:
"mcpServers": { "my-mcp-server": { "command": "python", "args": ["d:\\GENAI\\AgentsCrossToolMCP\\server.py"], "disabled": false } }Restart VS Code
Verify in Copilot Chat:
Open Copilot Chat (
Ctrl+L)Type
@my-mcp-serverShould see available tools
Usage in Copilot
@my-mcp-server Can you research the latest developments in quantum computing
and provide a detailed analysis with key insights?π API Reference
Tool: run_research_graph
Purpose: Execute comprehensive research workflow
Parameters:
run_research_graph(
query: str, # Research topic/question
num_sources: int = 5 # Number of sources to fetch
) -> strReturns:
Professional markdown report containing:
- Executive Summary
- Key Findings
- Detailed Analysis
- Research Sources
- Validation Metrics
- RecommendationsExample:
report = await run_research_graph(
query="Climate change impact on agricultural productivity",
num_sources=5
)
print(report)Tool: workflow_info
Purpose: Get information about the multi-agent system
Parameters: None
Returns:
String describing:
- Agent roles and responsibilities
- Available capabilities
- Tool informationExample:
info = await workflow_info()
print(info)π Examples
Example 1: Economic Research
Query:
Query: India GDP growth rate 2024 2025 economic challenges obstacles
Sources: 5Output includes:
GDP growth statistics
Economic challenges identified
Market obstacles
Expert recommendations
Data reliability assessment
Example 2: Technology Trends
Query:
Query: Latest developments in quantum computing and AI integration
Sources: 8Output includes:
Recent breakthroughs
Technical insights
Industry trends
Research opportunities
Cross-domain applications
π§βπ» Development
Project Architecture Principles
Separation of Concerns
Agents focus on specific tasks
Tools handle data fetching
Server handles protocol translation
State Immutability Pattern
TypedDict ensures type safety
Operator.add for message accumulation
Clear state transitions
Error Handling
Graceful degradation for tool failures
LLM JSON parsing fallbacks
Comprehensive error messages
Extensibility
Easy to add new agents
Simple to integrate new tools
Flexible temperature/model parameters
Adding New Agents
Create new agent class in
agents/Implement
async __call__(self, state)methodAdd to graph in
graph_workflow.pyUpdate state.py if needed
Adding New Tools
Create tool function in
tools/web_tools.pyDecorate with
@toolAdd to agent's
bind_tools()callKeep tools internal (not exposed via MCP)
π Troubleshooting
Issue: "GROQ_API_KEY not found"
Solution: Ensure .env file exists with valid API key
# Verify .env exists
Test-Path .\.env
# Check content (don't share publicly)
Get-Content .\.envIssue: MCP server won't start
Solution: Check dependencies and Python version
python --version # Should be 3.10+
pip list | grep -i fastmcpIssue: Web fetch fails (403 Forbidden)
Solution: Some websites block scraping. System handles this gracefully
Validator agent scores lower
System uses alternative sources
Report still generated with available data
Issue: Slow response times
Solution: Configure fewer sources or optimize LLM
# Use fewer sources
run_research_graph(query, num_sources=3)
# Or increase timeout in web_tools.py
timeout=60.0 # Increase from 30.0π Performance Metrics
Typical Execution Times
Web Search: 2-3 seconds
Content Fetch: 1-2 seconds per page
Research Agent: 3-5 seconds
Validation Agent: 2-3 seconds
Final Output Agent: 2-3 seconds
Total: ~10-15 seconds for 5 sources
Resource Requirements
CPU: Minimal (network-bound)
Memory: ~200-300 MB
Network: Required (STDIO/HTTP requests)
Storage: <50 MB code
π Security & Privacy
No Data Storage: Results not persisted
API Key Protection: Via environment variables
STDIO Transport: Encrypted by VS Code
No Third-Party Analytics: Pure execution
Tool Isolation: Internal tools never exposed
π Why This Architecture?
Traditional MCP Limitations
User Request
β
Tool Call
β
Simple ResultProblems:
No intelligence between tools
User must coordinate multiple calls
No quality validation
Results not synthesized
This System's Advantages
User Request
β
Workflow Graph
ββ Research Agent (intelligent search)
ββ Validator Agent (quality check)
ββ Final Output Agent (synthesis)
β
Professional ReportBenefits:
Autonomous orchestration
Intelligent analysis layers
Built-in quality validation
Professional output
Single-call interface
VSCode Copilot Conversation
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HimanshuMohanty-Git24/AgenticXToolMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server