Files
conversation-history/Conversations/2026-04-17-mcp-web-client-obsidian-paths.md

2.4 KiB

MCP Web Client Vault Path Rules

MCP / Obsidian Relative Paths for Web Client

Context

When Kimi Code (or Kimi Claw) runs from the web client, it reaches the Obsidian vault through this MCP server (hermes-mcp). It has no knowledge of the host's absolute filesystem paths (e.g. /home/garfield/vaults/...). Therefore, all paths must be vault-relative — both as inputs to tools and in results returned to the model.


Prompt for Searching MQL Trading EA Notes

Use this prompt in Kimi Code (web) to search and summarize your MQL trading EA notes:

Use the Obsidian tools to help me with my notes.

1. Search for notes related to `mql trading ea` across my vault.
2. Read any relevant notes you find.
3. Summarize what I've been working on — especially anything about MQL, trading EAs, bugs, strategies, or recent changes.

Important rules:
- All paths are relative to the vault root. Do not use absolute paths like `/home/...`.
- When searching, use obsidian_search_notes with the query.
- When reading or appending, use the exact relative path returned by search (e.g. `Trading/EAs/MyEA.md`).
- If you need to write follow-up notes, append to an existing note or create one with a relative path like `Trading/Notes/2026-04-17.md`.

Code Changes Made

File: src/tools.ts

Updated tool descriptions to enforce relative-path semantics for web clients:

  1. obsidian_search_notes

    • Description now states: Returns note paths relative to the vault root (e.g. "Daily Notes/2026-04-15.md"). Always use these exact relative paths when calling obsidian_read_note or obsidian_append_to_note.
    • path_filter description updated to clarify it's a relative vault path filter.
  2. obsidian_read_note

    • Description now states: Retrieve the full content of a specific Obsidian note by relative vault path... The path must be relative to the vault root. Do not use absolute filesystem paths.
  3. obsidian_append_to_note

    • Description now states: ...The path must be relative to the vault root. Do not use absolute filesystem paths.

Build

  • Ran npm run build (TypeScript → dist/tools.js).
  • Verified updated strings present in compiled output.

Key Principle

The MCP server is the boundary. The web client only knows vault-relative paths. Keep everything relative so read → search → append chains work seamlessly.