Get the FREE Ultimate OpenClaw Setup Guide →

mowen

墨问笔记API的MCP服务器封装,支持在Cursor、Claude Desktop等MCP客户端中操作墨问笔记

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio z4656207-mowen-mcp-server python -m mowen_mcp_server.server \
  --env MOWEN_API_KEY="${env:MOWEN_API_KEY}"

How to use

This MCP server implements the 墨问笔记 (MOWEN) workflow and exposes tools to create, edit, and manage墨问 notes via the MCP protocol. It supports rich text notes, quotes, internal links to other notes, and file uploads (images, audio, PDFs) with both local and remote URLs. The server adheres to MCP 1.9.1, providing a unified interface for note operations and privacy controls. To use it, configure your MCP client (e.g., Cursor, Claude Desktop) to point at this server with the Python-based entry point, and supply your MOWEN API key. You can then issue create_note, edit_note, set_note_privacy, and reset_api_key operations through the MCP client, leveraging the provided paragraph formats and file attachment support described in the README. The server enables file uploads by accepting file-type blocks in note content and supports absolute file paths when running notes that reference local resources, ensuring compatibility across different client working directories.

Typical workflows include creating rich notes with paragraphs that combine normal text, bold or highlighted segments, links, and embedded references to other notes. You can also insert quote blocks and file blocks (image, audio, or PDF) within a single note, either from local storage or remote URLs. Privacy settings allow public/private/rule-based access with optional no_share and expiration controls when using rule-type privacy. If you need to reset your API key, you can call reset_api_key via MCP as well.

How to install

Prerequisites:

  • Python 3.10+ installed
  • Git (optional, for cloning)
  • A valid墨问 API key (MOWEN_API_KEY)

Step 1: Clone the repository (or download the source)

git clone https://github.com/z4656207/mowen-mcp-server.git
cd mowen-mcp-server

Step 2: Install the package in editable mode (recommended)

pip install -e .

Step 3: (Alternative) Install required dependencies directly

pip install mcp httpx pydantic

Step 4: Configure your API key (one of the following)

  • Temporary environment variable (per session):
export MOWEN_API_KEY="你的墨问API密钥"
  • PowerShell (Windows):
$env:MOWEN_API_KEY="你的墨问API密钥"
  • Persisted in .env file (recommended for long-running setups):
MOWEN_API_KEY=你的墨问API密钥

Step 5: Run the server (example)

# If installed in editable mode and entry point is mowen_mcp_server.server
python -m mowen_mcp_server.server

Step 6: (Optional) Integrate with MCP client by adding the mcp_config snippet into your client settings (see mcp_config in this document).

Additional notes

Tips and notes:

  • Ensure you provide MOWEN_API_KEY in the environment before starting the server; the server will use it for all API requests.
  • When referencing local files in file blocks, absolute paths are required because the MCP Server and Client may be running in different working directories.
  • The server supports MCP 1.9.1 features, including creating and editing rich-text notes, inserting quotes and internal links, and uploading files (image, audio, PDF).
  • For file blocks, you can specify source_type as local or url, and file_type as image|audio|pdf, with metadata such as alt text or alignment for images.
  • Privacy settings use note-level controls; for rule-based privacy, you can set no_share and expire_at as needed.
  • If you modify command-line invocation or paths, ensure your MCP client config (mcp_servers) points to the correct entry point and that MOWEN_API_KEY is accessible to the running process.

Related MCP Servers

Sponsor this space

Reach thousands of developers