Self-hosted search gateway for AI agents. Unified search, news and page extraction with provider fallback. REST API, MCP server and TypeScript library.
MCPpedia last refreshed this data
Search2ai is an MCP server that self-hosted search gateway for AI agents. Unified search, news and page extraction with provider fallback. REST API, MCP server and TypeScript library. Its tool list has not been published yet over stdio, sse and http, requires no API key, and scores 91/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"search2ai": {
"env": {
"SEARCH1API_KEY": "your_provider_key"
},
"args": [
"-y",
"search2ai",
"mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A self-hosted search gateway for AI agents and AI clients.
This server supports HTTP transport. Be the first to test it - help the community know if it works.
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked search2ai against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in developer-tools / ai-ml
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
Manage Supabase projects — databases, auth, storage, and edge functions
MCP server for using the GitLab API
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
MCP Security Weekly
Get CVE alerts and security updates for Search2ai and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
English · 简体中文
A self-hosted search gateway for AI agents and AI clients.
Connect the search and page extraction services you configure through MCP, an HTTP API, or a JavaScript / TypeScript library. When a provider is rate limited, times out, or fails, the gateway tries the next one in your configured order and reports which service answered and why others failed.
Search endpoints return structured results and page content for your agent or application to use. An optional chat proxy also lets models that support tool calling search the web while answering.
title, url, snippet, and optional fields such as date and content.search, news, and crawl, depending on the configured providers.Looking for hosted search? Search1API is this project's companion hosted service for search, news, and page extraction. Use its API directly or configure it as a search2ai provider. It also offers hosted compatible APIs to help existing integrations switch with minimal changes. The examples below use Search1API; you can choose any other supported provider.
Website · Quick start · Choose an integration · Providers and configuration · HTTP API · API / SDK compatibility · Deployment · Chat proxy · Upgrading · Development and contributing
The local CLI and npm package require Node.js ≥ 22.18. Configure at least one provider that supports the operation you need. In the current version, search requests return 503 when no search provider is configured.
Create .env in your working directory with your search provider key:
SEARCH1API_KEY=your_provider_key
Start a local HTTP service:
npx -y search2ai serve --host 127.0.0.1
Search from another terminal:
curl http://localhost:3014/v1/search \
-H 'Content-Type: application/json' \
-d '{"query":"hono cloudflare workers","max_results":3}'
The response's results contain titles, URLs, and excerpts. This calls only the search provider and needs no model API key. The same service exposes /v1/news, /v1/crawl, and the remote MCP endpoint /mcp.
The CLI reads .env.local and .env from its working directory. Existing environment variables take priority, followed by .env.local, then .env. See .env.template for the full configuration template.
| Your use case | Integration | Who calls the model |
|---|---|---|
| Give AI clients such as Claude Desktop or Cursor search tools | Local or remote MCP | The AI client |
| Supply search data to your agent, script, or backend | HTTP API or library | Your application, if needed |
| Add web access to a chat client with a custom API base URL | Optional chat proxy | search2ai calls your configured model upstream |
For clients using the mcpServers configuration format, add:
{
"mcpServers": {
"search2ai": {
"command": "npx",
"args": ["-y", "search2ai", "mcp"],
"env": {
"SEARCH1API_KEY": "your_provider_key"
}
}
}
}
Th