Skip to main content

Installation

For Humans

Paste this into your AI agent (Claude Code, Cursor, etc.):

For AI Agents

Goal

Install AutoSearch and configure the MCP server so the user’s agent has access to 40 search channels across academic papers, developer platforms, Chinese social media, and more.

⚠️ Boundaries

  • DO NOT run commands with sudo unless the user explicitly approved
  • DO NOT modify system files outside the user’s home directory
  • If something requires elevated permissions, tell the user and let them decide

Step 1: Install AutoSearch

The npm package does not run init automatically during npm install. That is intentional: npm lifecycle scripts can execute code at install time, which is a known supply-chain risk. npx autosearch-ai triggers an explicit install + init flow with a y/N confirmation before fetching anything; the CI escape hatch is npx autosearch-ai --yes (do not put --yes in user-facing docs). Plain npm install -g autosearch-ai installs the wrapper but does not run init — use npx autosearch-ai for the one-shot flow, or run autosearch init if the Python CLI is already on PATH. The curl option runs autosearch init automatically.
This will:
  • Detect available LLM providers (Anthropic, OpenAI, Gemini, claude CLI)
  • Create ~/.autosearch/config.yaml
  • Auto-configure MCP clients. Claude Code uses claude mcp add when available; autosearch init --client claude --scope project writes project-bound .mcp.json.

Step 3: Check status

You’ll see a tiered report:

Optional: Unlock more channels

Ask the user which optional channels they want, then use these commands:

Chinese social media (TikHub auth)

If you use an AutoSearch TikHub proxy, configure the proxy URL and token instead. Together, AUTOSEARCH_PROXY_URL and AUTOSEARCH_PROXY_TOKEN satisfy TikHub channel availability without TIKHUB_API_KEY:

Xiaohongshu with your own account (no TikHub fee)

Twitter / X

Bilibili

YouTube


MCP server config

AutoSearch writes this automatically during init. For manual setup: Claude Code:
For project-bound config without the claude CLI, run:
That writes <project>/.mcp.json. Cursor (~/.cursor/mcp.json):

Updating


Troubleshooting

Channel returns empty results?
MCP server not found?
Xiaohongshu returns code=300011 (account restricted)? Your XHS account was flagged. Re-login with a normal, actively-used account: