feat(mcp): add OpenCode-backed wiki query
Add a query tool group for the wiki-file-assets MCP server that queues fixed /wiki-query OpenCode jobs, exposes status/result/cancel/readiness tools, and keeps query disabled until explicitly enabled. Document the new service switches and config, keep remote query gated in AGENTS.md, preserve token behavior, and pass proxy environment through the managed service so OpenCode smoke/query jobs can reach the model provider. Validation: python3 -m unittest discover -v; python3 -m py_compile obsidian_wiki/mcp_query.py obsidian_wiki/mcp_server.py scripts/manage_mcp_service.py tests/test_mcp_query.py tests/test_mcp_server_remote.py tests/test_mcp_service.py; git diff --check.
This commit is contained in:
@@ -69,9 +69,21 @@ OBSIDIAN_MCP_ENABLE_INGEST=0
|
||||
OBSIDIAN_MCP_INGEST_MAX_FILE_BYTES=104857600
|
||||
OBSIDIAN_MCP_INGEST_MAX_CHUNK_BYTES=4194304
|
||||
OBSIDIAN_MCP_INGEST_MAX_FILES_PER_JOB=10
|
||||
OBSIDIAN_MCP_OPENCODE_PATH=opencode
|
||||
OBSIDIAN_MCP_INGEST_OPENCODE_PATH=opencode
|
||||
OBSIDIAN_MCP_INGEST_RUNTIME_ROOT=.runtime/mcp-ingest
|
||||
|
||||
# Optional MCP query tools. Default is disabled.
|
||||
# When enabled, remote MCP clients sharing this token can ask this machine's
|
||||
# local OpenCode to run the normal wiki-query workflow and return the answer.
|
||||
# The query tool reads the full vault by default; pass public_only=true per tool
|
||||
# call when the remote answer must exclude visibility/internal or visibility/pii
|
||||
# pages. Use OBSIDIAN_MCP_ENABLED_TOOLS=file-assets,query or:
|
||||
# bash scripts/mcp_service.sh tools enable query
|
||||
# bash scripts/mcp_service.sh start --enable-query
|
||||
OBSIDIAN_MCP_QUERY_MAX_CHARS=8000
|
||||
OBSIDIAN_MCP_QUERY_RUNTIME_ROOT=.runtime/mcp-query
|
||||
|
||||
# Wiki categories (directories created in the vault)
|
||||
OBSIDIAN_CATEGORIES=concepts,entities,skills,references,synthesis,journal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user