# Ninelayer — Full LLM Reference > MCP Search API for AI Agents. Authority-ranked results from the live web delivered via MCP. > https://ninelayer.in --- ## Overview Ninelayer is search infrastructure built for AI agents. Traditional search APIs return HTML pages intended for humans in browsers. Ninelayer returns structured, authority-ranked evidence packets: clean text, relevance scores, source metadata — everything a model needs, nothing it does not. It ships as an MCP server, so any MCP-compatible agent or framework can connect with three lines of JSON config and zero custom code. ## Problem it solves AI agents that rely on static training data go stale fast. They hallucinate version numbers, miss new APIs, and cannot reason about events after their cutoff. Ninelayer gives agents a live web connection with: - Real-time results (not cached training data) - Authority ranking (not raw keyword matches) - Structured output (not HTML with ads and nav chrome) - URL extraction (convert any URL to clean readable text) ## Architecture ``` Agent / LLM ──MCP──▶ Ninelayer MCP Server ──▶ Live Web Index │ ├── ninelayer_deep_search (multi-source web search) ├── ninelayer_get_url (URL → clean text) ├── academic_search (arXiv paper search) ├── project_search (workspace-aware search) └── project_write (save agent output) ``` ## MCP Tools ### ninelayer_deep_search Multi-source web search. Returns ranked snippets with title, URL, snippet, and source score. Parameters: - `query` (string, required) — the search query - `num_results` (integer, optional, default 10) — number of results ### ninelayer_get_url Fetches a URL and returns clean, readable text. Strips HTML boilerplate, ads, navigation. Parameters: - `url` (string, required) — the URL to fetch ### academic_search Searches the arXiv academic paper index. Parameters: - `query` (string, required) — research query - `max_results` (integer, optional, default 5) ### project_search Searches within the context of a configured project (useful for workspace-scoped RAG). ### project_write Saves structured agent output back to a project store. ## Integration ### Claude Code (claude.json / .mcp.json) ```json { "mcpServers": { "ninelayer": { "type": "http", "url": "https://mcp.ninelayer.in/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } } ``` ### Cursor Add to Cursor MCP settings (Settings → MCP → Add Server): - URL: https://mcp.ninelayer.in/mcp - Auth header: Authorization: Bearer YOUR_API_KEY ### Windsurf Add to ~/.windsurf/mcp_config.json: ```json { "mcpServers": { "ninelayer": { "serverUrl": "https://mcp.ninelayer.in/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } } ``` ### LangChain ```python from langchain_mcp_adapters.client import MultiServerMCPClient client = MultiServerMCPClient({ "ninelayer": { "url": "https://mcp.ninelayer.in/mcp", "transport": "streamable_http", "headers": {"Authorization": "Bearer YOUR_API_KEY"} } }) tools = await client.get_tools() ``` ### LlamaIndex ```python from llama_index.tools.mcp import MCPToolSpec spec = MCPToolSpec( server_url="https://mcp.ninelayer.in/mcp", headers={"Authorization": "Bearer YOUR_API_KEY"} ) tools = await spec.to_tool_list_async() ``` ## Performance benchmarks | Metric | Value | |---|---| | First-shot resolution rate | 97 % | | Context per query | < 1 500 tokens | | Search latency | < 2.5 s | | Average tool calls per task | 2.3 | | Snippet adoption rate | 80 % | ## Use cases ### Coding agents Give Claude Code, Cursor, and Windsurf access to current docs, changelogs, GitHub issues, and package release notes. Agents stay accurate on fast-moving APIs without retraining. ### RAG pipelines Replace stale vector embeddings with live retrieval. Use Ninelayer as a retrieval step in LangChain or LlamaIndex chains for always-fresh grounding. ### Research agents Multi-hop research: search → read → search again based on findings. Ninelayer's structured output makes it easy to chain searches without ballooning context. ### Support agents Ground customer-facing agents in live knowledge bases, updated documentation, and product changelogs — not stale training data. ### GTM agents Competitive intelligence, market research, news monitoring, prospect enrichment — all from live web data via MCP. ## Pricing | Plan | Price | Searches/month | |---|---|---| | Starter | $5 | 1 000 | | Pro | $29 | 10 000 | | Enterprise | custom | unlimited | ## Comparison | Feature | Ninelayer | Tavily | Exa | Serper | |---|---|---|---|---| | MCP-native | ✅ | ❌ | ❌ | ❌ | | Authority ranking | ✅ | partial | ✅ | ❌ | | URL extraction | ✅ | ✅ | ✅ | ❌ | | Academic search | ✅ | ❌ | partial | ❌ | | Structured output | ✅ | ✅ | ✅ | partial | | Token efficiency | ✅ high | medium | medium | low | ## FAQ **What is MCP?** The Model Context Protocol (MCP) is an open standard by Anthropic that lets AI agents connect to external tools and data sources via a uniform JSON-RPC interface. Ninelayer ships as an MCP server so any compatible agent can use it with zero custom integration code. **Does Ninelayer work with agents not using MCP?** Yes. The underlying search and extraction endpoints are standard HTTPS. MCP is the primary interface but you can call the REST API directly if your framework does not support MCP yet. **Is there a free tier?** There is a free playground at https://ninelayer.in/playground where you can test queries without an account. Paid plans start at $5/month. **How is Ninelayer different from Brave Search API or SerpAPI?** Those APIs return raw search result lists formatted for browser UIs. Ninelayer returns structured, authority-ranked evidence packets sized for model context windows — fewer tokens, higher signal, better first-shot accuracy. **Can I use Ninelayer for RAG grounding?** Yes. Ninelayer is designed for live retrieval in RAG pipelines. Use ninelayer_deep_search to retrieve fresh snippets and ninelayer_get_url to expand specific sources into full readable text. ## Links - Homepage: https://ninelayer.in - Recipes & docs: https://ninelayer.in/recipes - Blog: https://ninelayer.in/blog - Playground: https://ninelayer.in/playground - Pricing: https://ninelayer.in/pricing - Changelog: https://ninelayer.in/changelog - Use cases: - Coding agents: https://ninelayer.in/coding-agents - RAG engineers: https://ninelayer.in/rag-engineers - Research agents: https://ninelayer.in/research-agents - Support agents: https://ninelayer.in/support-agents - GTM agents: https://ninelayer.in/gtm-agents - Enterprise: https://ninelayer.in/enterprise