# tinysearch MCP server

> Performs self-hosted web research by searching, crawling, and reranking web content to provide compact, token-efficient evidence to AI agents.

- Repository: https://github.com/MarcellM01/TinySearch
- Page: https://hostedmcp.org/servers/marcellm01/tinysearch
- Transport: stdio
- Stars: 236
- License: MIT
- Latest version: 0.4.0

## Install

### Claude Code

```sh
claude mcp add tinysearch -- docker run -i --rm docker.io/marcellm01/tinysearch:v0.4.0
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "tinysearch": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/marcellm01/tinysearch:v0.4.0"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "tinysearch": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/marcellm01/tinysearch:v0.4.0"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"tinysearch","type":"stdio","command":"docker","args":["run","-i","--rm","docker.io/marcellm01/tinysearch:v0.4.0"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "tinysearch": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/marcellm01/tinysearch:v0.4.0"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add tinysearch -- docker run -i --rm docker.io/marcellm01/tinysearch:v0.4.0
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.tinysearch]
command = "docker"
args = ["run", "-i", "--rm", "docker.io/marcellm01/tinysearch:v0.4.0"]
```

### Gemini CLI

```sh
gemini mcp add -s user tinysearch docker -- run -i --rm docker.io/marcellm01/tinysearch:v0.4.0
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "tinysearch": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/marcellm01/tinysearch:v0.4.0"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `MCP_TRANSPORT` | no | no | MCP transport to serve: stdio (default), sse, or streamable-http. |
| `OTEL_EXPORTER_OTLP_ENDPOINT` | no | no |  |
| `OTEL_EXPORTER_OTLP_PROTOCOL` | no | no |  |
| `OTEL_SERVICE_NAME` | no | no |  |
| `SEARXNG_URL` | no | no | SearXNG search endpoint URL. Only needed if not using the bundled Compose SearXNG service. |
| `TINYSEARCH_CONFIG_PATH` | no | no | Path to a tinysearch_config.json inside the container, for overriding search/embedding defaults. |
| `TINYSEARCH_EMBEDDING_BACKEND` | no | no | Embedding implementation: onnx (default) or openai_compatible. |
| `TINYSEARCH_EMBEDDING_MODEL` | no | no | Local ONNX preset (fast, balanced, quality) or a Hugging Face ONNX repository id. |

## FAQ

### Do I need a paid search API key to use TinySearch?

No, TinySearch can search through DuckDuckGo (DDGS) without requiring a paid search provider by default.

### Does TinySearch rewrite or summarize the web pages it finds?

No, it is a retrieval tool rather than a summarization tool; it selects original, unedited page text chunks using local BM25 and embedding reranking.

### Can I run TinySearch locally?

Yes, it supports local retrieval using ONNX embeddings and hybrid reranking that run on your machine.
