Obsidian Translation MCP Server
Enables Claude to translate, search, and manage Obsidian notes directly through the Model Context Protocol. It features automatic backups, CRUD operations, and protects metadata and code blocks during the translation process.
README
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
設定
.envファイルを作成:
cp .env.example .env
- 環境変数を設定:
# Obsidian Vaultのパス
OBSIDIAN_VAULT_PATH=/path/to/your/vault
# Anthropic APIキー
ANTHROPIC_API_KEY=sk-ant-...
# バックアップ保持期間(日数)
BACKUP_RETENTION_DAYS=30
# 環境設定
NODE_ENV=production
- 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 を日本語訳して
利用可能なツール
- translate_obsidian_note: ノートを翻訳
- create_obsidian_note: 新しいノートを作成
- read_obsidian_note: ノートを読み取り
- update_obsidian_note: ノートを更新
- search_obsidian_notes: コンテンツで検索
- 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
トラブルシューティング
よくある問題
-
"Vault mismatch"エラー
- 環境変数のVaultパスとURL内のVault名が一致しているか確認
-
"File not found"エラー
- ファイルパスが正しいか確認
- ファイルが実際に存在するか確認
-
"Permission denied"エラー
- Vaultディレクトリの読み書き権限を確認
ログ確認
# サーバーログを確認
tail -f ~/.claude/logs/mcp-server.log
セキュリティ
- 🔒 Vault制限: 指定されたVault以外へのアクセスを禁止
- 🛡️ パス検証: ディレクトリトラバーサル攻撃を防止
- 💾 必須バックアップ: 破壊的操作前に自動バックアップ
- 🔐 APIキー保護: 環境変数で管理、ログ出力禁止
ライセンス
MIT License
作者
[Your Name]
貢献
バグ報告や機能要請は、GitHubのIssuesまでお願いします。
🔗 関連リンク
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.