πŸ“š Wiki MCP Server

by albertshao

133 downloads Not rated yet
GitHub

About

# πŸ“š Wiki MCP Server An MCP (Model Context Protocol) Server implementation for managing Confluence wiki pages. Supports: - Creating new wiki pages - Updating existing wiki pages - Deleting wiki pages - Searching wiki pages by keyword - Auto-selecting correct Confluence knowledge base (`alm`, `wpb`, etc.) based on user…

Explore

- Create, update, delete, and search Confluence wiki pages.
- Auto‑selects correct Confluence knowledge base from user query.
- Built with FastAPI and MCP SDK for production deployment.
- Supports multiple Confluence instances (alm, wpb, etc.).
- Containerized with Docker for easy deployment.
- Provides OpenAPI and ReDoc documentation.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name πŸ“š Wiki MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

1. Clone the repository:

git clone https://your-repo-url/wiki_mcp_server.git
cd wiki_mcp_server

2. Install dependencies:

pip install -r requirements.txt

3. (Optional) Configure your environment variables if needed.

---

Run the server:

cd src
uvicorn wiki_mcp_server.server:app --host 0.0.0.0 --port 9999 --reload

After startup, you can visit:

- OpenAPI docs (Swagger UI): http://localhost:9999/docs
- ReDoc docs: http://localhost:9999/redoc

---

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83d\udcda wiki mcp server": {
            "wiki_mcp_server": {
                "command": "docker",
                "args": [
                    "build",
                    "-t",
                    "wiki-mcp-server",
                    "."
                ]
            }
        }
    }
}

McpServers

{
    "wiki_mcp_server": {
        "command": "docker",
        "args": [
            "build",
            "-t",
            "wiki-mcp-server",
            "."
        ]
    }
}

An MCP (Model Context Protocol) Server implementation for managing Confluence wiki pages.

Supports:
- Creating new wiki pages
- Updating existing wiki pages
- Deleting wiki pages
- Searching wiki pages by keyword
- Auto-selecting correct Confluence knowledge base (alm, wpb, etc.) based on user query

Built with FastAPI, following MCP Server Best Practices, and ready for production deployment.

---

πŸš€ Tech Stack

- Python 3.10+
- FastAPI
- MCP SDK
- Requests (for Confluence API interaction)
- ContextVars (for session management)

---

πŸ“¦ Project Structure

wiki_mcp_server/
β”œβ”€β”€ src/wiki_mcp_server/
β”‚   β”œβ”€β”€ server.py          # MCP server entry point
β”‚   β”œβ”€β”€ service.py         # Business logic (Confluence API interactions)
β”‚   β”œβ”€β”€ tools.py           # MCP tool definitions
β”‚   β”œβ”€β”€ prompts.py         # MCP prompt definitions
β”‚   β”œβ”€β”€ resources.py       # MCP resource definitions
β”‚   β”œβ”€β”€ utils.py           # Helper functions (wiki_type inference etc.)
β”‚   β”œβ”€β”€ utils/session_context.py  # Session context manager
β”‚   └── middleware.py      # Authentication and session initialization middleware
β”œβ”€β”€ Dockerfile             # Container configuration
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ README.md              # Project documentation
β”œβ”€β”€ smithery.yaml          # Smithery integration config (optional)
└── pyproject.toml         # Python project metadata

---

βš™οΈ Installation

1. Clone the repository:

git clone https://your-repo-url/wiki_mcp_server.git
cd wiki_mcp_server

2. Install dependencies:

pip install -r requirements.txt

3. (Optional) Configure your environment variables if needed.

---

πŸ›  Running Locally

Run the server:

cd src
uvicorn wiki_mcp_server.server:app --host 0.0.0.0 --port 9999 --reload

After startup, you can visit:

- OpenAPI docs (Swagger UI): http://localhost:9999/docs
- ReDoc docs: http://localhost:9999/redoc

---

πŸ§ͺ Example Request

Headers Required:

| Key | Example Value |
|:---|:---|
| user_name | [email protected] |
| alm_confluence_base_url | https://your-confluence-site/wiki/rest/api |
| alm_confluence_api_token | your-api-token |
| wpb_confluence_base_url | (optional if available) |
| wpb_confluence_api_token | (optional if available) |

> ⚠️ If headers are missing or invalid, server will return HTTP 400 error.

---

Example: Create Page

POST /create_page

{
  "space_key": "TEST",
  "title": "Test Page Created by MCP Server",
  "content": "<p>Hello, World!</p>",
  "user_query": "Please create a page in GSNA knowledge base."
}

Behavior:
- Server will infer wiki_type=alm from user_query.
- Create the page in Confluence and return page metadata.

---

🧠 Auto Inference Logic

- If the query mentions gsna, global, alm-confluence β†’ alm
- If the query mentions wpb, wealth β†’ wpb
- Otherwise default to alm

(You can also manually specify wiki_type in input)

---

🐳 Docker (Optional)

Build and run containerized server:

docker build -t wiki-mcp-server .
docker run -d -p 9999:9999 --name wiki-mcp-server wiki-mcp-server

---

πŸ“œ License

MIT License.

---

πŸ“ž Contact

For issues or collaboration requests, please contact:

- Developer: Shawn
- Email: [email protected]
- Project maintained by internal MCP Working Group

---# wiki_mcp_server

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.