Obsidian Translation MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone <repository-url>
cd obsidian-mcp-server
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "OBSIDIAN_VAULT_PATH=${OBSIDIAN_VAULT_PATH}" -e "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}" obsidian-translate -- node "<FULL_PATH_TO_OBSIDIAN_TRANSLATE_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_OBSIDIAN_TRANSLATE_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

Required:OBSIDIAN_VAULT_PATHANTHROPIC_API_KEY+ 2 optional
README.md

Translate, search, and manage Obsidian notes directly via Claude.

Obsidian Translation MCP Server

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

主要機能

  • 🌐 Obsidian URL解析: obsidian:// URLから直接ノートを翻訳
  • 🔄 自動翻訳: Claude APIを使用した高品質な翻訳
  • 💾 自動バックアップ: 翻訳前の状態を自動で保存
  • 📝 ノート操作: 基本的なCRUD操作(作成・読み取り・更新・検索)
  • 🔍 高度な検索: コンテンツ、タグ、関連ノートの検索
  • 🛡️ セキュリティ: Vault制限、パス検証、エラーハンドリング

インストール

# リポジトリをクローン
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までお願いします。


🔗 関連リンク

Tools (6)

translate_obsidian_noteTranslates an Obsidian note using Claude API.
create_obsidian_noteCreates a new note in the Obsidian vault.
read_obsidian_noteReads the content of an existing Obsidian note.
update_obsidian_noteUpdates an existing Obsidian note.
search_obsidian_notesSearches for notes based on content.
search_obsidian_notes_by_tagsSearches for notes based on specific tags.

Environment Variables

OBSIDIAN_VAULT_PATHrequiredThe absolute path to your Obsidian Vault directory.
ANTHROPIC_API_KEYrequiredYour Anthropic API key for translation services.
BACKUP_RETENTION_DAYSNumber of days to keep automatic backups.
NODE_ENVEnvironment setting (e.g., production).

Configuration

claude_desktop_config.json
{"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"}}}}

Try it

Translate the note located at 'Notes/English Article.md' into Japanese.
Search my vault for all notes tagged with #project-alpha.
Create a new note in the 'Inbox' folder titled 'Meeting Notes' with the content from our conversation.
Read the content of 'Journal/2023-10-27.md' and summarize the key points.
Find all notes containing the phrase 'Model Context Protocol' and update them to include a link to the official documentation.

Frequently Asked Questions

What are the key features of Obsidian Translation?

Automatic translation of Obsidian notes using Claude API. Preservation of YAML frontmatter, code blocks, and Markdown links during translation. Automatic backup of files before performing destructive operations. Advanced search capabilities by content or tags. Security features including vault path validation and directory traversal protection.

What can I use Obsidian Translation for?

Translating personal knowledge base articles into multiple languages for wider accessibility. Automating the creation of daily log entries or meeting summaries directly from Claude. Quickly retrieving and updating specific notes across a large Obsidian vault without leaving the chat interface. Maintaining parallel versions of notes (e.g., English and Japanese) within the same vault.

How do I install Obsidian Translation?

Install Obsidian Translation by running: git clone <repository-url> && cd obsidian-mcp-server && npm install && npm run build

What MCP clients work with Obsidian Translation?

Obsidian Translation works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Obsidian Translation docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare