# MIAPI MCP server

> Provides AI-powered answers grounded in real-time web search with source citations and confidence scores.

- Repository: https://github.com/Doyukndr/miapi-python
- Page: https://hostedmcp.org/servers/doyukndr/miapi-python
- Transport: stdio
- Stars: 1
- License: MIT
- Latest version: 1.1.1

## Install

### Claude Code

```sh
claude mcp add --env 'MIAPI_API_KEY=<YOUR_MIAPI_API_KEY>' miapi-python -- uvx miapi-sdk
```

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

```json
{
  "mcpServers": {
    "miapi-python": {
      "command": "uvx",
      "args": [
        "miapi-sdk"
      ],
      "env": {
        "MIAPI_API_KEY": "<YOUR_MIAPI_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "miapi-python": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "miapi-sdk"
      ],
      "env": {
        "MIAPI_API_KEY": "<YOUR_MIAPI_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"miapi-python","type":"stdio","command":"uvx","args":["miapi-sdk"],"env":{"MIAPI_API_KEY":"<YOUR_MIAPI_API_KEY>"}}'
```

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

```json
{
  "mcpServers": {
    "miapi-python": {
      "command": "uvx",
      "args": [
        "miapi-sdk"
      ],
      "env": {
        "MIAPI_API_KEY": "<YOUR_MIAPI_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add miapi-python --env 'MIAPI_API_KEY=<YOUR_MIAPI_API_KEY>' -- uvx miapi-sdk
```

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

```toml
[mcp_servers.miapi-python]
command = "uvx"
args = ["miapi-sdk"]

[mcp_servers.miapi-python.env]
MIAPI_API_KEY = "<YOUR_MIAPI_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'MIAPI_API_KEY=<YOUR_MIAPI_API_KEY>' miapi-python uvx -- miapi-sdk
```

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

```json
{
  "mcpServers": {
    "miapi-python": {
      "command": "uvx",
      "args": [
        "miapi-sdk"
      ],
      "env": {
        "MIAPI_API_KEY": "<YOUR_MIAPI_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `MIAPI_API_KEY` | yes | yes | Your MIAPI API key. Free tier available at https://miapi.uk |

## FAQ

### Can I use MIAPI with the OpenAI client?

Yes, MIAPI is compatible with the OpenAI Python client by changing the base URL and using the miapi-grounded model.

### What tools are provided by the MCP server?

The MCP server provides web_answer, web_search, news_search, image_search, and check_usage tools.

### Can I restrict the search to specific websites?

Yes, you can use the search_domains option to restrict sources to specific domains like wikipedia.org.
