AX

alfredfs85/xwiki-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4 stars 6 forks 质量 73 趋势 12MIT

MCP server for xWiki

概览

MCP (Model Context Protocol) server for interacting with XWiki instances. This server allows you to search, read, and create pages in XWiki through the REST API. - : Search pages in XWiki using the search API - : Get the full content of any XWiki page - : Create or update pages in XWiki using XWiki syntax - Docker and Docker Compose installed - Node.js 20+ (if running without Docker) - Access to an XWiki instance with REST API enabled 2. Configure environment variables by creating a .env file: The server will be available at http://localhost:3000 If you need HTTPS, you can use the setup.sh script to generate self-signed SSL certificates: : Generated certificates (server.key and server.crt) are in .gitignore and will not be uploaded to the repository. Returns the server status and XWiki configuration.

README

以下为原文 README 节选,完整内容请查看原文。

XWiki MCP Server

MCP (Model Context Protocol) server for interacting with XWiki instances. This server allows you to search, read, and create pages in XWiki through the REST API.

🚀 Features

  • Article Search: Search pages in XWiki using the search API
  • Page Reading: Get the full content of any XWiki page
  • Page Creation/Update: Create or update pages in XWiki using XWiki syntax

📋 Prerequisites

  • Docker and Docker Compose installed
  • Node.js 20+ (if running without Docker)
  • Access to an XWiki instance with REST API enabled

🔧 Installation

  1. Clone the repository:
git clone https://github.com/alfredfs85/xwiki-mcp-server.git
cd xwiki-mcp-server
  1. Configure environment variables by creating a .env file:
XWIKI_URL=https://your-xwiki-instance.com
XWIKI_USERNAME=your_username
XWIKI_PASSWORD=your_password
XWIKI_WIKI=xwiki
  1. Build and run the container:
docker-compose up -d --build
  1. Verify the server is running:
curl http://localhost:3000/health

Option 2: Local Execution

  1. Install dependencies:
npm install
  1. Configure environment variables:
export XWIKI_URL=https://your-xwiki-instance.com
export XWIKI_USERNAME=your_username
export XWIKI_PASSWORD=your_password
export XWIKI_WIKI=xwiki
  1. Run the server:
node server.js

The server will be available at http://localhost:3000

🔐 SSL Configuration (Optional)

If you need HTTPS, you can use the setup.sh script to generate self-signed SSL certificates:

chmod +x setup.sh
./setup.sh --ssl

Note: Generated certificates (server.key and server.crt) are in .gitignore and will not be uploaded to the repository.

📡 Endpoints

Health Check

GET /health

Returns the server status and XWiki configuration.

MCP JSON-RPC

POST /mcp

Main endpoint for MCP communication using JSON-RPC 2.0.

Server-Sent Events (SSE)

GET /sse
POST /messages?sessionId={sessionId}

Alternative endpoints for communication via Server-Sent Events.

🛠️ Available Tools

search_xwiki

Searches for articles in XWiki.

Parameters:

  • query (required): Search term
  • limit (optional): Maximum number of results (default: 10)

Example:

{
  "method": "tools/call",
  "params": {
    "name": "search_xwiki",
    "arguments": {
      "query": "documentation",
      "limit": 5
    }
  }
}

get_xwiki_page

Gets the content of an XWiki page.

Parameters:

  • page_path (required): Page path (e.g., Main.WebHome or Space.Page)

Example:

{
  "method": "tools/call",
  "params": {
    "name": "get_xwiki_page",
    "arguments": {
      "page_path": "Main.WebHome"
    }
  }
}

create_xwiki_page

Creates or updates a page in XWiki.

Parameters:

  • page_path (required): Page path
  • title (required): Page title
  • content (required): Content in XWiki syntax
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "xwiki": { "url": "http://localhost:3000/mcp", "transport": "http" } } }