Replies: 17 comments 9 replies
ℹ️ Information NeededTo provide a helpful analysis, I need some additional information:
💡 Please reply to this issue with the requested information. 🤖 Automated triage by Issue Bot |
|
Need more context. Can we have the error message? I made an account on perplexity and reached out to support, there isn't an option for remote connectors for free accounts and I'm not really willing to pay for an account currently, so I recommend reaching out to support. Our mcp is pretty straight forward, it should work with most clients, and going by their support documentation it should work once you get the reverse proxy and stuff set up |
|
@davidfi01 do you have any more information you can provide? Ha-mcp should be compatible with any LLM that can handle MCP servers, so your issue is likely something to do with how your reverse proxy is set up. That's the most common issue people have. |
🔍 AnalysisThe issue reported by davidfi01 is a legitimate feature request for compatibility with Perplexity's "Custom Connectors". Perplexity recently introduced a feature allowing users to add remote MCP (Model Context Protocol) servers as search/tool connectors. To provide a "one-click" setup experience and verify the server's identity, Perplexity's registration flow expects specific "well-known" metadata files on the remote server. Specifically, it looks for This is an enhancement to improve the onboarding experience for Perplexity users. 🛠️ Suggested Steps
📊 Technical Analysis (for maintainers)Root CausePerplexity's remote connector registration flow performs a GET request to
Affected Code
Proposed FixModify --- a/src/ha_mcp/auth/provider.py
+++ b/src/ha_mcp/auth/provider.py
@@ -194,6 +194,36 @@
return JSONResponse(content=metadata_dict)
+ async def mcp_connector_handler(request: Request) -> Response:
+ """Perplexity compatible mcp-connector.json handler."""
+ base = str(self.base_url).rstrip('/')
+ mcp_url = f"{base}{mcp_path or '/mcp'}"
+
+ metadata = {
+ "name": "ha-mcp",
+ "description": "Home Assistant MCP Server - Control your smart home with AI.",
+ "icon": "https://raw.githubusercontent.com/homeassistant-ai/ha-mcp/master/packaging/mcpb/icon-128.png",
+ "mcp_url": mcp_url,
+ "transport": "sse",
+ "auth": {
+ "type": "oauth",
+ "discovery_url": f"{base}/.well-known/oauth-authorization-server"
+ }
+ }
+ return JSONResponse(content=metadata)
+
+ async def mcp_servers_handler(request: Request) -> Response:
+ """Generic /.well-known/mcp/servers.json handler."""
+ base = str(self.base_url).rstrip('/')
+ mcp_url = f"{base}{mcp_path or '/mcp'}"
+
+ metadata = {
+ "mcpServers": {
+ "ha-mcp": {
+ "name": "Home Assistant",
+ "url": mcp_url,
+ "transport": "sse"
+ }
+ }
+ }
+ return JSONResponse(content=metadata)
+
# Replace the well-known metadata route
enhanced_routes = []
for route in routes:
@@ -239,6 +269,28 @@
)
)
+ # Perplexity automatic registration endpoint
+ enhanced_routes.append(
+ Route(
+ path="/.well-known/mcp-connector.json",
+ endpoint=cors_middleware(
+ mcp_connector_handler, ["GET", "OPTIONS"]
+ ),
+ methods=["GET", "OPTIONS"],
+ )
+ )
+
+ # Generic MCP discovery endpoint
+ enhanced_routes.append(
+ Route(
+ path="/.well-known/mcp/servers.json",
+ endpoint=cors_middleware(
+ mcp_servers_handler, ["GET", "OPTIONS"]
+ ),
+ methods=["GET", "OPTIONS"],
+ )
+ )
+
# Add consent form routes (these override the default authorize behavior)
consent_routes = [
Route("/consent", endpoint=self._consent_get, methods=["GET"]),Related Issues/PRsNo similar issues found in 🤖 Automated analysis by Issue Bot |
|
Disregard what the bot says, it's reply looks hallucinated. It'll be helpful to get the entire red text at the bottom of the last screenshot. Also, have you tried setting it up thru any other LLMs? I think you can set it up thru Claude with a free account. It might be easier to try it that way first then use the same link on perplexity. You can also try visiting the url directly in a browser to see what it says, that often can give clues as to if your reverse proxy is set up properly or not. It'll say "method not allowed" if it's set up properly. |
|
Have you been able to try again to get us the entire red text for the error message? Also...are you literally pasting in http://:9583 into it? Because if so, then that's your problem. Just let me know either way and I Can help you set it up |
|
I have the server set up behind nginx. I have the server url prefix set to /private****. Locally, on local network, if I access the url through browser OR if I try it using my phone remotely on a 5G connection, I get the "method not allowed" response. I cannot get any more of the red message from the screen. I will try to get more using browser tools. Can you try "Perplexity PRO" without paying for the first month where you are? That might be the easisest way to resolve this issue. |
|
OK, if you're getting "method not allowed" That should be the right URL. You can confirm that with a free Claude account, I'm pretty sure free Claude accounts allow you to set up MCPs. So, I just caved and opened an account. Looks nifty that I can use gemini with the MCP there on the web interface instead of having to use Gemini CLI. I got the same error as you at first....I changed it to SSE mode and it allowed me to save it, but if I Tried to use that connector on any chats the chat would freeze. Then I Tried to make it again with streamable http and it gave a different error, "Cannot read properties of undefined (reading '0')". However this time I went to a new chat and despite the error it actually saved the MCP server when I clicked save (actually saved about 5 of them because I kept clicking). You just have to manually select it on every chat by clicking the little plus sign and and looking for it in the list. I then tried to use one of those saved servers (created using streamable) and it worked just fine with sonnet and gemini 3.1. I didn't try all of the models, but those definitely worked. So, it seems like this is a flaky UI issue on their end. Our MCP works just fine once it gets set up. See if you can reproduce it by following my steps above...save it as SSE under advanced settings, use a different name to try again under streamable and it should give you that Cannot read properties of undefined (reading '0') error but then show up in your list. Hope this does the trick! If not then definitely reach out to their support because I have it working fine on my end right now. |
|
I cannot get it to save regardless of what I do. What authentication are you using? I select "none" and rely on the private url. Should I be using another type? D |
|
I converted this to a discussion since it isn't a true issue on our side. I'm more than happy to help you troubleshoot it, but the issue should be reported to Perplexity support so they can work on it on their end |
|
Also getting this response when I query Perplexity about failure to connect: Status with Perplexity |
|
I am seeing UI changes today as well. My control is Claude. I have both Perplexity and Claude subscriptions. Claude for code, Perplexity for all else. D |
|
@kingpanther13 HA-MCP works great with claude and vscode.
|
|
Was anyone able to get this working as a connector in Perplexity? I've tried all the different ways I mention and that I could think of from this thread and the other one with no luck. As a note, no issues connecting and using this MCP with Claude directly (thank you for all the hard work on this, it's been great!). |









Uh oh!
There was an error while loading. Please reload this page.
What would you like to see?
I tried to install HA-MCP into Perplexity and it does not work. From the error message, it appears that Perplexity’s Remote connector expects an MCP server that supports its automatic registration / metadata flow, and the current ha-mcp does not implement that part of the spec yet.
Many existing open‑source MCP servers (including several Home Assistant ones) only implement the core JSON‑RPC/SSE protocol and simple header/URL auth, but not the automatic registration / dynamic client registration layer, so Perplexity rejects them.
Why do you need this?
Perplexity is a low cost AI agent that is widely used. No special setup is needed.
Additional context
No response
All reactions