MCP Server Critique: Architectural Friction and Security Vulnerabilities

This report outlines an engineering and security critique of the wikantik-admin and wikantik-knowledge MCP servers, derived from a session involving large-scale refactoring and aggressive robustness testing ("face-punching").

1. Security Vulnerabilities: Input Validation

Observation: The server allowed renaming a page to ../../../../etc/passwd. While it performed a "normalization" (resulting in ........EtcPasswd), it did not block the path traversal attempt outright. Critique: The normalization logic appears to be a naive replacement of forbidden characters rather than a strict allow-list for CamelCase names. Furthermore, the server accepted a 5,000-character page name and a name containing a null byte (\u0000). Recommendation:

2. Resource Exhaustion and DoS Risks

Observation: The server successfully processed a 5,000-character page name and a complex YAML structure with recursive anchors (YAML Bomb). Critique: While the server didn't crash, the lack of resource limits on string lengths and object depth makes it vulnerable to memory exhaustion attacks. Recommendation:

3. Optimistic Concurrency vs. Background Mutations

Observation: A rename_page call with updateLinks=true mutates other pages, changing their hashes. Critique: If an agent attempts an edit based on a stale hash, the server returns a generic "hash mismatch" error, forcing an extra round-trip to re-read the content. Recommendation: Return the latestContent and newVersion directly in the 409-equivalent error response to allow the agent to rebase immediately.

4. Discovery Friction and "Broken Intent"

Observation: Identifying high-leverage broken links is turn-intensive. Critique: The Admin server knows a link is broken but lacks "semantic awareness" of why. Recommendation: Integrate get_broken_links with the Knowledge server's embedding space to provide "Fix Suggestions" (e.g., "Page SystemsThinking is missing, but SystemsTheory exists with 92% similarity").

5. Architectural Silos

Observation: Conceptual split between Admin and Knowledge servers leads to redundant context gathering. Critique: An agent often needs "is it a page?" (Admin) and "what is it about?" (Knowledge) simultaneously. Recommendation: Consolidate into a single "Agentic API" surface where a single tool call can return both metadata and semantic context.


Final Audit Summary of "Face-Punching" Session

VectorInputResultStatus
Path Traversal../../etc/passwdSanitized to ........EtcPasswdFAIL (Should block)
SQL Injection' OR 1=1 --Handled gracefully (no matches)PASS
Shell Injectiontest; ls -laHandled gracefully (no matches)PASS
Billion LaughsYAML anchors/aliasesProcessed and re-emittedWARN (Potential DoS)
Buffer Overflow5,000 char nameCreated successfullyFAIL (Should limit length)
Null ByteTest\u0000PageCreated successfullyFAIL (Should block)
System Protectdelete_pages(["Main"])RefusedPASS

See Also: