perplexity-retrieval-mcp-golang
Facilitates real-time knowledge acquisition by interfacing Language Models with the Perplexity search service via the Model Context Protocol (MCP), enabling the fetching of current web data and associated follow-up inquiries.
Author

chenxilol
Quick Info
Actions
Tags
Perplexity Information Retrieval MCP Server
This package provides a Go language implementation for a Perplexity Search MCP endpoint, allowing Large Language Models (LLMs) to query the external Perplexity search API leveraging the Model Context Protocol (MCP).
Core Functionality
- perplexity_search: Executes web lookups and returns findings, complete with source citations.
- Arguments:
query(string, mandatory): The subject string for the web investigation.search_recency_filter(string, optional): Temporal constraint for results selection (month,week,day,hour).max_tokens(integer, optional): Cap on the output token count.temperature(number, optional, default: 0.2): Parameter governing response variability.top_p(number, optional, default: 0.9): Nucleus sampling cutoff value.search_domain_filter(array, optional): A collection of specific domains to confine the search scope.return_images(boolean, optional): Flag to include URLs for associated imagery.return_related_questions(boolean, optional): Flag to fetch suggested subsequent queries.top_k(number, optional, default: 0): Integer defining the top-k token count for selection.stream(boolean, optional): Activates incremental, chunked result delivery.presence_penalty(number, optional, default: 0): Modifier for introducing novel concepts in the response.frequency_penalty(number, optional, default: 1): Modifier to suppress overly repetitive phrasing.web_search_options(object, optional): Additional settings object for fine-tuning the web search operation.
Deployment Guide
Automated Integration via Smithery
Install the Perplexity Search Golang module for Claude Desktop automatically using Smithery:
npx -y @smithery/cli install @chenxilol/perplexity-mcp-go --client claude
Prerequisites Checklist
- A functional installation of the Go programming language (version 1.23 or newer).
- A valid API credential issued by Perplexity.
Local Installation Steps
- Obtain the source code repository:
git clone https://github.com/chenxilol/perplexity-mcp-go.git
cd perplexity-mcp-go
- Compile the executable binary:
go build -o perplexity-search-mcp
Operationalizing the Server
- Establish the necessary environment variable for authentication:
export PERPLEXITY_API_KEY="your-api-key-here"
- Initiate the server process:
./perplexity-search-mcp
Integration with Claude Interface
- Transfer the provided configuration file,
claude_desktop_config.json, to the designated configuration folder for your Claude application: - Windows Systems:
%USERPROFILE%\AppData\Roaming\Claude\claude_desktop_config.json - macOS Systems:
~/Library/Application Support/Claude/claude_desktop_config.json -
Linux Systems:
~/.config/Claude/claude_desktop_config.json -
Modify the configuration file to incorporate the server reference and API key embedding:
{
"mcpServers": {
"perplexity-search": {
"command": "/path/to/perplexity-search-mcp",
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here"
}
}
}
}
Containerization Support (Docker)
- Build the custom Docker artifact:
docker build -t perplexity-search-mcp:latest .
- Launch the containerized service, injecting the required secret:
docker run -i --rm -e PERPLEXITY_API_KEY=your-api-key-here perplexity-search-mcp:latest
Practical Demonstration
Once setup is complete, Claude can invoke the perplexity_search capability through the MCP framework to perform live data lookups.
Illustrative invocation with customized parameters:
{
"query": "latest AI research developments",
"search_recency_filter": "week",
"temperature": 0.5,
"return_related_questions": true,
"web_search_options": {
"search_context_size": "high"
}
}
Debugging Tips
Should operational difficulties arise, perform the following checks: 1. Confirm the correct configuration and accessibility of the API credential. 2. Verify stable network connectivity to external services. 3. Review the standard error (stderr) output stream for diagnostic messages.
Legal Notice
This software is distributed under the terms of the MIT License; refer to the included [LICENSE] file for exhaustive details.
Recognition
- Gratitude extended to the creators of the Model Context Protocol for defining the interface specification.
- Acknowledgment to MCP-Go for the foundational Go MCP library.
- Thanks to Perplexity for offering their powerful search Application Programming Interface (API).
WIKIPEDIA: A search engine is a software system that provides hyperlinks to web pages, and other relevant information on the Web in response to a user's query. The user enters a query in a web browser or a mobile app, and the search results are typically presented as a list of hyperlinks accompanied by textual summaries and images. Users also have the option of limiting a search to specific types of results, such as images, videos, or news. For a search provider, its engine is part of a distributed computing system that can encompass many data centers throughout the world. The speed and accuracy of an engine's response to a query are based on a complex system of indexing that is continuously updated by automated web crawlers. This can include data mining the files and databases stored on web servers, although some content is not accessible to crawlers. There have been many search engines since the dawn of the Web in the 1990s; however, Google Search became the dominant one in the 2000s and has remained so. As of May 2025, according to StatCounter, Google holds approximately 89–90 % of the worldwide search share, with competitors trailing far behind: Bing (~4 %), Yandex (~2.5 %), Yahoo! (~1.3 %), DuckDuckGo (~0.8 %), and Baidu (~0.7 %). Notably, this marks the first time in over a decade that Google's share has fallen below the 90 % threshold. The business of websites improving their visibility in search results, known as marketing and optimization, has thus largely focused on Google.
== Timeline of Development ==
=== Before 1990 === In 1945, Vannevar Bush conceptualized an information access framework intended to put a vast body of knowledge within reach of a single user at a workstation, which he termed a memex. He elaborated on this concept in his essay titled "As We May Think" published in The Atlantic Monthly. The memex was envisioned to empower the user to circumvent the increasing difficulty associated with locating data within expanding, centralized catalogs of scientific output. Vannevar Bush imagined interconnected scholarly archives featuring associated notes, concepts now analogous to hypertext links. Link analysis ultimately evolved into a critical component within information retrieval systems through the application of algorithmic approaches such as Hyper Search and PageRank.
=== The 1990s: Emergence of Search Systems === The inaugural internet search utilities existed before the formal introduction of the World Wide Web in December 1990: WHOIS user lookup mechanisms trace back to 1982, and the Knowbot Information Service, designed for multi-network user searches, was first deployed in 1989. The primary documented search utility capable of indexing content files, specifically FTP archives, was Archie, which became operational on September 10, 1990. Before September 1993, the entirety of the World Wide Web relied on manual indexing. Tim Berners-Lee maintained a curated registry of web servers hosted on CERN's infrastructure. A preserved instance of this register from 1992 exists, but the exponential growth in active web servers rendered the centralized catalog unmanageable. On the NCSA portal, new server additions were announced under the section "What's New!". The inaugural
