feat: add locale parameter to all page creation and search tools - #5
Open
RastaChaum wants to merge 15 commits into
Open
feat: add locale parameter to all page creation and search tools#5RastaChaum wants to merge 15 commits into
RastaChaum wants to merge 15 commits into
Conversation
added 6 commits
January 11, 2026 14:26
- Add locale parameter to wikijs_create_page function signature with default value 'en' - Update function documentation to describe the locale parameter - Use the locale parameter in GraphQL mutation instead of hardcoded 'en' - Allows users to create pages in different languages (fr, de, es, etc.) This enhancement enables multi-language support for page creation, making it possible to create pages directly in the desired language instead of always defaulting to English.
- Add locale parameter to wikijs_create_space - Add locale parameter to wikijs_generate_file_overview - Add locale parameter to wikijs_create_repo_structure - Add locale parameter to wikijs_create_nested_page - Update docstrings to document locale parameter - Propagate locale to all wikijs_create_page calls This completes the multi-language support across all page creation tools.
- wikijs_get_page: add locale param for singleByPath lookup (was hardcoded 'fr') - wikijs_search_pages: add locale param for search query (was hardcoded 'fr') - wikijs_create_documentation_hierarchy: add locale param, propagate to repo structure and file overviews - wikijs_bulk_update_project_docs: add locale param, propagate to generate_file_overview - Add CLAUDE.md and copilot-instructions.md for homelab wiki guidelines
There was a problem hiding this comment.
Pull request overview
This PR extends the Wiki.js MCP server to better support multilingual wikis by introducing a locale parameter (default "en") across page creation/query/search-related tools, and adds a new wikijs_move_page tool for renaming/moving pages via path updates.
Changes:
- Added
locale: str = "en"to multiple MCP tools and propagated it through higher-level tooling flows (repo structure, nested pages, file overviews, bulk updates). - Added
wikijs_move_pageand extendedwikijs_update_pagewith an optionalpathparameter for slug/path changes. - Modified the HTTP client configuration to force HTTP/1.1 and disable SSL verification.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
src/wiki_mcp_server.py |
Adds locale parameters to tools, introduces page move functionality, adds path to updates, and changes HTTP client TLS/HTTP2 settings. |
CLAUDE.md |
Adds repository guidance documentation (commands, architecture, and HomeLab Wiki usage rules). |
.github/copilot-instructions.md |
Adds HomeLab documentation directives, including mandatory French locale usage guidance for operations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+102
to
+104
| # Force HTTP/1.1 to avoid Traefik HTTP/2 PROTOCOL_ERROR | ||
| # Disable SSL verification for self-signed certificates | ||
| self.client = httpx.AsyncClient(timeout=30.0, http2=False, verify=False) |
|
|
||
| @mcp.tool() | ||
| async def wikijs_create_nested_page(title: str, content: str, parent_path: str, create_parent_if_missing: bool = True) -> str: | ||
| async def wikijs_create_nested_page(title: str, content: str, parent_path: str, create_parent_if_missing: bool = True, locale: str = "en") -> str: |
Comment on lines
+548
to
+552
| "description": current_page.get("description", ""), | ||
| "editor": "markdown", | ||
| "isPrivate": current_page.get("isPrivate", False), | ||
| "isPublished": current_page.get("isPublished", True), | ||
| "locale": current_page.get("locale", "en"), |
Comment on lines
447
to
452
| "isPrivate": current_page.get("isPrivate", False), | ||
| "isPublished": current_page.get("isPublished", True), | ||
| "locale": current_page.get("locale", "en"), | ||
| "path": current_page["path"], | ||
| "path": new_path, | ||
| "scriptCss": "", | ||
| "scriptJs": "", |
| context: str, | ||
| auto_create_missing: bool = True | ||
| auto_create_missing: bool = True, | ||
| locale: str = "en" |
| query($path: String!, $locale: String!) { | ||
| pages { | ||
| singleByPath(path: $path, locale: "en") { | ||
| singleByPath(path: $path, locale: $locale) { |
added 9 commits
May 10, 2026 18:22
- Add MCP_TRANSPORT, MCP_HOST, MCP_PORT settings to support SSE mode - SSE transport enables network-wide access from any client on the LAN - lxc/create-lxc.sh: Proxmox host script to create Debian 12 LXC container - lxc/install.sh: in-container install script (systemd service, venv, git clone) - lxc/wiki-js-mcp.service: hardened systemd unit (non-root, PrivateTmp, etc.) - lxc/README.md: deployment guide
…late docs to English - community-scripts/ct/wiki-js-mcp.sh: community-scripts format ct script with custom build_container override for pre-submission testing; sources build.func from official repo for interactive setup (INSTALL_SCRIPT_URL env var overridable) - community-scripts/install/wiki-js-mcp-install.sh: standard install.func based container installer (Python venv, git clone, systemd service) - community-scripts/README.md: deployment guide and ProxmoxVED submission steps - lxc/create-lxc.sh: translated comments/messages to English - lxc/install.sh: translated comments/messages to English - lxc/README.md: full rewrite in English
…lise pages.move au lieu de pages.update - create_nested_page: singleByPath utilisait locale: "en" hardcodé → ne trouvait jamais les pages fr → RetryError - move_page: remplace pages.update (déclenche rebuild-tree avec duplicate key bug Wiki.js 2.x) par la mutation pages.move dédiée
|
+1 ! Juste wrote the same feature, was ready to push it then saw your pull request ! Thank you ☕️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a
localeparameter to all Wiki.js MCP tools that create or query pages, allowing proper multi-language support.Motivation
Wiki.js is a multilingual platform, but all tools previously hardcoded
locale: "en"(or in some caseslocale: "fr"). This prevented users from using the MCP server with non-English wikis.Changes
New
localeparameter (default:"en")wikijs_create_page— locale applied to page creation mutationwikijs_create_space— locale propagated to underlyingwikijs_create_pagewikijs_create_repo_structure— locale propagated to all created pageswikijs_create_nested_page— locale propagated through the hierarchywikijs_create_documentation_hierarchy— locale propagated to repo structure and file overviewswikijs_generate_file_overview— locale applied when creating new pageswikijs_bulk_update_project_docs— locale propagated to file overview creationFixed hardcoded locales
wikijs_get_page(slug lookup): was hardcodedlocale: "fr", now useslocaleparameter (default"en")wikijs_search_pages: was hardcodedlocale: "fr", now useslocaleparameter (default"en")New tool:
wikijs_move_pageMoves/renames a page by updating its path/slug, preserving all other page attributes.
Other fixes
wikijs_update_page: added optionalpathparameter to allow renaming a page's slug without a separate move stepBackward Compatibility
All new parameters use
locale: str = "en"as default, preserving existing behavior for English wikis.