Help setting up with multiple server #115
-
|
I have three opensearch URL for different environment, for example, dev: https://dev.opensearch.com, uat: https://uat.opensearch.com, production: https://prd.opensearch.com, and I tried two ways to config the MCP server in Cursor, but they are both not working. The first way I tried is configure three MCP server with different URL: "opensearch-prod": {
"description": "",
"type": "stdio",
"command": "uvx",
"args": ["opensearch-mcp-server-py"],
"env": {
"OPENSEARCH_URL": "https://prd.opensearch.com",
"OPENSEARCH_NO_AUTH": "true"
}
},
"opensearch-dev": {
"description": "",
"type": "stdio",
"command": "uvx",
"args": ["opensearch-mcp-server-py"],
"env": {
"OPENSEARCH_URL": "https://dev.opensearch.com",
"OPENSEARCH_NO_AUTH": "true"
}
},
"opensearch-uat": {
"description": "",
"type": "stdio",
"command": "uvx",
"args": ["opensearch-mcp-server-py"],
"env": {
"OPENSEARCH_URL": "https://uat.opensearch.com",
"OPENSEARCH_NO_AUTH": "true"
}
},Cursor started them successfully and got 8 tools for each MCP server. But when I ask Cursor to read logs from any environment, it got a connection error. It seems the MCP server always accesses the production URL because it launches first even if Cursor accesses the uat or dev. Accessing the production environment needs a VPN so it's unreachable. If I disable the opensearch-prd, and opensearch-dev, then accessing the opensearch-uat is successful. After that I tried the second way to leverage the multi-mode. Here is my config. "opensearch-mcp-server": {
"command": "uvx",
"args": [
"opensearch-mcp-server-py",
"--mode", "multi",
"--config", "/Users/user/.cursor/opensearch_config.yml"
],
"env": {}
},/Users/user/.cursor/opensearch_config.yml version: "1.0"
description: "OpenSearch cluster configurations"
clusters:
dev:
opensearch_url: "https://dev.opensearch.com"
opensearch_no_auth: true
uat:
opensearch_url: "https://uat.opensearch.com"
opensearch_no_auth: true
prod:
opensearch_url: "https://prd.opensearch.com"
opensearch_no_auth: true
When I ask Cursor to use it, I got an error. I also tried to change opensearch_url to OPENSEARCH_URL but it still not working. How can I correctly configure this MCP server with these three different url? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hi @NamekMaster My config: My MCP file with cursor: |
Beta Was this translation helpful? Give feedback.


Hi @NamekMaster, sorry missed this message. Yes, there was an issue with OpenSearch MCP server in no auth in multi mode. We fixed it in a recent PR. This will be released in the next version, scheduled this week