MCP Confluence
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP ConfluenceFind documentation about API authentication"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Confluence
A Model Context Protocol (MCP) server for integrating Confluence with OpenCode. Seamlessly search, read, create, and update Confluence pages directly from your AI coding agent.
Features
✅ Search Confluence content by keywords
✅ List available spaces
✅ Get space content
✅ Read Confluence pages by ID
✅ Create new pages
✅ Update existing pages
✅ Full TypeScript support
Requirements
Node.js 18+
Confluence API credentials (email + API token)
Installation
Using npm
npm install @jsalamanc_01/mcp-confluenceOr use directly with OpenCode
npx @jsalamanc_01/mcp-confluenceConfiguration
1. Get Your Confluence API Token
Create a new API token
Copy the token and save it securely
2. Setup with OpenCode
Add this to your ~/.config/opencode/opencode.jsonc:
{
"mcp": {
"confluence": {
"type": "local",
"command": ["npx", "-y", "@jsalamanc_01/mcp-confluence"],
"enabled": true,
"environment": {
"CONFLUENCE_BASE_URL": "https://your-instance.atlassian.net",
"CONFLUENCE_EMAIL": "your-email@example.com",
"CONFLUENCE_API_TOKEN": "your-api-token-here"
}
}
}
}Or use environment variables:
{
"mcp": {
"confluence": {
"type": "local",
"command": ["npx", "-y", "@jsalamanc_01/mcp-confluence"],
"enabled": true,
"environment": {
"CONFLUENCE_BASE_URL": "{env:CONFLUENCE_BASE_URL}",
"CONFLUENCE_EMAIL": "{env:CONFLUENCE_EMAIL}",
"CONFLUENCE_API_TOKEN": "{env:CONFLUENCE_API_TOKEN}"
}
}
}
}Usage
Once configured, you can use Confluence tools with OpenCode:
Search for all pages about "API" in Confluence. use confluenceAvailable Tools
Search Tools (3)
search_confluence- Search Confluence content by keywordsParameters:
query(string),limit(number, default: 25)Returns: List of matching pages with metadata
get_confluence_spaces- List all available spacesParameters:
limit(number, default: 25)Returns: List of all Confluence spaces
get_space_content- Get all pages in a spaceParameters:
space_key(string),limit(number, default: 25)Returns: List of pages in the specified space
Page Management Tools (6)
get_confluence_page- Read a page by IDParameters:
page_id(string)Returns: Full page content with metadata
create_confluence_page- Create a new pageParameters:
space_key(string),title(string),body(string),parent_page_id(optional)Returns: Created page details with URL
update_confluence_page- Update an existing pageParameters:
page_id(string),title(string),body(string),version_number(number)Returns: Updated page details
delete_confluence_page- Delete a page permanentlyParameters:
page_id(string)Returns: Success confirmation
Collaboration Tools (3)
add_confluence_comment- Add a comment to a pageParameters:
page_id(string),comment_text(string)Returns: Comment confirmation with details
get_confluence_page_comments- Get all comments on a pageParameters:
page_id(string),limit(number, default: 25)Returns: List of all comments with author and timestamp
get_confluence_page_versions- Get version historyParameters:
page_id(string),limit(number, default: 25)Returns: List of all versions with editor info
Attachments & Export Tools (2)
get_confluence_page_attachments- List page attachmentsParameters:
page_id(string),limit(number, default: 25)Returns: List of files attached to the page
export_confluence_page_html- Export page as HTMLParameters:
page_id(string)Returns: HTML content of the page
Total: 14 tools
Examples
Search for pages
Find all documentation about database migrations using confluenceCreate a page
Create a new page in the PROJ space titled "API Documentation" with installation instructions. use confluenceUpdate a page
Update the README page with the latest changes. use confluenceDelete a page
Delete the old migration guide page. use confluenceAdd a comment
Add a comment to the API documentation page saying "Updated with v2 endpoints". use confluenceView page history
Show me the version history of the API documentation page. use confluenceGet all comments
Get all comments on the deployment guide page. use confluenceExport a page
Export the API documentation page as HTML. use confluenceDevelopment
Local Setup
git clone https://github.com/jsalamanc/mcp-confluence.git
cd mcp-confluence
npm install
npm run buildCommands
# Watch for changes
npm run watch
# Run in development mode
npm run dev
# Build for production
npm run build
# Start the server
npm startProject Structure
src/
├── index.ts # Entry point
├── server.ts # MCP server implementation
├── confluence-client.ts # Confluence API client with all methods
├── types.ts # TypeScript types
└── tools/
├── page-tools.ts # Page operations (read, create, update)
├── search-tools.ts # Search operations
└── advanced-tools.ts # Advanced tools (delete, comments, versions, etc)API Reference
The tools use the Confluence Cloud REST API v2.
Authentication
All requests are authenticated using HTTP Basic Auth with:
Username: Your Confluence email
Password: Your API token
Content Format
Page content uses Confluence's Storage Format (HTML-based markup):
<p>This is a paragraph</p>
<h1>This is a heading</h1>
<ul>
<li>List item</li>
</ul>Environment Variables
CONFLUENCE_BASE_URL(required): Your Confluence instance URL (e.g., https://my-company.atlassian.net)CONFLUENCE_EMAIL(required): Your Confluence email addressCONFLUENCE_API_TOKEN(required): Your Confluence API token
Troubleshooting
Authentication Error
Verify your email and API token are correct
Ensure the API token hasn't expired
Check that the base URL doesn't have a trailing slash
Page Not Found
Verify the page ID is correct
Ensure you have access to the page
Check that the page exists and hasn't been deleted
Publishing Error
Verify the space key is correct
Ensure you have write permissions to the space
Check the HTML format of the body content
Performance
Search operations are cached for 5 minutes
Batch operations are limited to 25 items by default
API calls have a 30-second timeout
Security
Never commit your API tokens or credentials
Use environment variables for sensitive data
Regenerate tokens if they're exposed
Restrict API token permissions to minimum required
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Roadmap
✅ Completed (v0.3.0)
Search pages
List spaces
Get space content
Read pages
Create pages
Update pages
Delete pages
Add comments
Get page comments
Get page versions/history
List page attachments
Export pages as HTML
🚀 Planned Features
Upload attachments to pages
Export pages to PDF
Manage page permissions
Work with page macros
Batch operations
Watch/subscribe to page changes
Move pages between spaces
Archive/restore pages
License
MIT
Support
For issues, questions, or suggestions:
Open an issue on GitHub
Check the documentation
Related Projects
OpenCode - AI coding agent
Model Context Protocol - Protocol specification
Confluence Cloud API - Confluence API documentation
Made with ❤️ for the OpenCode community
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jsalamanc/mcp-confluence'
If you have feedback or need assistance with the MCP directory API, please join our Discord server