Enable web search with MCP
hrida-agent-sdk can search the web through the Perplexity MCP server. You register the server in ~/.hrida.json, then allow its tools in ~/.hrida-agent-sdk/settings.json.
Edit these files on the machine AI Labs runs on, using AI Labs' built-in terminal or file browser. Install hrida-agent-sdk and configure a provider first.
Prerequisites
- A Perplexity API key (
pplx-...). Create one in your Perplexity account under Settings → API. - Node.js and npm, so
npxcan download and start the MCP server.
~/.hrida.json stores the key in plain text. Don't share or commit the file, and don't paste the key into chats or docs.
1. Register the Perplexity server
Open /home/cptr/.hrida.json. It already has an empty "mcpServers": {} entry. Fill it in, replacing pplx-your-key-here with your key:
"mcpServers": {
"perplexity": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@perplexity-ai/mcp-server"],
"env": {
"PERPLEXITY_API_KEY": "pplx-your-key-here"
}
}
}Only change the mcpServers entry. Leave the rest of the file as it is.
2. Allow the Perplexity tools
Open /home/cptr/.hrida-agent-sdk/settings.json and add:
"permissions": {
"allow": ["mcp__perplexity"]
},mcp__perplexity allows every tool from the perplexity server, so the agent can search without asking each time.
- If the file already has a
"permissions"block, add"mcp__perplexity"to its existing"allow"list instead of adding a second block. - Keep the file valid JSON: entries are separated by commas, and the last entry before a closing
}has no trailing comma.
3. Restart and check
Exit hrida-agent-sdk (/exit) and start it again, then run:
/mcpperplexity should be listed as connected. You can also check from the terminal:
hrida-agent-sdk mcp listThen try a search, for example: "Search the web for the latest Node.js LTS version."
Start a new chat in AI Labs to use web search with the hrida-agent-sdk agent.
Other servers you can connect
Any MCP server can be added the same way: add an entry inside mcpServers in ~/.hrida.json, allow it with mcp__<name> in settings.json, then restart.
Web search and browsing
| Server | What it adds | API key |
|---|---|---|
brave-search | Web, news, image, and local search through Brave | BRAVE_API_KEY |
tavily | Search and page extraction built for AI agents | TAVILY_API_KEY |
exa | Semantic web search, company and code search | EXA_API_KEY |
firecrawl | Scrape and crawl websites into clean Markdown | FIRECRAWL_API_KEY |
fetch | Fetch any URL and convert it to Markdown | None |
playwright | Drive a real browser: open pages, click, fill forms, take screenshots | None |
"mcpServers": {
"perplexity": { "...": "as in step 1" },
"brave-search": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@brave/brave-search-mcp-server"],
"env": { "BRAVE_API_KEY": "your-brave-key" }
},
"tavily": {
"type": "stdio",
"command": "npx",
"args": ["-y", "tavily-mcp"],
"env": { "TAVILY_API_KEY": "tvly-your-key" }
},
"exa": {
"type": "stdio",
"command": "npx",
"args": ["-y", "exa-mcp-server"],
"env": { "EXA_API_KEY": "your-exa-key" }
},
"firecrawl": {
"type": "stdio",
"command": "npx",
"args": ["-y", "firecrawl-mcp"],
"env": { "FIRECRAWL_API_KEY": "fc-your-key" }
},
"fetch": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-fetch"]
},
"playwright": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@playwright/mcp"]
}
}Add only the servers you need. Each one starts a separate process, and its tools are added to every chat.
Hosted apps (HTTP)
Many services host their own MCP server at a URL. Use "type": "http":
| Server | URL | Sign-in |
|---|---|---|
notion | https://mcp.notion.com/mcp | OAuth in the browser |
slack | https://mcp.slack.com/mcp | OAuth in the browser |
canva | https://mcp.canva.com/mcp | OAuth in the browser |
figma | https://mcp.figma.com/mcp | OAuth in the browser |
hubspot | https://mcp.hubspot.com/anthropic | OAuth in the browser |
github | https://api.githubcopilot.com/mcp/ | GitHub token in a header |
"notion": {
"type": "http",
"url": "https://mcp.notion.com/mcp"
},
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/",
"headers": { "Authorization": "Bearer <YOUR_GITHUB_TOKEN>" }
}For OAuth servers, restart hrida-agent-sdk, run /mcp, select the server, and finish signing in through the browser.
Allow the tools
List every server you added in settings.json:
"permissions": {
"allow": ["mcp__perplexity", "mcp__brave-search", "mcp__fetch", "mcp__notion"]
},Allowing a server lets the agent use all of its tools without asking. For servers that can write, send, or delete (Slack, GitHub, Notion, HubSpot, Playwright), leave them out of allow so the agent asks before each action.
Add servers from the command line
Instead of editing ~/.hrida.json by hand, you can use hrida-agent-sdk mcp add-json with --scope user:
hrida-agent-sdk mcp add-json fetch '{"type":"stdio","command":"uvx","args":["mcp-server-fetch"]}' --scope user
hrida-agent-sdk mcp listTroubleshooting
perplexityis missing from/mcp:~/.hrida.jsonisn't valid JSON, or the entry isn't insidemcpServers. Check for missing commas or brackets.perplexityshows as failed:npxisn't available or can't download the package. Runnpx -y @perplexity-ai/mcp-serverin the terminal to see the error.401 Unauthorized/ invalid API key: the key inPERPLEXITY_API_KEYis wrong or expired. Update it and restart.- The agent asks for permission before every search: the
permissionsentry is missing or in the wrong file. Check step 2 and restart.