answersearch
Integrates with Perplexity's API to provide search-grounded conversational answers, ranked web search results, analytical reasoning, and deep multi-source research using Perplexity's models.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
answersearch
answersearch puts Perplexity's models within reach of a terminal or an agent. You can put a question to a search-grounded model and get an answer with its sources, pull ranked web results on their own, hand a hard problem to the reasoning model, or commission a slower, deeper research pass that reads widely before it writes. It runs as a small CLI or as an MCP server, and it needs a Perplexity API key.
Setup
Get a key from the Perplexity API portal and export it:
export PERPLEXITY_API_KEY=<redacted>Without the variable set, every command and tool call fails with an
error that names PERPLEXITY_API_KEY — nothing is sent anywhere.
Related MCP server: Perplexity MCP Server
Install
npx @reneturcios/answersearch ask "what changed in the latest Node LTS?"Or run the container image:
docker run -i -e PERPLEXITY_API_KEY ghcr.io/cloudcorprecords/answersearchThe container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.
CLI
# Conversational answer grounded in live web search (sonar-pro)
answersearch ask "who won the marathon last weekend?"
# Ranked search results only, with optional budgets
answersearch search "composting basics" --max-results 5 --max-tokens 4000 --max-tokens-per-page 512
# Step-by-step reasoning (sonar-reasoning-pro)
answersearch reason "prove that the square root of two is irrational"
# Deep, multi-source research (sonar-deep-research) — this one takes a while
answersearch research "compare the failure modes of lithium and sodium batteries"
answersearch --versionSuccessful calls print the API's JSON response. Exit codes: 0 on
success, 1 when the API call fails (including a missing key), 2
for usage errors.
MCP server
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
npx -y @reneturcios/answersearch mcpMCP client configuration:
{
"mcpServers": {
"answersearch": {
"command": "npx",
"args": ["-y", "@reneturcios/answersearch", "mcp"],
"env": { "PERPLEXITY_API_KEY": "your-key-here" }
}
}
}Tools
Tool | Input | What it does |
|
| Conversational answer with live web search, via the |
|
| Direct call to the Search API; returns its ranked results and metadata as returned upstream. |
|
| Analytical reasoning via |
|
| Deep research via |
Tool results are the upstream JSON, pretty-printed as text. Upstream failures (bad key, quota, HTTP errors) come back as tool errors carrying the status and the API's own message.
Development
npm install
npm run build # tsc -> dist/
npm test # node test runner over test/*.test.ts, no network (fake fetch fixtures)
npm run dev # run the CLI from source via tsxLicense
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Enable AI assistants to perform web searches using Perplexity's Sonar Pro.
Real-time web search, reasoning, and research through Perplexity's API
Connect AI agents to Exa for web search, content fetching, and multi-step research.
Agent-native search engine with live web research optimized for AI agents.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides AI assistants with real-time web search, reasoning, and research capabilities through Perplexity's Sonar models and Search API. Supports quick searches, deep research, advanced reasoning, and direct web search with ranked results.422,729 npm2,598MIT
- FlicenseNot gradedqualityDmaintenanceIntegrates with Perplexity's API to provide web search and AI-powered answers with citations. Offers a three-tier research workflow: search for sources, ask for grounded AI answers, and ask_more for deeper analysis using advanced models.-
- FlicenseBqualityDmaintenanceEnables AI assistants to perform real-time web and academic searches using Perplexity's Sonar API.2-
- AlicenseAqualityDmaintenanceEnables web search and deep research using Perplexity Sonar models through MCP clients like Cursor or Claude Desktop.2MIT