# Ollama Web Tools Mcp

> Claude Code MCP server for web search and fetch. Supports Ollama's hosted API instance.

- **Type:** MCP server
- **Install:** `agentstack add mcp-chakkritte-ollama-web-tools-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [chakkritte](https://agentstack.voostack.com/s/chakkritte)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [chakkritte](https://github.com/chakkritte)
- **Source:** https://github.com/chakkritte/ollama-web-tools-mcp

## Install

```sh
agentstack add mcp-chakkritte-ollama-web-tools-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# ollama-web-tools-mcp

A Claude Code MCP server that exposes web search and web fetch tools powered by **Ollama's hosted API**.

> **Note:** This is an **MCP server** (external process), not a Claude Code plugin (internal skill). It runs as a separate process and communicates with Claude Code over stdio. It cannot be installed via `claude plugin install` — instead, you install it as a Python package and register it in Claude Code's MCP config.

## Installation

### From GitHub

```bash
pip install git+https://github.com/chakkritte/ollama-web-tools-mcp.git
ollama-web-tools-configure
```

### From Local Clone

```bash
git clone https://github.com/chakkritte/ollama-web-tools-mcp.git
cd ollama-web-tools-mcp
pip install -e .
ollama-web-tools-configure
```

## First-Time Setup

When you run `ollama-web-tools-configure` for the first time, it will:

1. **Prompt for your Ollama API key** — Guides you to get a free key from https://ollama.com/settings/keys and paste it. The key is **hidden while typing** (like a password).
2. **Write Claude Code config** — Automatically registers the server in `~/.claude/claude_code_config.json` using the exact Python interpreter that ran the configure script.
3. **Tell you to restart Claude Code** — The tools will appear after restart.

### Pass API key directly (non-interactive)

If you already have your key, you can pass it as an argument to skip the prompt:

```bash
ollama-web-tools-configure your_api_key_here
```

The key is masked in output (e.g., `4****O`).

## Manual Setup

If you prefer not to use the automatic setup script:

1. Get a free API key at https://ollama.com/settings/keys
2. Add the server to `~/.claude/claude_code_config.json`:
   ```json
   {
     "mcpServers": {
       "ollama-web-tools": {
         "type": "stdio",
         "command": "/ABSOLUTE/PATH/TO/python",
         "args": ["-m", "ollama_web_tools_mcp"],
         "env": {
           "OLLAMA_API_KEY": "your_key_here"
         }
       }
     }
   }
   ```
   Use the full path to the Python interpreter from the environment where the package is installed (e.g. a conda env or virtualenv). This avoids PATH issues when Claude Code launches the server from a different context.
3. Restart Claude Code.

> **Tip:** If you run `which python` in the terminal where you installed the package, use that exact path as the `command`.

## Environment

The server reads all configuration from environment variables passed by the MCP harness (via the `env` block in `claude_code_config.json`).

| Variable | Required | Description |
|----------|----------|-------------|
| `OLLAMA_API_KEY` | Yes | API key from https://ollama.com/settings/keys |

## Tools

- `web_search` — Search the web using Ollama's hosted API.
- `web_fetch` — Fetch a webpage using Ollama's hosted API.

## Troubleshooting

### "OLLAMA_API_KEY not set" error

The server always starts and registers its tools, even if credentials are missing. If you see this error when Claude Code tries to use a tool, it means the `env` block in your `claude_code_config.json` is missing or the key is empty. Re-run `ollama-web-tools-configure` to fix it.

### Tools don't appear in Claude Code

1. Check that `~/.claude/claude_code_config.json` has an `mcpServers.ollama-web-tools` entry.
2. Restart Claude Code after any config change.
3. Make sure the `command` path is the full absolute path to the Python interpreter where you installed the package.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [chakkritte](https://github.com/chakkritte)
- **Source:** [chakkritte/ollama-web-tools-mcp](https://github.com/chakkritte/ollama-web-tools-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-chakkritte-ollama-web-tools-mcp
- Seller: https://agentstack.voostack.com/s/chakkritte
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
