corrected server name. added cwd logging when .env is not found

This commit is contained in:
Markus Pfundstein
2024-12-05 10:03:00 +01:00
parent c43fc39156
commit 1b75b7db07
3 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
[project]
name = "mcp-obsidian"
version = "0.2.0"
version = "0.2.1"
description = "MCP server to work with Obsidian via the remote REST plugin"
readme = "README.md"
requires-python = ">=3.13"

View File

@@ -26,9 +26,9 @@ logger = logging.getLogger("mcp-obsidian")
api_key = os.getenv("OBSIDIAN_API_KEY")
if not api_key:
raise ValueError("OBSIDIAN_API_KEY environment variable required")
raise ValueError(f"OBSIDIAN_API_KEY environment variable required. Working directory: {os.getcwd()}")
app = Server("mcp-knowledge-base")
app = Server("mcp-obsidian")
tool_handlers = {}
def add_tool_handler(tool_class: tools.ToolHandler):

View File

@@ -11,7 +11,7 @@ from . import obsidian
api_key = os.getenv("OBSIDIAN_API_KEY", "")
if api_key == "":
raise ValueError("OBSIDIAN_API_KEY environment variable required")
raise ValueError(f"OBSIDIAN_API_KEY environment variable required. Working directory: {os.getcwd()}")
TOOL_LIST_FILES_IN_VAULT = "list_files_in_vault"
TOOL_LIST_FILES_IN_DIR = "list_files_in_dir"