Agno MCP Search
An MCP server that exposes an Agno agent with Google Gemini reasoning and Serper web search, enabling MCP-compatible clients like Claude Desktop to perform agent-driven web searches and receive synthesized answers.
README
Agno MCP Search
An MCP server that exposes an Agno agent with Google Gemini reasoning and Serper web search — usable from Claude Desktop, Cursor, or any MCP-compatible client, plus a local Streamlit UI for testing.
<p align="left"> <img src="https://img.shields.io/badge/python-3.10%2B-blue" alt="Python 3.10+" /> <img src="https://img.shields.io/badge/license-MIT-green" alt="MIT License" /> <img src="https://img.shields.io/badge/protocol-MCP-purple" alt="Model Context Protocol" /> <img src="https://img.shields.io/badge/agent-Agno-orange" alt="Agno" /> <img src="https://img.shields.io/badge/model-Gemini-red" alt="Gemini" /> <img src="https://img.shields.io/badge/status-alpha-yellow" alt="Alpha" /> </p>
Overview
Modern chat assistants like Claude and ChatGPT are powerful, but their knowledge is frozen at training time. This project bridges that gap by giving them a fresh, agent-driven search capability — delivered through the Model Context Protocol (MCP).
The MCP server exposes a single tool, search(query). Behind the tool sits an Agno agent that:
- Receives a natural-language query,
- Uses Serper to run a Google Search,
- Reasons over the top results with Google Gemini,
- Returns a markdown-formatted summary to the calling MCP client.
The same server is also drivable from a local Streamlit UI, which is handy for demos and debugging without needing an MCP client running.
Why this project exists
- Learn MCP by building it. MCP is quickly becoming the de-facto standard for tool-augmented LLM apps. A small, honest reference server is more useful than a giant framework demo.
- Prove the agent-in-tool pattern. Rather than exposing raw search results, the tool exposes an agent. The client asks a question; the server does the retrieval-and-reason loop and returns a synthesized answer.
- Stay swappable. Gemini, Serper, and Agno are all replaceable by design — the boundary is the
searchMCP tool, not the LLM or search vendor.
Architecture
flowchart LR
subgraph Client["MCP Client (Claude Desktop / Cursor / Streamlit UI)"]
UI[User query]
end
subgraph Server["FastMCP Server (agentic_mcp.server)"]
TOOL["search(query)"]
AGENT[Agno Agent]
GEMINI[[Gemini LLM]]
SERPER[[Serper Search]]
end
UI -- MCP call --> TOOL
TOOL --> AGENT
AGENT -- reasoning --> GEMINI
AGENT -- tool use --> SERPER
SERPER -- results --> AGENT
GEMINI -- answer --> AGENT
AGENT -- markdown --> TOOL
TOOL -- MCP response --> UI
Technology stack
| Layer | Library / Service | Purpose |
|---|---|---|
| Protocol | FastMCP | MCP server framework — exposes tools over stdio |
| Agent framework | Agno | Agent loop, tool orchestration, markdown formatting |
| LLM | Google Gemini | Reasoning and answer synthesis |
| Search | Serper | Google Search API |
| Local UI | Streamlit | Browser-based demo client |
| Config | python-dotenv | Loads secrets from .env |
| Test / lint | pytest, ruff | Test runner and linter |
Folder structure
agno-mcp-search/
├── agentic_mcp/ # Application package
│ ├── __init__.py
│ ├── config.py # Env loading & validation
│ ├── agent.py # Agno agent factory
│ ├── server.py # FastMCP server + search tool
│ └── ui/
│ └── streamlit_app.py # Streamlit demo UI
├── tests/ # pytest suite
│ ├── test_config.py
│ └── test_server.py
├── scripts/
│ └── verify_env.py # One-shot health checks
├── docs/
│ ├── Architecture.md
│ ├── MCP.md
│ └── Installation.md
├── screenshots/ # (add your captures here)
├── .github/workflows/ci.yml # Lint + test on every PR
├── .env.example
├── .gitignore
├── LICENSE # MIT
├── README.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── SECURITY.md
├── CHANGELOG.md
├── pyproject.toml # Modern packaging + tool config
├── requirements.txt
└── requirements-dev.txt
Installation
Prerequisites
- Python 3.10+
- A Google Gemini API key
- A Serper API key
- Optional: uv for faster installs
Setup with pip
# 1. Clone
git clone https://github.com/kishansri/agno-mcp-search.git
cd agno-mcp-search
# 2. Create a venv
python -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\Activate.ps1 # Windows PowerShell
# 3. Install (dev mode)
pip install -e ".[dev]"
# 4. Configure secrets
cp .env.example .env # macOS/Linux
Copy-Item .env.example .env # Windows PowerShell
# then edit .env and paste your keys
Setup with uv
git clone https://github.com/kishansri/agno-mcp-search.git
cd agno-mcp-search
uv venv
uv pip install -e ".[dev]"
cp .env.example .env
Environment variables
| Variable | Required | Default | Purpose |
|---|---|---|---|
GOOGLE_API_KEY |
Yes | — | Gemini access |
SERPER_API_KEY |
Yes | — | Serper Google Search |
GEMINI_MODEL_ID |
No | gemini-3.1-flash-lite |
Override the default Gemini model |
LOG_LEVEL |
No | INFO |
Log verbosity written to logs/mcp-server.log |
Running
1. Verify your setup
python scripts/verify_env.py all
This runs env, Gemini, Serper, and end-to-end Agno checks. It never prints your keys.
2. Run the MCP server
python -m agentic_mcp.server
# or, if installed via pip:
agentic-mcp
3. Run the Streamlit UI
streamlit run agentic_mcp/ui/streamlit_app.py
Open http://localhost:8501 and enter a query.
4. Install into Claude Desktop
fastmcp install claude-desktop agentic_mcp/server.py \
--with agno --with google-genai --with fastmcp --with python-dotenv \
--env-file .env
Restart Claude Desktop. The search tool will appear in the tool picker.
How the agent works
- Tool receives a query.
search(query: str)is invoked by the MCP client. - Input is validated. Empty or overly long queries are rejected before spending API credits.
- Agent runs the reasoning loop. Agno decides when to call Serper and how many times.
- Gemini synthesizes the answer. Search snippets are handed to Gemini for summarization.
- Result is returned as markdown. The MCP client renders it as-is.
Features
- ✅ Single-tool MCP server (
search) - ✅ Agno agent with Gemini reasoning + Serper search
- ✅ Streamlit local UI
- ✅ Fail-fast config validation
- ✅ Logging to file (stdout stays clean for MCP protocol)
- ✅ pytest suite with mocked external calls
- ✅ CI-ready (
.github/workflows/ci.yml)
Known limitations
- Single-agent design. No multi-agent planner/reviewer split (yet — see roadmap).
- No caching. Repeated queries re-hit Gemini and Serper.
- No RAG or memory. Every query is stateless.
- No auth on the MCP tool. Fine for local use; do not expose over the network without adding auth.
- Preview models may break. If you set
GEMINI_MODEL_IDto a preview alias and Google deprecates it, the tool will fail until you change the env var.
Roadmap
See CHANGELOG.md for released versions and docs/Architecture.md for planned multi-agent design.
Short version:
- v0.2 — Response caching, richer tool description, structured JSON output option.
- v0.3 — Optional Planner + Researcher + Reviewer multi-agent flow.
- v1.0 — Docker image, CI/CD, guardrails, observability.
Contributing
Contributions welcome. See CONTRIBUTING.md.
Security
Please read SECURITY.md before reporting vulnerabilities.
License
MIT — see LICENSE.
Screenshots
Screenshots live in screenshots/. Suggested captures:
- Streamlit UI with a sample query and response
- Claude Desktop showing the
searchtool available - Terminal running
verify_env.py allwith all green checks
Built with FastMCP · Agno · Gemini · Serper.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。