diff --git a/.gitignore b/.gitignore
index 0934e18..658aac9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -225,4 +225,7 @@ doc/api/.manifest
# Coverage
CoverageReport
coverage.xml
-xunit.xml
\ No newline at end of file
+xunit.xml
+
+# MCP Server configuration with secrets
+src/Dapplo.Confluence.McpServer/appsettings.json
\ No newline at end of file
diff --git a/README.md b/README.md
index d594709..54c6c23 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,24 @@ This is a simple REST based Confluence client, written for Greenshot, by using D
- Coverage Status: [](https://coveralls.io/github/dapplo/Dapplo.Confluence?branch=master)
- NuGet package: [](https://badge.fury.io/nu/Dapplo.Confluence)
+## π MCP Server for AI Integration
+
+**NEW**: Integrate Confluence with AI assistants like Claude Desktop and Microsoft 365 Copilot!
+
+The [Dapplo.Confluence.McpServer](src/Dapplo.Confluence.McpServer) provides a Model Context Protocol (MCP) server that exposes Confluence functionality to AI assistants.
+
+**Quick start:**
+```bash
+cd src/Dapplo.Confluence.McpServer
+cp appsettings.example.json appsettings.json
+# Edit appsettings.json with your Confluence URL and API token
+dotnet run
+```
+
+See the [Quick Start Guide](src/Dapplo.Confluence.McpServer/QUICKSTART.md) and [full documentation](src/Dapplo.Confluence.McpServer/README.md) for details.
+
+## Confluence Client Library
+
The Confluence client supports most REST methods, and has a fluent API for building a CQL (Confluence Query Language) string to search with.
An example on how to use this Confluence client:
diff --git a/src/Dapplo.Confluence.McpServer/ConfluenceSettings.cs b/src/Dapplo.Confluence.McpServer/ConfluenceSettings.cs
new file mode 100644
index 0000000..f829532
--- /dev/null
+++ b/src/Dapplo.Confluence.McpServer/ConfluenceSettings.cs
@@ -0,0 +1,32 @@
+namespace Dapplo.Confluence.McpServer;
+
+///
+/// Configuration settings for the Confluence MCP server
+///
+public class ConfluenceSettings
+{
+ ///
+ /// The Confluence server URL (e.g., https://yourcompany.atlassian.net)
+ ///
+ public string ConfluenceUrl { get; set; } = string.Empty;
+
+ ///
+ /// Authentication method: "basic" or "bearer"
+ ///
+ public string AuthType { get; set; } = "bearer";
+
+ ///
+ /// Username for basic authentication
+ ///
+ public string? Username { get; set; }
+
+ ///
+ /// Password or API token for basic authentication
+ ///
+ public string? Password { get; set; }
+
+ ///
+ /// Bearer token for token-based authentication
+ ///
+ public string? BearerToken { get; set; }
+}
diff --git a/src/Dapplo.Confluence.McpServer/Dapplo.Confluence.McpServer.csproj b/src/Dapplo.Confluence.McpServer/Dapplo.Confluence.McpServer.csproj
new file mode 100644
index 0000000..997ce6a
--- /dev/null
+++ b/src/Dapplo.Confluence.McpServer/Dapplo.Confluence.McpServer.csproj
@@ -0,0 +1,31 @@
+ο»Ώ
+
+
+ Exe
+ net10.0
+ enable
+ enable
+ MCP (Model Context Protocol) server for Confluence API integration
+ mcp;confluence;atlassian;dapplo;copilot
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
diff --git a/src/Dapplo.Confluence.McpServer/McpServerHandler.cs b/src/Dapplo.Confluence.McpServer/McpServerHandler.cs
new file mode 100644
index 0000000..ae4a546
--- /dev/null
+++ b/src/Dapplo.Confluence.McpServer/McpServerHandler.cs
@@ -0,0 +1,114 @@
+using Dapplo.Confluence.McpServer.Models;
+using Dapplo.Confluence.McpServer.Tools;
+using System.Text.Json;
+using System.Text.Json.Nodes;
+
+namespace Dapplo.Confluence.McpServer;
+
+///
+/// MCP server handler that processes JSON-RPC requests
+///
+public class McpServerHandler
+{
+ private readonly ToolRegistry _toolRegistry;
+ private const string McpVersion = "2024-11-05";
+
+ public McpServerHandler(IConfluenceClient confluenceClient)
+ {
+ _toolRegistry = new ToolRegistry(confluenceClient);
+ }
+
+ ///
+ /// Process an MCP request and return a response
+ ///
+ public async Task ProcessRequestAsync(McpRequest request)
+ {
+ try
+ {
+ var result = request.Method switch
+ {
+ "initialize" => HandleInitialize(request.Params),
+ "tools/list" => HandleToolsList(),
+ "tools/call" => await HandleToolsCallAsync(request.Params),
+ "ping" => new { },
+ _ => throw new InvalidOperationException($"Unknown method: {request.Method}")
+ };
+
+ return new McpResponse
+ {
+ Id = request.Id,
+ Result = result
+ };
+ }
+ catch (Exception ex)
+ {
+ return new McpResponse
+ {
+ Id = request.Id,
+ Error = new McpError
+ {
+ Code = -32603,
+ Message = ex.Message,
+ Data = new { exception = ex.GetType().Name }
+ }
+ };
+ }
+ }
+
+ private object HandleInitialize(object? parameters)
+ {
+ return new
+ {
+ protocolVersion = McpVersion,
+ capabilities = new
+ {
+ tools = new { }
+ },
+ serverInfo = new
+ {
+ name = "confluence-mcp-server",
+ version = "1.0.0"
+ }
+ };
+ }
+
+ private object HandleToolsList()
+ {
+ var tools = _toolRegistry.GetToolDefinitions();
+ return new { tools };
+ }
+
+ private async Task