feat(mcp): serve safe source file assets
Add a stdio MCP server for searching and reading safe engineering source files from the wiki file asset index. The implementation uses registry-backed ACL checks, engineering-file whitelisting, asset:// resource URIs, read-only SQLite access, CLI entrypoints, optional MCP packaging, and unittest coverage for search, metadata, resource reads, blocked sources, bot ACLs, and size limits. Validation: python3 -m unittest discover -v; python3 -m py_compile obsidian_wiki/config.py obsidian_wiki/file_assets.py obsidian_wiki/mcp_assets.py obsidian_wiki/mcp_server.py obsidian_wiki/cli.py tests/test_mcp_assets.py; real BJD vault search/read smoke tests.
This commit is contained in:
@@ -28,6 +28,15 @@ OBSIDIAN_SOURCE_CATALOG_DIR=_sources/catalog
|
||||
# SQLite source-file locator. Leave empty to use _meta/file-assets.sqlite.
|
||||
OBSIDIAN_FILE_ASSET_DB=
|
||||
|
||||
# --- Source File MCP Server (optional) ---
|
||||
#
|
||||
# Run with: obsidian-wiki-mcp
|
||||
# Install extra: pip install "obsidian-wiki[mcp]"
|
||||
# The MCP server serves only safe engineering source files by default.
|
||||
OBSIDIAN_MCP_BOT_PROFILE=bjd-general-bot
|
||||
OBSIDIAN_MCP_MAX_FILE_BYTES=26214400
|
||||
OBSIDIAN_MCP_EXPOSE_PATHS=false
|
||||
|
||||
# Wiki categories (directories created in the vault)
|
||||
OBSIDIAN_CATEGORIES=concepts,entities,skills,references,synthesis,journal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user