Sponsored by Deepsite.site

MCP Hub Project

Created By
CodeHalwell6 months ago
Repo to hold the code for the mcp server built in Gradio for the agents and mcp hackathon
Content

MCP Hub Project

Overview

The MCP (Model Context Protocol) Hub is a sophisticated research assistant built using Gradio's MCP server functionality. This project demonstrates how to build a workflow of connected AI agents that work together to provide deep research capabilities.

The system orchestrates a 5-step deep research workflow:

  1. Question Enhancement: Breaks down a user's original query into five distinct sub-questions
  2. Web Search: Conducts web searches for each sub-question using Tavily API
  3. LLM Summarization: Summarizes search results for each sub-question using Nebius LLMs
  4. Citation Formatting: Extracts and formats citations from web search results
  5. Result Combination: Merges all summaries into a comprehensive final answer

Features

  • MCP Server Implementation: Built on Gradio's MCP server capabilities for seamless agent communication
  • Multi-Agent Architecture: Demonstrates how to build interconnected agent services
  • Real-time Web Search: Integration with Tavily API for up-to-date information
  • LLM Processing: Uses Nebius (OpenAI-compatible) models for text processing
  • Structured Workflow: Showcases a sophisticated multi-step AI research process
  • Citation Generation: Automatically formats APA-style citations from web sources

Prerequisites

  • Python 3.12+
  • API keys for:
    • Nebius API
    • Tavily API

Installation

  1. Clone this repository
  2. Create a virtual environment (recommended)
python -m venv venv
# Activate the virtual environment:
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
# or use the pyproject.toml with your preferred Python package manager
  1. Create a .env file with the following content:
NEBIUS_API_KEY=nb-...
TAVILY_API_KEY=tvly-...

Usage

Run the main application:

python main.py

This will launch the Gradio interface at http://127.0.0.1:7860/

The MCP schema will be available at http://127.0.0.1:7860/gradio_api/mcp/schema

Available Agents

The project includes several agent services:

  1. Question Enhancer: Splits a request into five sub-questions using Qwen3-32B-fast
  2. Web Search Agent: Performs web searches via Tavily API
  3. LLM Processor: Processes text with Nebius LLMs for summarization, reasoning, or keyword extraction
  4. Citation Formatter: Extracts URLs and formats them as APA-style citations
  5. Orchestrator: Coordinates all agents in a cohesive workflow

Tutorial Scripts

The tutorial_scripts/ directory contains example Gradio applications for learning:

  • simple_app.py: A basic Gradio interface
  • letter_count.py: A simple letter counting MCP server
  • And more examples demonstrating various Gradio and MCP features

MCP Implementation Details

This project demonstrates how to:

  • Create MCP-compatible function definitions with proper typing and docstrings
  • Launch a Gradio app as an MCP server (mcp_server=True)
  • Structure a multi-agent workflow
  • Pass data between agents in a structured format

License

[Your license information here]

Contributing

[Your contribution guidelines here]

Acknowledgments

  • Gradio for providing the MCP server functionality
  • Nebius for LLM capabilities
  • Tavily for web search capabilities
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
DeepChatYour AI Partner on Desktop
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp
Amap Maps高德地图官方 MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.