Prerequisites
Bug Description
CONFLUENCE_SPACES_FILTER is documented (.env.example:233) as limiting "searches and other operations" to an allowlist of spaces, but the code only enforces it inside confluence_search. Every other Confluence read tool (confluence_get_page, confluence_get_space_page_tree, confluence_get_page_children, confluence_get_page_ancestors, confluence_get_comments, etc.) ignores the filter entirely, so an agent (or user) can trivially read content from spaces outside the configured allowlist as long as the underlying credentials have access.
Steps to Reproduce
- Set
CONFLUENCE_SPACES_FILTER=ANYSPACE (a single, narrow space).
- Ask an MCP client to search for content that actually lives in a different space (e.g.
OTHERSPACE).
confluence_search correctly returns an empty result set — the filter works as intended here.
- The agent falls back to
confluence_get_space_page_tree(space_key=OTHERSPACE, ...) and then confluence_get_page(page_id=...) for a page found in that tree.
- Both calls succeed and return full page content from
OTHERSPACE, even though it's outside the configured CONFLUENCE_SPACES_FILTER allowlist.
Expected Behavior
CONFLUENCE_SPACES_FILTER should be a hard boundary enforced consistently across all Confluence tools that accept or resolve a space_key/page, not just confluence_search. Compare with the Jira equivalent (JIRA_PROJECTS_FILTER), which is enforced both in search (src/mcp_atlassian/jira/search.py) and in direct single-item lookups — jira_get_issue explicitly rejects issues whose project prefix isn't in the allowlist (src/mcp_atlassian/jira/issues.py:104-123).
Actual Behavior
Only `confluence_search` applies the filter, via `SearchMixin.search()` (`src/mcp_atlassian/confluence/search.py:113-115`):
for filter_str in (self.config.spaces_filter, spaces_filter):
if filter_str:
cql = self._and_spaces_filter(cql, filter_str)
No equivalent check exists in `src/mcp_atlassian/confluence/pages.py`, which backs `get_page`, `get_space_page_tree`, `get_page_children`, `get_child_pages`, `create_page`, etc. — none of these read `self.config.spaces_filter` at all.
mcp-atlassian Version
v0.22.1
Installation Method
From PyPI (pip install mcp-atlassian / uv add mcp-atlassian)
Operating System
Linux (Specify distribution below if relevant)
Python Version
3.14.4
Atlassian Instance Type
Confluence Server / Data Center
Client Application
opencode + mcp via uvx
Additional Context
No response
Prerequisites
Bug Description
CONFLUENCE_SPACES_FILTERis documented (.env.example:233) as limiting "searches and other operations" to an allowlist of spaces, but the code only enforces it insideconfluence_search. Every other Confluence read tool (confluence_get_page,confluence_get_space_page_tree,confluence_get_page_children,confluence_get_page_ancestors,confluence_get_comments, etc.) ignores the filter entirely, so an agent (or user) can trivially read content from spaces outside the configured allowlist as long as the underlying credentials have access.Steps to Reproduce
CONFLUENCE_SPACES_FILTER=ANYSPACE(a single, narrow space).OTHERSPACE).confluence_searchcorrectly returns an empty result set — the filter works as intended here.confluence_get_space_page_tree(space_key=OTHERSPACE, ...)and thenconfluence_get_page(page_id=...)for a page found in that tree.OTHERSPACE, even though it's outside the configuredCONFLUENCE_SPACES_FILTERallowlist.Expected Behavior
CONFLUENCE_SPACES_FILTERshould be a hard boundary enforced consistently across all Confluence tools that accept or resolve aspace_key/page, not justconfluence_search. Compare with the Jira equivalent (JIRA_PROJECTS_FILTER), which is enforced both in search (src/mcp_atlassian/jira/search.py) and in direct single-item lookups —jira_get_issueexplicitly rejects issues whose project prefix isn't in the allowlist (src/mcp_atlassian/jira/issues.py:104-123).Actual Behavior
mcp-atlassian Version
v0.22.1
Installation Method
From PyPI (pip install mcp-atlassian / uv add mcp-atlassian)
Operating System
Linux (Specify distribution below if relevant)
Python Version
3.14.4
Atlassian Instance Type
Confluence Server / Data Center
Client Application
opencode + mcp via uvx
Additional Context
No response