ai
Perplexity AI MCP, CLI, and Lua Integration for AI Agents
Perplexity AI integration docs for AI agents: MCP gateway setup, Perplexity AI CLI commands, Lua API reference, credentials, and function schemas.
4 functions 4 read 0 write API key auth
Perplexity AI for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
perplexity- route_slug
perplexity- package
perplexity- auth_strategy
api_keyAPI key- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Perplexity AI CLIHeadless setup and direct function calls. Perplexity AI MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Perplexity AI MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Perplexity AI.
Claude Code Perplexity AI MCP setup for Claude Code. Cursor Perplexity AI MCP setup for Cursor. Codex Perplexity AI MCP setup for Codex. OpenAI Agents Perplexity AI MCP setup for OpenAI Agents SDK. Claude Agent SDK Perplexity AI MCP setup for Claude Agent SDK. Vercel AI SDK Perplexity AI MCP setup for Vercel AI SDK. LangChain Perplexity AI MCP setup for LangChain. LangGraph Perplexity AI MCP setup for LangGraph. CrewAI Perplexity AI MCP setup for CrewAI. MCP clients Perplexity AI MCP setup for Generic MCP Clients.
Perplexity AI CLI Matrix
Use these pages for direct Perplexity AI CLI workflows in scripts, CI, cron, and agent wrappers.
CI Perplexity AI CLI for CI. Cron Jobs Perplexity AI CLI for cron jobs. Shell Scripts Perplexity AI CLI for shell scripts. Headless Automation Perplexity AI CLI for headless automation. Coding Agents Perplexity AI CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
perplexity.perplexity_chat | Read read | 8 | Send messages to Perplexity AI for a chat completion response. Supports multi-turn conversations with message history. Returns the assistant response with optional citations and search results. |
perplexity.perplexity_ask | Read read | 8 | Ask Perplexity AI a question and get a concise answer with cited sources. Best for factual queries, research, and knowledge questions. |
perplexity.perplexity_list_models | Read read | 0 | List all available Perplexity AI models. Returns model IDs and their capabilities for use in chat and ask tools. |
perplexity.perplexity_get_current_user | Read read | 0 | Get information about the currently authenticated Perplexity API user, including account details and usage. |