Research of MCP
概览
A simple app that shows how Model Context Protocol (MCP) works with FastAPI and Gradio (because i am not a dev who enjoys Streamlit headaches). This project demonstrates a basic MCP server with a Gradio frontend (Streamlit was a headache, and life's too short for unnecessary pain). Users can chat with AI models through what marketing people would call a "simple interface" and what developers know as "the best I could do before I moveon 🥲 ." - : FastAPI + MCP Python SDK (a match made in heaven, unlike pineapple on pizza) - : Gradio (because pretty buttons make dopamine go brrr) - : Google Gemini API (not the horoscope sign, the sundar pichai's AI AI AI AI AI AI thingy) ⚠️ - The citation tool is not working properly at the moment. You may see errors when trying to analyze paper citations or when using some of the advanced search features. I am working on fixing this issue. When will it be fixed? Who knows ¯\(ツ)\/¯. Maybe when we have AGI.
README
以下为原文 README 节选,完整内容请查看原文。
Basic MCP Application
A simple app that shows how Model Context Protocol (MCP) works with FastAPI and Gradio (because i am not a dev who enjoys Streamlit headaches).
Overview
This project demonstrates a basic MCP server with a Gradio frontend (Streamlit was a headache, and life’s too short for unnecessary pain). Users can chat with AI models through what marketing people would call a “simple interface” and what developers know as “the best I could do before I moveon 🥲 .”
Technology Stack
- Backend: FastAPI + MCP Python SDK (a match made in heaven, unlike pineapple on pizza)
- Frontend: Gradio (because pretty buttons make dopamine go brrr)
- AI Integration: Google Gemini API (not the horoscope sign, the sundar pichai’s AI AI AI AI AI AI thingy)
Known Issues
⚠️ Please Note
- The citation tool is not working properly at the moment. You may see errors when trying to analyze paper citations or when using some of the advanced search features. I am working on fixing this issue. When will it be fixed? Who knows ¯\_(ツ)_/¯. Maybe when we have AGI.
- Semantic Scholar API has rate limitations, which may cause the search functionality to sometimes return an error message stating “I cannot directly search for and provide you with papers.” This is what happens when free APIs meet enthusiastic users - we love them to death. Just wait a bit and try again (or distract yourself with coffee while the rate limits reset).
Speed Up Your Setup
This project works great with uv, a super fast Python package installer! Instead of waiting for pip to finish sometime next century, you can use uv to install dependencies in seconds. I highly recommend this for a smoother experience (and to reclaim hours of your life staring at progress bars).
Quick Start
What You’ll Need
- Python 3.11 or newer (sorry dinosaurs still using Python 2)
- pip package manager (or its cooler, faster cousin
uv) - The patience of a RCB (Google them) (optional but recommended)
Setup Steps
-
Clone this project:
git clone https://github.com/yourusername/basic-mcp-app.git cd basic-mcp-app -
Create a virtual environment (because global dependencies are the path to emotional damage):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install required packages:
Using pip (the tortoise way):
pip install -r requirements.txtUsing uv (the hare way that actually wins the race):
# Install uv first if you don't have it curl -LsSf https://astral.sh/uv/install.sh | shor
pip install uvThen install dependencies with uv:
uv pip install -r requirements.txt
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →