Provides AI-powered answers grounded in real-time web search with source citations and confidence scores.
Also known as Doyukndr/miapi-python, miapi-python, miapi-sdk
- Stars
- 1
- Tools
- —
- Downloads, 30 days
- 272
- Latest version
- 1.1.1
- Last commit
- Aug 29, 2026
- License
- MIT
What is MIAPI MCP?
MIAPI provides AI-powered answers grounded in real-time web search with source citations and confidence scores.
Summary generated from the project's README
About MIAPI MCP server
Retrieving real-time web information with verifiable citations is what MIAPI enables for developers using AI assistants. This MCP server allows tools like Claude Desktop, Cursor, or Windsurf to access live web data, news, and images to ground their responses in current facts. Users connect by installing the miapi-sdk and configuring their assistant with a MIAPI_API_KEY in their MCP settings.
Developers can utilize specific tools including web_answer for grounded responses, web_search for raw results, news_search for recent articles, and image_search for visual content. The server also provides a check_usage tool to monitor monthly query limits and account tiers. It is designed to provide transparency through confidence scores and source markers, ensuring that the information provided to the AI client is traceable to specific URLs.
What you can do with it
- 1Search for recent newsRequest the latest articles on a specific topic to keep an AI assistant updated on current events.
- 2Find specific imagesInstruct an AI to find and retrieve image URLs based on a text description.
- 3Monitor API consumptionCheck how many queries have been used against the monthly limit within the assistant interface.
Written from the project's README. Every use case is checked against a quote from it.
How to install MIAPI MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall MIAPI MCP in Claude Code
$ claude mcp add --env 'MIAPI_API_KEY=<YOUR_MIAPI_API_KEY>' miapi-python -- uvx miapi-sdkInstall MIAPI MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"miapi-python": {
"command": "uvx",
"args": [
"miapi-sdk"
],
"env": {
"MIAPI_API_KEY": "<YOUR_MIAPI_API_KEY>"
}
}
}
}Install MIAPI MCP in VS Code
.vscode/mcp.json
{
"servers": {
"miapi-python": {
"type": "stdio",
"command": "uvx",
"args": [
"miapi-sdk"
],
"env": {
"MIAPI_API_KEY": "<YOUR_MIAPI_API_KEY>"
}
}
}
}Install MIAPI MCP in VS Code CLI
$ code --add-mcp '{"name":"miapi-python","type":"stdio","command":"uvx","args":["miapi-sdk"],"env":{"MIAPI_API_KEY":"<YOUR_MIAPI_API_KEY>"}}'Install MIAPI MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"miapi-python": {
"command": "uvx",
"args": [
"miapi-sdk"
],
"env": {
"MIAPI_API_KEY": "<YOUR_MIAPI_API_KEY>"
}
}
}
}Install MIAPI MCP in Codex
$ codex mcp add miapi-python --env 'MIAPI_API_KEY=<YOUR_MIAPI_API_KEY>' -- uvx miapi-sdkInstall MIAPI MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.miapi-python] command = "uvx" args = ["miapi-sdk"] [mcp_servers.miapi-python.env] MIAPI_API_KEY = "<YOUR_MIAPI_API_KEY>"
Install MIAPI MCP in Gemini CLI
$ gemini mcp add -s user -e 'MIAPI_API_KEY=<YOUR_MIAPI_API_KEY>' miapi-python uvx -- miapi-sdkInstall MIAPI MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"miapi-python": {
"command": "uvx",
"args": [
"miapi-sdk"
],
"env": {
"MIAPI_API_KEY": "<YOUR_MIAPI_API_KEY>"
}
}
}
}Configuration
MIAPI_API_KEYRequiredSecretYour MIAPI API key. Free tier available at https://miapi.uk
| Name | Description | |
|---|---|---|
| MIAPI_API_KEY | Your MIAPI API key. Free tier available at https://miapi.uk | RequiredSecret |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachabledoyukndr/miapi-python is public and reachablegithub.com/doyukndr/miapi-python ↗Pass
- Package names this repository as its sourcemiapi-sdk names doyukndr/miapi-python as sourcepypi.org/project/miapi-sdk/ ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-08-29github.com/doyukndr/miapi-python ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from miapi-sdkPass
- No critical advisory in the package or its dependencies6 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubMIAPI — Grounded AI Answers API
Official Python client for MIAPI — get AI-powered answers grounded in real-time web search.
Install
pip install miapi-sdk
Quick Start
from miapi import MIAPI
client = MIAPI("YOUR_API_KEY")
# Get a grounded answer with citations
result = client.answer("What is quantum computing?", citations=True)
print(result.answer) # AI-generated answer with [1][2] markers
print(result.sources) # List of source URLs
print(result.confidence) # 0.0 - 1.0
Features
Web-Grounded Answers
result = client.answer("Who won the last World Cup?")
print(result.answer)
Knowledge Mode — Answer From Your Data
result = client.answer(
"What is the return policy?",
mode="knowledge",
knowledge="Returns accepted within 30 days with receipt..."
)
print(result.answer)
Search Only — Raw Results
sources = client.search("latest AI research papers")
for source in sources:
print(source.title, source.url)
News Search
news = client.news("technology", num_results=5)
for article in news:
print(article.title, article.date)
Image Search
images = client.images("golden retriever")
for img in images:
print(img.url, img.width, img.height)
Streaming
for event in client.stream("Explain quantum computing"):
if event['type'] == 'answer':
print(event['content'], end='', flush=True)
elif event['type'] == 'done':
print(f"\nDone in {event.get('query_time_ms')}ms")
Check Usage
info = client.usage()
print(f"Used {info.queries_this_month}/{info.monthly_limit} this month")
print(f"Tier: {info.tier}")
Custom Options
result = client.answer(
"Compare Python and Rust",
response_format="markdown", # text, short, json, markdown
temperature=0.5, # 0.0 (precise) to 1.0 (creative)
max_tokens=800, # Max answer length
language="French", # Answer in any language
search_domains=["wikipedia.org"], # Restrict sources
system_prompt="Answer like a professor",
)
Error Handling
from miapi import MIAPI, MIAPIError, RateLimitError, AuthenticationError
client = MIAPI("YOUR_API_KEY")
try:
result = client.answer("Hello")
except AuthenticationError:
print("Bad API key")
except RateLimitError as e:
print(f"Rate limited: {e.message}")
except MIAPIError as e:
print(f"Error: {e.message} (HTTP {e.status_code})")
OpenAI Drop-in Replacement
MIAPI is also compatible with the OpenAI Python client:
from openai import OpenAI
client = OpenAI(
api_key="YOUR_MIAPI_KEY",
base_url="https://api.miapi.uk/v1"
)
response = client.chat.completions.create(
model="miapi-grounded",
messages=[{"role": "user", "content": "What is AI?"}]
)
print(response.choices[0].message.content)
Get Your API Key
Sign up free at miapi.uk — 500 queries/month included.
Links
Use from Claude Desktop, Cursor or Windsurf (MCP)
MIAPI ships an MCP server, so an AI assistant can search the web and get answers with real citations without you writing any code.
pip install "miapi-sdk[mcp]"
Then add it to your assistant's MCP config:
{
"mcpServers": {
"miapi": {
"command": "miapi-mcp",
"env": { "MIAPI_API_KEY": "your_key_here" }
}
}
}
Tools it provides: web_answer, web_search, news_search, image_search,
check_usage.
Get a key at https://miapi.uk — free tier included.
MIAPI MCP questions
How do I add MIAPI MCP to Claude Code?
Run claude mcp add --env 'MIAPI_API_KEY=<YOUR_MIAPI_API_KEY>' miapi-python -- uvx miapi-sdk in your terminal. Add --scope user to make it available in every project.
How do I add MIAPI MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
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.