pmwiki-mcp
v1.0.0
Published
MCP server for PmWiki - enables AI agents to read, create, and edit wiki pages
Maintainers
Readme
PmWiki MCP Server
A Model Context Protocol (MCP) server that enables AI agents like Claude to interact with a PmWiki instance.
Features
- wiki_find_pages - Search for pages by name or content
- wiki_read_page - Read page content (raw, markdown, or HTML)
- wiki_create_page - Create new wiki pages
- wiki_edit_page - Edit existing wiki pages
- wiki_list_pages - List pages in a group
Installation
Using npx (recommended)
No installation needed - just configure Claude Desktop:
{
"mcpServers": {
"pmwiki": {
"command": "npx",
"args": ["-y", "pmwiki-mcp"],
"env": {
"PMWIKI_URL": "https://your-wiki-url.com",
"PMWIKI_MCP_KEY": "your-mcp-key-here"
}
}
}
}Global installation
npm install -g pmwiki-mcpConfiguration
The server requires two environment variables:
| Variable | Description |
|----------|-------------|
| PMWIKI_URL | Base URL of your wiki (e.g., https://wiki.example.com) |
| PMWIKI_MCP_KEY | MCP authentication key (generated via ?action=mcpkeygen) |
Server Setup
Your PmWiki installation needs the MCP cookbook (cookbook/mcp.php) which provides the API endpoints:
- Copy
cookbook/mcp.phpto your wiki's cookbook directory - Add to
local/config.php:include_once("$FarmD/cookbook/mcp.php"); - Generate an MCP key by visiting
?action=mcpkeygenwhile logged in as admin - Save the key securely - it provides full read/write access to all pages
Tools
wiki_find_pages
Search for wiki pages by name or content.
Parameters:
query(required) - Search querygroup(optional) - Limit search to a specific groupnameOnly(optional) - Only search page names, not contentlimit(optional) - Maximum results (default: 50)
Example:
Search for pages about "authentication"wiki_read_page
Read a wiki page's content.
Parameters:
pagename(required) - Page name (e.g., "Main.HomePage" or "Main/HomePage")format(optional) - Output format:raw,markdown, orhtml(default: raw)
Example:
Read the page Main/AdminPage in markdown formatwiki_create_page
Create a new wiki page.
Parameters:
pagename(required) - Page namecontent(required) - Page content in PmWiki markupsummary(optional) - Edit summary
Example:
Create page Main.NewPage with content "!! Welcome\n\nThis is a new page."wiki_edit_page
Edit an existing wiki page.
Parameters:
pagename(required) - Page namecontent(required) - New page contentsummary(optional) - Edit summary
wiki_list_pages
List wiki pages in a group.
Parameters:
group(optional) - Group name (lists all if omitted)limit(optional) - Maximum pages (default: 100)
Example:
List all pages in the Main groupSecurity
- The MCP key provides full access to all wiki pages - protect it like a password
- All requests are logged to
wiki.d/.mcplog - Rate limiting prevents abuse (60 requests per minute per IP)
- HTTPS is strongly recommended for production use
Development
# Clone the repository
git clone https://github.com/milee98/pmwiki.git
cd pmwiki/pmwiki-mcp
# Install dependencies
npm install
# Build
npm run build
# Run locally
PMWIKI_URL=https://wiki.example.com PMWIKI_MCP_KEY=xxx npm startLicense
MIT
