Skip to main content
Glama
README.md
<p align="center">
  <img src="wolai-mcp.jpeg" width="120" alt="Wolai MCP Icon">
</p>

# Wolai MCP Server ๐Ÿบ

**English** | [ไธญๆ–‡](README_CN.md)

[![PyPI](https://img.shields.io/pypi/v/wolai-mcp)](https://pypi.org/project/wolai-mcp/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Sponsor](https://img.shields.io/badge/๐Ÿ’–_Sponsor-946CE6?style=flat)](https://afdian.com/a/LittlePeter52012)

**Connect AI agents to your [Wolai](https://www.wolai.com) knowledge base** via the Model Context Protocol (MCP).

Read, write, search, and navigate your Wolai pages โ€” all from Claude, Gemini, Cursor, or any MCP-compatible AI agent.

---

## โœจ Features

| Category | Tools                                                                       | Description                                   |
| -------- | --------------------------------------------------------------------------- | --------------------------------------------- |
| ๐Ÿ“– Read   | `get_page_content`, `list_child_blocks`, `get_root_info`, `get_breadcrumbs` | Read pages, list children, navigate hierarchy |
| ๐Ÿ” Search | `search_pages_by_title`                                                     | Fuzzy title search across page tree           |
| โœ๏ธ Write  | `create_page`, `add_block`, `add_code_block`                                | Create pages, append text/lists/headings/code |
| โš™๏ธ Config | `set_wolai_credentials`, `set_root_page`, `get_wolai_config`                | Runtime credential & root page management     |

**11 tools total** โ€” covering read, write, search, and configuration.

---

## ๐Ÿš€ Quick Start

### Install

### Option A: Quick Run with `uvx` (Recommended)

No installation needed โ€” runs in a temporary isolated environment:

```bash
uvx wolai-mcp
```

> Don't have `uv`? Install it: `curl -LsSf https://astral.sh/uv/install.sh | sh`

### Option B: Install with `pip`

```bash
pip install wolai-mcp
```

### Get Credentials

1. Go to [Wolai Developer Console](https://www.wolai.com/dev)
2. Create an application โ†’ get **App ID** and **App Secret**
3. Find the **Root Page ID** from your Wolai page URL

---

## ๐Ÿ“‹ Configuration

All credentials are passed via **environment variables** โ€” no need to edit any code.

| Variable           | Description                          | Required                         |
| ------------------ | ------------------------------------ | -------------------------------- |
| `WOLAI_APP_ID`     | Wolai Application ID                 | โœ…                                |
| `WOLAI_APP_SECRET` | Wolai Application Secret             | โœ…                                |
| `WOLAI_ROOT_ID`    | Root page ID for your knowledge base | Optional (for search/navigation) |

---

## ๐Ÿ”ง Platform Configuration

### Claude Desktop

Add to `claude_desktop_config.json`:

<table><tr><th>uvx (recommended)</th><th>pip</th></tr><tr><td>

```json
{
  "mcpServers": {
    "wolai-kb": {
      "command": "uvx",
      "args": ["wolai-mcp"],
      "env": {
        "WOLAI_APP_ID": "your_app_id",
        "WOLAI_APP_SECRET": "your_secret",
        "WOLAI_ROOT_ID": "your_root_id"
      }
    }
  }
}
```

</td><td>

```json
{
  "mcpServers": {
    "wolai-kb": {
      "command": "wolai-mcp",
      "env": {
        "WOLAI_APP_ID": "your_app_id",
        "WOLAI_APP_SECRET": "your_secret",
        "WOLAI_ROOT_ID": "your_root_id"
      }
    }
  }
}
```

</td></tr></table>

### Gemini CLI

Add to `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "wolai-kb": {
      "command": "wolai-mcp",
      "env": {
        "WOLAI_APP_ID": "your_app_id",
        "WOLAI_APP_SECRET": "your_secret",
        "WOLAI_ROOT_ID": "your_root_id"
      }
    }
  }
}
```

### Cursor / CherryStudio / Other MCP Clients

<table><tr><th>uvx</th><th>pip</th></tr><tr><td>

```json
{
  "wolai-kb": {
    "command": "uvx",
    "args": ["wolai-mcp"],
    "env": {
      "WOLAI_APP_ID": "your_app_id",
      "WOLAI_APP_SECRET": "your_secret",
      "WOLAI_ROOT_ID": "your_root_id"
    }
  }
}
```

</td><td>

```json
{
  "wolai-kb": {
    "command": "wolai-mcp",
    "env": {
      "WOLAI_APP_ID": "your_app_id",
      "WOLAI_APP_SECRET": "your_secret",
      "WOLAI_ROOT_ID": "your_root_id"
    }
  }
}
```

</td></tr></table>

---

## ๐Ÿ’ก Usage Examples

Once configured, ask your AI agent:

- *"่ฏปๅ–ๆˆ‘ Wolai ็Ÿฅ่ฏ†ๅบ“็š„้ฆ–้กตๅ†…ๅฎน"*
- *"ๆœ็ดขๆ ‡้ข˜ๅŒ…ๅซ'้กน็›ฎ่ฎกๅˆ’'็š„้กต้ข"*
- *"ๅœจ้ฆ–้กตไธ‹ๅˆ›ๅปบไธ€ไธชๆ–ฐ้กต้ขๅซ'ไผš่ฎฎ็บช่ฆ'"*
- *"ๅพ€ๆŒ‡ๅฎš้กต้ขๆทปๅŠ ไธ€ๆฎตไปฃ็ "*
- *"ๆ˜พ็คบๅฝ“ๅ‰ Wolai ้…็ฝฎ็Šถๆ€"*

---

## ๐Ÿ” Runtime Configuration

You can also change credentials at runtime without restarting:

- **`set_wolai_credentials`** โ€” Switch Wolai account
- **`set_root_page`** โ€” Change the root knowledge base page
- **`get_wolai_config`** โ€” Check current configuration

---

## ๐Ÿ’– Support This Project

If you find **Wolai MCP** useful, consider buying me a coffee!
Your support keeps this project alive and growing โœจ

<table>
<tr>
<td align="center" width="50%">

### โ˜• ็ˆฑๅ‘็”ต (Afdian)

<a href="https://afdian.com/a/LittlePeter52012">
  <img src="https://img.shields.io/badge/็ˆฑๅ‘็”ต-946CE6?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiPjxwYXRoIGQ9Ik0xMiAyMS4zNWwtMS40NS0xLjMyQzUuNCAxNS4zNiAyIDEyLjI4IDIgOC41IDIgNS40MiA0LjQyIDMgNy41IDNjMS43NCAwIDMuNDEuODEgNC41IDIuMDlDMTMuMDkgMy44MSAxNC43NiAzIDE2LjUgMyAxOS41OCAzIDIyIDUuNDIgMjIgOC41YzAgMy43OC0zLjQgNi44Ni04LjU1IDExLjU0TDEyIDIxLjM1eiIvPjwvc3ZnPg==&logoColor=white" alt="Support on Afdian">
</a>

<sub>Supports Alipay & WeChat Pay</sub>

</td>
<td align="center" width="50%">

### ๐Ÿ’Ž Crypto (USDC / ERC-20)

<a href="https://littlepeter52012.github.io/wolai-mcp/donate.html">
  <img src="https://img.shields.io/badge/USDC%2FETH-Donate_Now-6c5ce7?style=for-the-badge&logo=ethereum&logoColor=white" alt="Donate Crypto">
</a>

<sub>Click to donate โ€” supports MetaMask, SafePal & more</sub>

</td>
</tr>
</table>

> Every little bit helps โ€” **thank you!** ๐Ÿ™

---

## ๐Ÿ“„ License

MIT License โ€” see [LICENSE](LICENSE) for details.