Spaces:
Running
A newer version of the Gradio SDK is available:
6.1.0
title: MCP Research Server - Building MCP Track
emoji: null
colorFrom: indigo
colorTo: red
sdk: gradio
pinned: true
tags:
- building-mcp-track-consumer
- mcp
- agents
- gradio6
MCP Research Server
A fully functional Model Context Protocol (MCP) server demonstrating real-time research workflows with multiple integrated tools, seamless Claude Desktop integration, and a polished Gradio 6 interface.
Project Overview
This submission for the MCP 1st Birthday Hackathon - Track 1: Building MCP showcases a production-ready MCP server that can:
- Execute complex research workflows using multiple coordinated tools
- Integrate directly with Claude Desktop and other MCP clients
- Stream real-time progress updates through Gradio
- Handle asynchronous tool orchestration efficiently
Track Information
- Track: Building MCP (Track 1)
- Category: Consumer Applications
- Track Tag:
building-mcp-track-consumer - Hackathon: MCP 1st Birthday (Nov 14-30, 2025)
Key Features
Functional MCP Server
- JSON-RPC 2.0 Protocol - Complete compliance with MCP standards
- Stdio Transport - Standard MCP transport mechanism for client integration
- Tool Discovery - Dynamic capability advertisement to clients
- Async Processing - Efficient non-blocking execution of tools
Integrated Tools (4 Core Tools)
Web Search Tool (
web_search)- Search for information on any topic
- Returns structured results with titles, URLs, and snippets
- Configurable result limit (1-10 results)
Content Analysis Tool (
analyze_content)- Multiple analysis types: summary, keypoints, sentiment, entities
- Extract key insights from documents
- Intelligent entity recognition
Content Synthesis Tool (
synthesize_sources)- Combine insights from multiple sources
- Maintain context and relationships
- Generate coherent narratives
Report Generator Tool (
generate_report)- Create structured, formatted reports
- Support for multiple output formats (Markdown, HTML, Plain Text)
- Professional report formatting
Modern UI/UX
- Gradio 6 Interface - Latest Gradio features and responsive design
- Real-time Streaming - Live progress updates during research
- Tool Visualization - Clear display of tool execution steps
- Example Queries - Pre-built examples for easy exploration
- Mobile Responsive - Works seamlessly on all devices
Multi-Client Integration
- Claude Desktop - Full integration with configuration guide
- Cursor IDE - Can be configured as custom MCP server
- Standard MCP Clients - Compatible with any MCP-compliant client
- Easy Setup - Simple configuration files provided
Architecture
System Components
MCP Clients
(Claude Desktop, Cursor, Gradio, Custom Clients)
β
(JSON-RPC 2.0)
β
MCP Server Core
(mcp_server.py - Async JSON-RPC Handler)
β
β β β
Web Document Content
Search Analyzer Synthesizer
β
Report
Generator
Request Flow
Query Input
β
[MCP Client] Initialize Connection
β
Request Tool List
β
Call Tool: web_search
β
Call Tool: analyze_content
β
Call Tool: synthesize_sources
β
Call Tool: generate_report
β
Stream Response Back to Client
Technology Stack
- Language: Python 3.9+
- MCP Protocol: JSON-RPC 2.0 over stdio
- Framework: Gradio 6.0+
- Async Runtime: asyncio
- Type Safety: Pydantic
- Transport: Standard process stdio
Quick Start
Installation
# Clone the repository
git clone <your-repo-url>
cd ecomcp
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Run the Gradio Interface
python app_enhanced.py
Then open http://localhost:7860 in your browser.
Standalone MCP Server
python mcp_server.py
Server will start listening on stdin for JSON-RPC messages.
Claude Desktop Integration
- Follow the detailed guide in CLAUDE_DESKTOP_SETUP.md
- Update your Claude configuration file
- Restart Claude Desktop
- Start using research tools directly in conversations
Demo & Usage
Example Queries
"Research the latest advances in quantum computing"
- Demonstrates web search tool
- Shows content analysis
- Generates comprehensive report
"Find information about renewable energy and synthesize findings"
- Multiple source integration
- Content synthesis
- Professional report output
"Analyze AI ethics and create a structured report"
- Full workflow demonstration
- Report generation
- Real-time progress updates
Using in Claude Desktop
You: "Search for information about machine learning in healthcare and create a research report."
Claude: [Uses web_search tool to find sources]
Claude: [Uses analyze_content to extract insights]
Claude: [Uses synthesize_sources to combine findings]
Claude: [Uses generate_report to create formatted output]
Claude: "Here's your research report on machine learning in healthcare..."
Project Structure
ecomcp/
mcp_server.py # Standalone MCP server implementation
app_enhanced.py # Main Gradio 6 web interface
app.py # Original implementation (legacy)
requirements.txt # Python dependencies
README.md # This file
CLAUDE_DESKTOP_SETUP.md # Claude Desktop integration guide
DEPLOYMENT_GUIDE.md # Deployment instructions
docs/
implementation.md # Technical implementation details
tests/ # Test suite (optional)
utils/ # Utility modules (optional)
Configuration
Environment Variables
Create a .env file for optional configuration:
# MCP Server settings
MCP_MAX_RESULTS=10
MCP_TIMEOUT=30
MCP_DEBUG=False
# Logging
LOG_LEVEL=INFO
LOG_FILE=mcp_server.log
# API Keys (if using real APIs in production)
OPENAI_API_KEY=your_key_here
SERPAPI_KEY=your_key_here
Claude Desktop Configuration
Edit ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"research": {
"command": "python",
"args": ["/path/to/ecomcp/mcp_server.py"],
"env": {
"PYTHONUNBUFFERED": "1"
}
}
}
}
Documentation
User Guide
Technical Documentation
Development
Demo Video
The demo shows:
- MCP server initialization
- Gradio interface in action
- Real research workflow execution
- Claude Desktop integration
- Report generation
Social Media
Share your thoughts about this project:
- X/Twitter: Share
- LinkedIn: Share
- Discord: Join the Hackathon Discord Community
Original Post: [Link to your social media post]
Testing
Manual Testing
# Test MCP server directly
python mcp_server.py
# In another terminal, send a test request:
echo '{"jsonrpc":"2.0","method":"initialize","params":{},"id":1}' | python -m json.tool
Test with Gradio Interface
python app_enhanced.py
# Try the example queries in the interface
Test Claude Desktop Integration
- Ensure MCP server is configured correctly
- Restart Claude Desktop
- Ask Claude to "search for..." or "research..."
- Monitor tool execution
Troubleshooting
MCP Server Won't Start
- Check Python version (3.9+ required)
- Verify all dependencies:
pip install -r requirements.txt - Check for syntax errors:
python -m py_compile mcp_server.py
Gradio Interface Issues
- Ensure port 7860 is available
- Try:
python app_enhanced.py --share - Check browser console for errors
Claude Desktop Integration Not Working
- Verify config file path and syntax
- Check the actual Python executable path
- Review Claude logs in
~/.config/Claude/logs/ - Restart Claude Desktop after configuration changes
Tool Execution Fails
- Check network connectivity (for actual APIs)
- Verify tool parameters match schema
- Review server logs for detailed errors
Hackathon Submission
Requirements Met
- Functioning MCP Server: Full JSON-RPC 2.0 implementation
- Multiple Tools: 4 integrated tools with clear specifications
- Gradio Interface: Modern Gradio 6 web application
- Claude Desktop Integration: Complete setup guide
- Demo Video: Shows server in action with client integration
- Documentation: Comprehensive guides and API docs
- Real-world Impact: Applicable for research, analysis, and content creation
Evaluation Criteria
- Design/UX: Polished Gradio 6 interface with responsive design
- Functionality: Full MCP protocol compliance and multi-tool orchestration
- Creativity: Novel approach to tool chaining and synthesis
- Documentation: Extensive guides and technical documentation
- Real-world Impact: Enterprise and consumer research applications
Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Anthropic - For creating the Model Context Protocol
- Hugging Face - For hosting and the Gradio framework
- Gradio Team - For Gradio 6 with enhanced capabilities
- MCP Community - For inspiration and support
Support
- Discord: Join the Hackathon Community
- Issues: GitHub Issues
- Email: your-email@example.com
Links
Project Status: Complete and Production-Ready
Last Updated: November 2025
Version: 1.0.0
Built for the MCP 1st Birthday Hackathon - Track 1: Building MCP