Answersearch

io.github.CloudCorpRecordsPublished by GitHub account CloudCorpRecordsv0.1.0Updated Nov 3, 2026

Perplexity answers: ask, search, reason, and deep research through the Sonar API.

VerifiedSTDIODesktop onlyWeb Search & ScrapingAI & ML

Overview

AI-generated overview

Wraps Perplexity's Sonar models so an assistant can ask search-grounded questions, pull ranked web results, reason step by step, or run deep research.

What you can do
  • Ask a question and get a conversational answer grounded in live web search
  • Search the web directly and return ranked results with metadata
  • Work through a hard analytical problem with a reasoning model
  • Run a slower, multi-source deep research pass on a topic
When to use it
Useful when you want the assistant to answer questions with current web information and sources, or to hand off heavier research and reasoning tasks to Perplexity's models instead of doing them inline.
Requirements
A Perplexity API key supplied in the PERPLEXITY_API_KEY environment variable; without it every call fails. Runs locally via npx (Node.js) or the Docker image, over stdio. Network access to the Perplexity API is required.
Before you install
Requires a paid Perplexity API key, and usage is billed by Perplexity; deep research calls take noticeably longer. Queries and message content are sent to Perplexity's API. Tool results are the upstream JSON passed through as text.

Installation

In SourceWeft

  1. Open Answersearch in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

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:

bash
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.

Install

bash
npx @reneturcios/answersearch ask "what changed in the latest Node LTS?"

Or run the container image:

bash
docker run -i -e PERPLEXITY_API_KEY ghcr.io/cloudcorprecords/answersearch

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

bash
# Conversational answer grounded in live web search (sonar-pro)answersearch ask "who won the marathon last weekend?"
# Ranked search results only, with optional budgetsanswersearch 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 whileanswersearch research "compare the failure modes of lithium and sodium batteries"
answersearch --version

Successful 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:

bash
npx -y @reneturcios/answersearch mcp

MCP client configuration:

json
{  "mcpServers": {    "answersearch": {      "command": "npx",      "args": ["-y", "@reneturcios/answersearch", "mcp"],      "env": { "PERPLEXITY_API_KEY": "your-key-here" }    }  }}

Tools

ToolInputWhat it does
perplexity_askmessages (array of {role, content}, required)Conversational answer with live web search, via the sonar-pro model on the chat-completions endpoint.
perplexity_searchquery (string, required), max_results, max_tokens, max_tokens_per_page (integers, optional)Direct call to the Search API; returns its ranked results and metadata as returned upstream.
perplexity_reasonmessages (required, same shape)Analytical reasoning via sonar-reasoning-pro.
perplexity_researchmessages (required, same shape)Deep research via sonar-deep-research; expect a longer wait than the other tools.

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

bash
npm installnpm 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 tsx

License

MIT — see LICENSE.

Source: README.md at commit 760dcf4

Tools

4

perplexity_ask

Ask a question and get a conversational answer backed by live web search, using the sonar-pro model.

Parametersmessagesrequired

perplexity_reason

Work through a hard analytical problem step by step using the sonar-reasoning-pro model.

Parametersmessagesrequired

perplexity_research

Run an in-depth, multi-source research pass on a topic using the sonar-deep-research model.

Parametersmessagesrequired

Version history

1
  1. v0.1.0LatestOct 31, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts