-
Notifications
You must be signed in to change notification settings - Fork 754
Description
Prerequisites
- I have searched the existing issues to make sure this bug has not already been reported.
- I have checked the README for relevant information.
Bug Description
confluence_search_user tool uses non-existent /rest/api/search/user API on Confluence Server. /rest/api/search/user only exists on Confluence Cloud.
Steps to Reproduce
- Start mcp inspector on the server with on-premises Confluence Server CONFLUENCE URL
CONFLUENCE_URL=https://confluence.example.com \
CONFLUENCE_USERNAME=xxx \
CONFLUENCE_API_TOKEN=yyy
npx @modelcontextprotocol/inspector uvx --with 'pydantic==2.11.9' mcp-atlassian- List tools
- Use
confluence_search_usertool to searchuser.fullname ~ "John Doe" - Run tool
Expected Behavior
I expect user search to use /rest/api/search for Confluence Server with the same CQL then filter the response for users. Similar to how confluence_search tool uses /rest/api/search then filters for content https://github.com/sooperset/mcp-atlassian/pull/509/files#diff-844d629aed45093716b43688e59fa0c16c48e6da2a687baba1e188c11ea85ee6R79
Actual Behavior
You will get error:
{
"error": "An unexpected error occurred while searching for users: null for uri: https://confluence.example.com/rest/api/search/user?cql=user.fullname+~+%22John+Doe%22&limit=10"
}mcp-atlassian Version
0.11.9
Installation Method
From PyPI (pip install mcp-atlassian / uv add mcp-atlassian)
Operating System
macOS
Python Version
3.9.7
Atlassian Instance Type
Confluence Server / Data Center
I am on Confluence Server 7.19.20 which is supported 6.0+ https://github.com/sooperset/mcp-atlassian?tab=readme-ov-file#compatibility
Client Application
Inspector Tool
Additional Context
This error is happening because Confluence Cloud has deprecated /rest/api/search https://developer.atlassian.com/cloud/confluence/deprecation-notice-search-api/
It seems like /rest/api/search in Confluence Cloud is now only for content https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search/#api-wiki-rest-api-search-get. There is also a /rest/api/content/search https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content/#api-wiki-rest-api-content-search-get. Not sure the difference between the two, but /rest/api/content/search might be the recommended way going forward https://community.atlassian.com/forums/Confluence-questions/Searching-for-Page-by-Content/qaq-p/2594304.
Confluence Cloud user search is done with /rest/api/search/user https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search/#api-wiki-rest-api-search-user-get which this repo has implemented in https://github.com/sooperset/mcp-atlassian/pull/509/files#diff-844d629aed45093716b43688e59fa0c16c48e6da2a687baba1e188c11ea85ee6R116.
The issue is that Confluence server hasn't done this deprecation and still uses /rest/api/search for both content and users https://developer.atlassian.com/server/confluence/rest/v951/api-group-search/#api-rest-api-search-get.
I have tested this API and it works for my Confluence Server:
https://confluence.example.com/rest/api/search?cql=user.fullname+~+%22John+Doe%22&limit=10