feat(mcp): separate direct order queries from wiki tools

Add an opt-in business group with schema, template, guarded SQL, and status tools. Reuse existing order statistics through read-only SQLite connections without OpenCode or wiki retrieval.

Add tools set for switching enabled groups with one restart. Gate file diagnostics with file-assets and document business-only operation while retaining the independent Kingdee sync task.

Validation: 217 unit tests passed; business tool tests rerun after read-only annotations. Live authenticated MCP schema/status/template/SQL calls passed, ask_wiki was unavailable, uploads returned 404, and unauthenticated requests returned 401.
This commit is contained in:
Codex
2026-10-31 06:47:43 +00:00
parent 1133e2bf50
commit 6c451c3eb6
10 changed files with 500 additions and 44 deletions
+4
View File
@@ -71,6 +71,10 @@ OBSIDIAN_MCP_HOST=127.0.0.1
OBSIDIAN_MCP_PORT=8765
OBSIDIAN_MCP_PATH=/mcp
OBSIDIAN_MCP_ENABLED_TOOLS=file-assets
# Direct order queries without Wiki/OpenCode: set the managed service with
# scripts/mcp_service.sh tools set business
# Optional separate existing business database; default is <vault>/_meta/business-facts.sqlite.
# OBSIDIAN_MCP_BUSINESS_DB=/path/to/business-facts.sqlite
# Optional public URLs shown to remote agents in capabilities/config output.
# Set PUBLIC_BASE_URL when /mcp is behind DNS/tunnel/reverse proxy.
OBSIDIAN_MCP_PUBLIC_BASE_URL=