Skip to main content
Glama
Obsidian Translation MCP Server

Obsidian Translation MCP Server

Obsidian Translation MCP Server

Claude経由でObsidianのノートを直接翻訳・更新できるMCP (Model Context Protocol) Serverです。

主要機能

  • 🌐 Obsidian URL解析: obsidian:// URLから直接ノートを翻訳

  • 🔄 自動翻訳: Claude APIを使用した高品質な翻訳

  • 💾 自動バックアップ: 翻訳前の状態を自動で保存

  • 📝 ノート操作: 基本的なCRUD操作(作成・読み取り・更新・検索)

  • 🔍 高度な検索: コンテンツ、タグ、関連ノートの検索

  • 🛡️ セキュリティ: Vault制限、パス検証、エラーハンドリング

Related MCP server: obsidian-mcp-server

インストール

# リポジトリをクローン
git clone <repository-url>
cd obsidian-mcp-server

# 依存関係をインストール
npm install

# プロジェクトをビルド
npm run build

設定

  1. .envファイルを作成:

cp .env.example .env
  1. 環境変数を設定:

# Obsidian Vaultのパス
OBSIDIAN_VAULT_PATH=/path/to/your/vault

# Anthropic APIキー
ANTHROPIC_API_KEY=sk-ant-...

# バックアップ保持期間(日数)
BACKUP_RETENTION_DAYS=30

# 環境設定
NODE_ENV=production
  1. Claude Desktop設定ファイルを更新:

{
  "mcpServers": {
    "obsidian-translator": {
      "command": "node",
      "args": ["./dist/index.js"],
      "cwd": "/path/to/obsidian-mcp-server",
      "env": {
        "OBSIDIAN_VAULT_PATH": "/path/to/your/vault",
        "ANTHROPIC_API_KEY": "sk-ant-...",
        "NODE_ENV": "production"
      }
    }
  }
}

使用方法

基本的な翻訳

obsidian://open?vault=MyVault&file=Notes/English%20Article.md を日本語訳して

利用可能なツール

  1. translate_obsidian_note: ノートを翻訳

  2. create_obsidian_note: 新しいノートを作成

  3. read_obsidian_note: ノートを読み取り

  4. update_obsidian_note: ノートを更新

  5. search_obsidian_notes: コンテンツで検索

  6. search_obsidian_notes_by_tags: タグで検索

翻訳機能の詳細

保護される要素

  • ✅ YAMLフロントマター

  • ✅ コードブロック (```)

  • ✅ WikiLink ([[リンク]])

  • ✅ Markdownリンク ([テキスト](URL))

翻訳モード

  • replace: 元のファイルを置き換え(デフォルト)

  • append: 翻訳を追記

  • parallel: 並列版を作成(例:note.ja.md)

自動追加メタデータ

translated:
  date: 2024-01-01T00:00:00.000Z
  target_language: 日本語
  model: claude-3-haiku-20240307

開発

開発モード

npm run dev

テスト

npm test

ビルド

npm run build

トラブルシューティング

よくある問題

  1. "Vault mismatch"エラー

    • 環境変数のVaultパスとURL内のVault名が一致しているか確認

  2. "File not found"エラー

    • ファイルパスが正しいか確認

    • ファイルが実際に存在するか確認

  3. "Permission denied"エラー

    • Vaultディレクトリの読み書き権限を確認

ログ確認

# サーバーログを確認
tail -f ~/.claude/logs/mcp-server.log

セキュリティ

  • 🔒 Vault制限: 指定されたVault以外へのアクセスを禁止

  • 🛡️ パス検証: ディレクトリトラバーサル攻撃を防止

  • 💾 必須バックアップ: 破壊的操作前に自動バックアップ

  • 🔐 APIキー保護: 環境変数で管理、ログ出力禁止

ライセンス

MIT License

作者

[Your Name]

貢献

バグ報告や機能要請は、GitHubのIssuesまでお願いします。


🔗 関連リンク

Available Tools

6 tools
create_obsidian_noteC

Create a new Obsidian note with optional frontmatter and tags

Inputs: path (required), title (required), content (required), tags, +1 more.

read_obsidian_noteB

Read content of an existing Obsidian note

Inputs: path (required).

search_obsidian_notesC

Search for notes in Obsidian vault by content or title

Inputs: query (required), directory, maxResults, includeContent.

search_obsidian_notes_by_tagsC

Search for notes by tags

Inputs: tags (required), matchMode, maxResults.

translate_obsidian_noteB

Translate an Obsidian note from obsidian:// URL and update the original file

Inputs: url (required), targetLanguage, mode.

update_obsidian_noteB

Update an existing Obsidian note

Inputs: path (required), content (required), mode, createBackup.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct action: create, read, search (by content/title), search by tags, translate, and update. No two tools have overlapping purposes; the two search tools are clearly differentiated by their search method.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., create_obsidian_note, search_obsidian_notes, translate_obsidian_note). The naming is uniform and predictable.

    Tool Count5/5

    With 6 tools, the server is well-scoped for managing Obsidian notes with translation capabilities. Each tool serves a distinct purpose, and the count is neither too sparse nor overwhelming.

    Completeness4/5

    The tool set covers core note operations (create, read, update, search) and adds translation. A delete tool is missing, but otherwise the surface is adequate for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Connects Claude.ai to your local Obsidian vault for full CRUD access, search, and daily note creation via the Model Context Protocol.
      67 npm
      14
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI to manage Obsidian notes, including creation, reading, updating, deletion, full-text search, listing with filtering, sorting, and metadata extraction via the Model Context Protocol.
      8
      14 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables bidirectional interaction with Obsidian vaults, allowing reading, writing, and organizing notes through Claude.
      MIT