Perplexity Agent MCP
This MCP server integrates Perplexity AI's Sonar models into coding assistants to provide specialized research and fact-checking capabilities through two focused tools:
lookup Tool - Fetch precise, source-backed facts about API syntax, parameters, configuration keys, CLI flags, runtime compatibility, and package metadata without recommendations.
answer Tool - Perform comprehensive research to compare libraries, evaluate architecture trade-offs, plan migrations, debug complex issues, and make performance decisions with actionable recommendations backed by official sources.
Key Features:
Context-efficient design using only ~1.3K tokens to preserve your AI assistant's context window
Automatic model selection:
sonar-profor quick lookups,sonar-reasoning-profor deep researchCoding-specialized system prompts tailored for technical decision-making and fact extraction
Provides access to Perplexity AI through two tools: lookup for quick fact-checking and research queries, and answer for in-depth research with recommendations and comparisons
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Perplexity Agent MCPlookup the syntax for Python's asyncio.gather function"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Perplexity Agent MCP
An opinionated, coding-specialized, Model Context Protocol server that integrates Perplexity AI's Sonar models into AI coding assistants like Claude Code or Codex CLI. It's deliberately lean and adds very few tokens to your context. It provides two specialized tools—lookup for instant fact-checking of API syntax and documentation details, and answer for comprehensive research with actionable recommendations.
Setup
Install the published package globally:
npm install -g perplexity-agent-mcpThen add it to your Claude config file (~/.claude.json or ~/.config/claude/config.json):
"mcpServers": {
"perplexity": {
"command": "perplexity-agent-mcp",
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here"
}
}
}Restart Claude Code after saving, and you're ready to go.
How it works
The server exposes only two tools with concise descriptions (~1.3K tokens), keeping your context window lean and efficient:
lookup: Gets quick facts from documentation (like API syntax or config keys)
answer: Does deeper research to compare options and make recommendations
Under the hood, both tools are opinionated wrappers that call Perplexity API with coding-specialized system prompts. The lookup tool uses a compact fact‑extraction prompt focused on code/docs facts (see LOOKUP_SYSTEM_PROMPT in src/index.ts). The answer tool uses a technical decision/analysis prompt tailored for migrations and architecture choices (see ANSWER_SYSTEM_PROMPT in src/index.ts). The server also selects task‑appropriate Perplexity models—sonar-pro for lookups (see getLookupModel() in src/index.ts) and sonar-reasoning-pro for deeper research (see getAnswerModel() in src/index.ts).
Example AI agent prompt that will trigger AI agent to use this MCP and give you good results:
Please update the "foo" dependency to the latest version. Use Perplexity for the migration guide.Requirements
Node.js v24.0.0 or newer
A Perplexity API key
Testing hooks
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceProvides access to Perplexity AI models through two tools: ask\_perplexity for expert programming assistance and chat\_perplexity for maintaining ongoing conversations with context preservation.Last updatedMIT
- Alicense-qualityDmaintenanceProvides AI-powered search, research, and reasoning capabilities through integration with Perplexity.ai, offering three specialized tools: general conversational AI, deep research with citations, and advanced reasoning.Last updated362MIT
- Flicense-qualityDmaintenanceIntegrates 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.Last updated
- FlicenseBqualityDmaintenanceEnables AI assistants to perform real-time web and academic searches using Perplexity's Sonar API.Last updated2
Related MCP Connectors
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Give your agent live data from Twitter, Reddit, the web and GitHub. No API keys, no scraping stack.
Search your knowledge bases from any AI assistant using hybrid RAG.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jercik/perplexity-agent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server