Refactor: Organize Obsidian MCP into proper package structure
Moved obsidian_mcp.py into mcp_servers/obsidian/ to align with other MCP server organization (SSH, Cloudflare, Loki). This improves code discoverability and maintains consistent package structure. Changes: - Moved obsidian_mcp.py → mcp_servers/obsidian/obsidian_mcp.py - Updated lazy import in llm_interface.py (line 396) - Updated lazy import in tools.py (line 550) - Deleted empty scripts/ directory All imports verified with runtime tests. Zero functional changes. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -393,7 +393,7 @@ class LLMInterface:
|
|||||||
|
|
||||||
# Conditionally add Obsidian MCP server
|
# Conditionally add Obsidian MCP server
|
||||||
try:
|
try:
|
||||||
from obsidian_mcp import (
|
from mcp_servers.obsidian.obsidian_mcp import (
|
||||||
is_obsidian_enabled,
|
is_obsidian_enabled,
|
||||||
check_obsidian_health,
|
check_obsidian_health,
|
||||||
get_obsidian_server_config,
|
get_obsidian_server_config,
|
||||||
|
|||||||
1
mcp_servers/obsidian/__init__.py
Normal file
1
mcp_servers/obsidian/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# mcp_servers.obsidian - Obsidian MCP server integration
|
||||||
4
tools.py
4
tools.py
@@ -547,7 +547,7 @@ def _execute_obsidian_tool(
|
|||||||
) -> str:
|
) -> str:
|
||||||
"""Execute an Obsidian MCP tool with fallback to custom tools."""
|
"""Execute an Obsidian MCP tool with fallback to custom tools."""
|
||||||
try:
|
try:
|
||||||
from obsidian_mcp import (
|
from mcp_servers.obsidian.obsidian_mcp import (
|
||||||
check_obsidian_health,
|
check_obsidian_health,
|
||||||
should_fallback_to_custom,
|
should_fallback_to_custom,
|
||||||
)
|
)
|
||||||
@@ -572,7 +572,7 @@ def _execute_obsidian_tool(
|
|||||||
f"Please start Obsidian desktop app."
|
f"Please start Obsidian desktop app."
|
||||||
)
|
)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
return f"Error: obsidian_mcp module not found for tool '{tool_name}'"
|
return f"Error: mcp_servers.obsidian.obsidian_mcp module not found for tool '{tool_name}'"
|
||||||
|
|
||||||
|
|
||||||
# Maximum characters of tool output to return (prevents token explosion)
|
# Maximum characters of tool output to return (prevents token explosion)
|
||||||
|
|||||||
Reference in New Issue
Block a user