mcp-memo-server
Enables simple memo management with user registration, login, and session-based per-user memo operations (add, list, delete) via MCP.
README
mcp-memo-server
Claude Code から使えるシンプルなメモ管理 MCP サーバです。学習用のサンプル実装です。 簡易的なユーザー認証(ユーザー登録 / ログイン / セッショントークン)に対応しており、メモはユーザーごとに分離されます。
提供するツール
| ツール名 | 説明 | 引数 |
|---|---|---|
register |
ユーザーを新規登録する | username: string, password: string |
login |
ログインしてセッショントークンを取得する | username: string, password: string |
add_memo |
メモを追加する(要ログイン) | token: string, text: string |
list_memos |
自分の登録済みメモの一覧を取得する(要ログイン) | token: string |
delete_memo |
指定IDの自分のメモを削除する(要ログイン) | token: string, id: number |
メモは memos.json(プロジェクト直下)に、ユーザー情報は users.json に保存されます。いずれも .gitignore 済みです。
認証の仕組み(学習ポイント)
- パスワードは Node.js 標準の
crypto.scryptでソルト付きハッシュ化してusers.jsonに保存します(平文保存はしません)。 loginに成功するとランダムなセッショントークンが発行されます。トークンはサーバプロセスのメモリ上のみで管理しており、有効期限は2時間、サーバ再起動で失効します。add_memo/list_memos/delete_memoはtokenを検証し、有効なセッションがなければエラーを返します。list_memos/delete_memoはトークンに紐づくuserIdでメモを絞り込むため、他人のメモは見えません。
注意: これは stdio transport(ローカルプロセス)における学習用の認証実装です。stdio の場合、サーバを起動できる時点でプロセスへの実行権限自体は持っているため、ここでの認証は「本物のセキュリティ境界」というより「複数ユーザーの使い分け」と「認証フローの実装を学ぶ」ことが目的です。
セットアップ
npm install
npm run build
Claude Code への登録
ビルド後、プロジェクトの絶対パスを使って登録します。
claude mcp add --transport stdio memo-server -- node /絶対パス/mcp-memo-server/build/index.js
登録できたか確認:
claude mcp list
Claude Code のセッション内で /mcp と入力すると、memo-server が connected になっていることを確認できます。
使い方の例(Claude Code 内での会話)
> ユーザー名 taro、パスワード pass1234 で登録して
> taro でログインして
> 「Qiitaのネタを考える」というメモを追加して
> 今登録されているメモを一覧で見せて
> ID 1 のメモを削除して
ログイン時に発行されたトークンは会話の中でClaudeが記憶し、以降の add_memo / list_memos / delete_memo 呼び出しに自動的に使い回されます。
手動での動作確認
test-client.mjs は、子プロセスとして起動したサーバに直接 JSON-RPC メッセージ
(initialize → tools/list → tools/call)を送って応答を確認する簡易スクリプトです。
node test-client.mjs
削除する場合
claude mcp remove memo-server
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.