Enables configuration through environment variables, allowing users to set API keys and other settings
Provides an HTTP API client for accessing the MCP agent's functionality, including web search capabilities
Supports comprehensive testing of the MCP agent's functionality, including mocked API responses
MCP Agent
A production-ready research agent using the Model Context Protocol (MCP), FastAPI, and Serper web search.
Features
Async MCP server with web search tool (Serper API)
FastAPI client for HTTP access
Full test suite with pytest and Serper API mocking
Related MCP server: Search1API MCP Server
Setup
Clone the repo
Install dependencies:
pip install -r requirements.txtSet your Serper API key:
Create a
.envfile:SERPER_API_KEY=your_real_serper_api_key REQUEST_TIMEOUT=30 MAX_RESULTS=20 LOG_LEVEL=INFO
Usage
Start FastAPI client (runs MCP server as subprocess):
python -m client.fastapi_clientPOST /search for web search:
{ "query": "search term", "max_results": 10 }GET /health for health check
Testing
Run all tests:
pytest tests/test_e2e.py -vRun integration test (real Serper API):
pytest -m integration tests/test_e2e.py
MIT License
This server cannot be installed