perplexity_ask
Ask a question and get a conversational answer backed by live web search, using the sonar-pro model.
messagesrequired
io.github.CloudCorpRecordsPublished by GitHub account CloudCorpRecordsv0.1.0Updated Nov 3, 2026
Perplexity answers: ask, search, reason, and deep research through the Sonar API.
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.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Follow the launch instructions in the repository.
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.
Get a key from the Perplexity API portal and export it:
Without the variable set, every command and tool call fails with an
error that names PERPLEXITY_API_KEY — nothing is sent anywhere.
Or run the container image:
The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.
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.
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
MCP client configuration:
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.
MIT — see LICENSE.
Source: README.md at commit 760dcf4
Ask a question and get a conversational answer backed by live web search, using the sonar-pro model.
messagesrequiredSearch the web directly through the Perplexity Search API and return ranked results with metadata.
queryrequiredmax_tokensmax_resultsmax_tokens_per_pageWork through a hard analytical problem step by step using the sonar-reasoning-pro model.
messagesrequiredRun an in-depth, multi-source research pass on a topic using the sonar-deep-research model.
messagesrequired90% 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.
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
export PERPLEXITY_API_KEY=<redacted>npx @reneturcios/answersearch ask "what changed in the latest Node LTS?"docker run -i -e PERPLEXITY_API_KEY ghcr.io/cloudcorprecords/answersearch# 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 --versionnpx -y @reneturcios/answersearch mcp{ "mcpServers": { "answersearch": { "command": "npx", "args": ["-y", "@reneturcios/answersearch", "mcp"], "env": { "PERPLEXITY_API_KEY": "your-key-here" } } }}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