MCP Search & Fetch
An MCP server exposing Ollama's web search and web fetch capabilities as tools.
Features
- web_search: Perform web searches using Ollama's hosted search API
- web_fetch: Fetch content from web pages
Requirements
- Ollama API key (get one from ollama.com)
Installation
# Clone the repository
git clone <repo-url>
cd mcp-search-and-fetch
# Install dependencies
pip install -r requirements.txt
# Copy environment sample
cp .env.sample .env
Edit .env with your Ollama API key:
OLLAMA_API_KEY=your_api_key_here
Usage
Local (stdio)
python mcp_search_and_fetch.py
HTTP Server
# Set port and host in .env
export MCP_SERVER_PORT=8000
export MCP_SERVER_HOST=0.0.0.0
python mcp_search_and_fetch.py
Docker
docker build -t mcp-search-fetch .
docker run -p 8000:8000 --env-file .env mcp-search-fetch
Configuration
| Environment Variable | Required | Default | Description |
|---|---|---|---|
OLLAMA_API_KEY |
Yes | - | Your Ollama API key |
MCP_SERVER_PORT |
No | - | Run HTTP server on specified port |
MCP_SERVER_HOST |
No | 127.0.0.1 | Host to bind to |
Tools
web_search(query, max_results=3)
Performs a web search and returns results as JSON.
web_fetch(url)
Fetches content from a URL and returns it as JSON.
Metadata
Release files for mcp-search-and-fetch 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_search_and_fetch-1.0.1.tar.gz | 3.7 kB | Without provenance | Details |
Release files / mcp_search_and_fetch-1.0.1.tar.gz
| Download URL | mcp_search_and_fetch-1.0.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4c6f27e940bfa2d7c1b5e14790a01606f6a87a96162bc4e8d1e0fa2c95dee5e
|
|
BLAKE2b-256 checksum How to use checksums |
2b260a09d61b0d608f777a1d3838b7f0c9b738eaee4e9e163ecffd90c15dad5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for mcp-search-and-fetch 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.