MCP Notes Server について
MCP Notes Serverは、`~/DocumentationGenerator/notes/`に保存されたJSON形式のノートにアクセスする小規模なサーバーです。ノートの一覧表示、取得、検索が必要なMCPクライアントを対象としています。
主な機能
- 01すべてのノートの一覧表示
- 02名前によるノート取得
- 03クエリによる検索
- 04指定したノート内の検索
活用シーン
- 01登録済みノートの確認
- 02特定のノートの取得
- 03クエリに合うノートの検索
- 04単一ノート内での関連内容の検索
MCP 対応
HTTP経由で、ノートの一覧、取得、検索コマンドをMCPクライアントに提供します。
設定
リモートサーバーはインストール不要です。クライアントを選んで設定をコピーするか、ワンクリックで導入できます。
エンドポイント
http://localhost:8000インストールコマンドをコピー
Claude CodeTerminal
claude mcp add --transport http notes http://localhost:8000Cursor.cursor/mcp.json
{"mcpServers":{"notes":{"type":"http","url":"http://localhost:8000"}}}Cursor で開くVS Code.vscode/mcp.json
{"servers":{"notes":{"type":"http","url":"http://localhost:8000"}}}VS Code で開くClaude Desktopclaude_desktop_config.json
{"mcpServers":{"notes":{"type":"http","url":"http://localhost:8000"}}}Windsurf~/.codeium/windsurf/mcp_config.json
{"mcpServers":{"notes":{"serverUrl":"http://localhost:8000"}}}コマンドはターミナルで実行し、JSON は各クライアントの MCP 設定に貼り付けて再起動します。認可が必要なサーバーは初回接続時にログインを求めます。
ツール
詳細
MCP Notes Server
~/DocumentationGenerator/notes/ に保存されたメモにアクセスできる、シンプルな MCP(Message Coordination Protocol)サーバーです。
セットアップ
- Python 3.7+ がインストールされていることを確認します
- 仮想環境を作成します:
python -m venv venv - 仮想環境を有効化します:
- macOS/Linux の場合:
source venv/bin/activate - Windows の場合:
venv\Scripts\activate
- macOS/Linux の場合:
- 依存関係をインストールします:
pip install -r requirements.txt
サーバーの実行
MCP サーバーを起動するには:
python notes.py
これにより、サーバーが http://0.0.0.0:8000 で起動します。
API エンドポイント
サーバーは次の MCP コマンドを公開します:
list_notes()- すべてのメモを取得しますget_note(note_name)- 名前を指定して特定のメモを取得しますsearch(query, note_name=None)- クエリ文字列でメモを検索します
メモの形式
メモは、指定されたディレクトリに次の形式の JSON ファイルとして保存されます:
{
"category": "category",
"summary": "summary of the notes",
"tags": [
{
"tag": "tag of the sub detail",
"summary": "high level business logic of the sub details",
"messages": [
{
"timestamp": "timestamp of the message",
"message": "message content"
},
{
"timestamp": "timestamp of the message",
"message": "message content"
},
...
]
}
]
}
クライアントの使用例
クライアントから MCP サーバーに接続する方法を示す、シンプルな Python の例です:
from mcp.client import MCPClient
# Connect to the MCP server
client = MCPClient("http://localhost:8000")
# List all notes
notes = client.call("notes.list_notes")
# Get a specific note
note = client.call("notes.get_note", note_name="your-note-name")
# Search for notes
search_results = client.call("notes.search", query="important")
コメント
Markdown 対応
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。