You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation of the /api/mcp/sse mode does have some problems. Since vercel cannot save the id if it is not connected to the kv cache, the state will be lost on some mcp clients because the corresponding session id cannot be found.
Therefore I recommend you to use streamable-http mode instead of sse
Not sure, but i really think this is a problem with deep-research, not with mcpo. I now tried to use metamcp and added deep-research there and metamcp provides an integrated mcp inspector and even there i get the "Method not allowed" error.
As far as I know, MCP services can only be called with the help of MCP clients. If you want to test whether the project is running properly, you can consider testing the data stream API /api/sse/live
Btw, also had to adjust the compose for deep-research and include the "hostname" environment variable, otherwise deep-research was not reachable from localhost, only through the ip.
Btw, when i try ito do a deep-research through the webui of deep-research some parts work, but the information collection step fails with a cors error with searxng
My openrouter account was previously deactivated due to arrears. I will apply for a new one today and will debug it according to your parameters today.
Ok ,was able to fix it. Here is the PR #136
The problem was, that the requests added an additional /api to all requests going to openrouter, so the url would be https://openrouter.ai/api/api/v1.... whichw as wrong and resulted in the method not allowed error. I removed that, tested that in dev environmetn and in a self built container and it works
Edit: Nvm, only solves the issue through the built-in webui, not for both mcp endpoints. There its still throwing the same error
There is definitely something wrong with the configs. I just tried configuring - OPENROUTER_API_BASE_URL=https://openrouter.ai and that seems to work. But the documentation says:
# (Optional) Server-side OpenRouter API Proxy URL. Default, `https://openrouter.ai`
OPENROUTER_API_BASE_URL=
so this should already be the default. But obviously it isnt. This is a bug, nothing else. Not a problem with documentation, nor anything. Its a bug. If the default is not the default as documented and doesnt work, its a bug.
This is a documentation error. I submitted a fix yesterday. The actual path prefix is https://openrouter.ai/api. You can find the relevant code in line 12 of the next.config.ts file.
We are sorry that you have encountered a configuration error due to an error in the documentation.
This is a documentation error. I submitted a fix yesterday. The actual path prefix is https://openrouter.ai/api. You can find the relevant code in line 12 of the next.config.ts file.
We are sorry that you have encountered a configuration error due to an error in the documentation.
The actual actual path would be https://openrouter.ai/api/v1 according to the openrouter documentation. But this still doesnt answer or solve the problem, that the code adds an additional /api after the now default https://openrouter.ai/api which makes the URL invalid. As i have said, i have tested this.
So the original correct value for the documentation was right https://openrouter.ai, but it wasnt correctly used in the backend code, which used https://openrouter.ai/api and added the additional /api to each request.
So basically each request went (or goes to currently) https://openrouter.ai/api/api and not https://openrouter.ai/api due to this bug
You see this error at the bottom? Request goes to `https://openrouter.ai/api/api/v1/models` and not `https://openrouter.ai/api/v1/models`.
This is now in local mode and i quickly spun up the dev environment on my pc. And the value for the api base url is now the "correct" one with the /api at the end, according to the documentation. It works however, when i remove that /api at the end. So this is still an application error, not a documentation error.
The default API prefix I mentioned is for backend server use. On the frontend, simply enter https://openrouter.ai/, and the system will complete the subsequent path /api/v1.
Weren't you using MCP services before? MCP services require environment variables to implement backend server logic.
Also, you now mention, that i should enter https://openrouter.ai/, but according to the backend code of you application and the documentation and the config file, the default now is https://openrouter.ai/api instead. That's what I am trying to tell you. The default value, without me entering anything, is wrong. Same for the documentation, which you have "fixed".
I understand what you mean. I did have a problem with the unification of the APIs on both ends. I submitted a small bugfix and made it compatible with the default API path of OpenRouter.
It looks like the issue is resolved when running through the api endpoint, but not when running throuhg the webui.
In local mode, this normally goes through the configured and correct api endpoint for openrouter
but when running in proxy mode (even when the correct endpoint for openrouter is configured and works via the api endpoint /api/mcp or /api/mcp/sse) then it doesnt work
Activity
Amery2010 commentedon Jul 23, 2025
The
Method Not Allowederror comes from streamableHTTP.You need to confirm that you have called the correct server endpoint with the correct transport type
Joly0 commentedon Jul 23, 2025
Yes, i did.
See here the log of mcpo:
Amery2010 commentedon Jul 23, 2025
This error should be reported by mcpo. I searched for mcpo's issues. This discussion may help you solve the problem.
open-webui/open-webui#12875
Joly0 commentedon Jul 26, 2025
Hey, i have opened an issue at the mcpo repo and they replied here open-webui/mcpo#214 (comment)
Amery2010 commentedon Jul 27, 2025
The implementation of the
/api/mcp/ssemode does have some problems. Since vercel cannot save the id if it is not connected to the kv cache, the state will be lost on some mcp clients because the corresponding session id cannot be found.Therefore I recommend you to use
streamable-httpmode instead ofsseJoly0 commentedon Jul 28, 2025
Not sure, but i really think this is a problem with deep-research, not with mcpo. I now tried to use metamcp and added deep-research there and metamcp provides an integrated mcp inspector and even there i get the "Method not allowed" error.
Joly0 commentedon Jul 28, 2025
In metamcp i added it like this:
Amery2010 commentedon Jul 28, 2025
I'm sorry, I don't have any solution at the moment. I don't know what caused this error, and there shouldn't be such an error in the project.
I tested the service through the tool https://modelcontextprotocol.io/, and it was able to be called normally at that time.
Joly0 commentedon Jul 28, 2025
Could you provide me with a simple curl request that i could run inside the deep-research container so i can check if those are handled correctly?
Amery2010 commentedon Jul 28, 2025
As far as I know, MCP services can only be called with the help of MCP clients. If you want to test whether the project is running properly, you can consider testing the data stream API
/api/sse/livehttps://github.com/u14app/deep-research?tab=readme-ov-file#get-method
Joly0 commentedon Jul 28, 2025
Ok, so requesting this:
shows this in the deep-research log:
but nothing more.
Requesting this:
shows this:
So the first endpoint shows/returns nothing to the requester, the second throws an "unsupported provider" error.
Joly0 commentedon Jul 28, 2025
Btw, also had to adjust the compose for deep-research and include the "hostname" environment variable, otherwise deep-research was not reachable from localhost, only through the ip.
Joly0 commentedon Jul 28, 2025
Btw, when i try ito do a deep-research through the webui of deep-research some parts work, but the information collection step fails with a cors error with searxng
Amery2010 commentedon Jul 29, 2025
http://localhost:3000/api/sse/live?query=AI+trends+for+this+year&provider=openrouter&thinkingModel=openai/o4-mini-high&taskModel=openai/gpt-4.1-nano&searchProvider=searxng
You need to set thinkingModel and taskModel in the parameters; otherwise, an error will occur because the appropriate model cannot be found.
The Cors error of Searxng is caused by browser security issues. You can access it normally in the webUI through the server proxy mode.
Joly0 commentedon Jul 29, 2025
Even with your provided link, it doesnt work either:
Joly0 commentedon Aug 5, 2025
@Amery2010 so is there anything I can do or try or peovide to debug? I would really like to use deep research, but it doesn't work
Amery2010 commentedon Aug 6, 2025
My openrouter account was previously deactivated due to arrears. I will apply for a new one today and will debug it according to your parameters today.
Joly0 commentedon Aug 12, 2025
Hey, any news? Had any luck to try this out yet?
Amery2010 commentedon Aug 12, 2025
There is no solution yet
Joly0 commentedon Sep 5, 2025
Hey, its been a while, so any news on this issue? Have you had the chance to test it out?
Joly0 commentedon Sep 5, 2025
Ok ,was able to fix it. Here is the PR #136
The problem was, that the requests added an additional /api to all requests going to openrouter, so the url would be https://openrouter.ai/api/api/v1.... whichw as wrong and resulted in the method not allowed error. I removed that, tested that in dev environmetn and in a self built container and it works
Edit: Nvm, only solves the issue through the built-in webui, not for both mcp endpoints. There its still throwing the same error
Joly0 commentedon Sep 5, 2025
There is definitely something wrong with the configs. I just tried configuring
- OPENROUTER_API_BASE_URL=https://openrouter.aiand that seems to work. But the documentation says:so this should already be the default. But obviously it isnt. This is a bug, nothing else. Not a problem with documentation, nor anything. Its a bug. If the default is not the default as documented and doesnt work, its a bug.
Amery2010 commentedon Sep 6, 2025
This is a documentation error. I submitted a fix yesterday. The actual path prefix is
https://openrouter.ai/api. You can find the relevant code in line 12 of thenext.config.tsfile.We are sorry that you have encountered a configuration error due to an error in the documentation.
Joly0 commentedon Sep 6, 2025
The actual actual path would be
https://openrouter.ai/api/v1according to the openrouter documentation. But this still doesnt answer or solve the problem, that the code adds an additional/apiafter the now defaulthttps://openrouter.ai/apiwhich makes the URL invalid. As i have said, i have tested this.So the original correct value for the documentation was right
https://openrouter.ai, but it wasnt correctly used in the backend code, which usedhttps://openrouter.ai/apiand added the additional/apito each request.So basically each request went (or goes to currently)
https://openrouter.ai/api/apiand nothttps://openrouter.ai/apidue to this bugJoly0 commentedon Sep 6, 2025
This is now in local mode and i quickly spun up the dev environment on my pc. And the value for the api base url is now the "correct" one with the /api at the end, according to the documentation. It works however, when i remove that /api at the end. So this is still an application error, not a documentation error.
Amery2010 commentedon Sep 7, 2025
The default API prefix I mentioned is for backend server use. On the frontend, simply enter
https://openrouter.ai/, and the system will complete the subsequent path/api/v1.Weren't you using MCP services before? MCP services require environment variables to implement backend server logic.
Joly0 commentedon Sep 7, 2025
I am using various MCP Servers.
Also, you now mention, that i should enter
https://openrouter.ai/, but according to the backend code of you application and the documentation and the config file, the default now ishttps://openrouter.ai/apiinstead. That's what I am trying to tell you. The default value, without me entering anything, is wrong. Same for the documentation, which you have "fixed".Don't you understand the problem here?
Amery2010 commentedon Sep 9, 2025
I understand what you mean. I did have a problem with the unification of the APIs on both ends. I submitted a small bugfix and made it compatible with the default API path of OpenRouter.
Joly0 commentedon Sep 15, 2025
It looks like the issue is resolved when running through the api endpoint, but not when running throuhg the webui.

In local mode, this normally goes through the configured and correct api endpoint for openrouter
but when running in proxy mode (even when the correct endpoint for openrouter is configured and works via the api endpoint /api/mcp or /api/mcp/sse) then it doesnt work