Skip to main content
Glama
mcp-knowledge-base

mcp-knowledge-base

mcp-knowledge-base

Model Context Protocol (MCP) サーバーで、ノートのナレッジベースを MCP クライアント(Claude Desktop、IDE、または任意のエージェント)に公開します。MCP サーバーが提供する2つの機能、ツール(モデルが呼び出せるアクション)とリソース(モデルが読み取れるデータ)を示しています。TypeScript で書かれ、stdio 上で動作します。

mcp typescript

公開内容

ツール (src/server.ts):

ツール

目的

search_notes

ナレッジベース全体のキーワード検索(タイトル/タグ/本文を重み付け)

add_note

新しいノートを追加

get_note

ID で1件のノートを取得

リソース: 各ノートは note://{id} で読み取れ、一覧も提供されます。つまりクライアントはツールを呼び出すだけでなく、ナレッジベースをデータとして閲覧できます。

ドメインロジック(ノートストアと検索ランキング)は src/notes.ts にあり、プロトコル層から分離されています。

Related MCP server: simple-mcp-example

MCP クライアントで使う

ビルドしてから、クライアントをバイナリに向けます。たとえば Claude Desktop の claude_desktop_config.json では:

{
  "mcpServers": {
    "knowledge-base": { "command": "node", "args": ["/abs/path/to/dist/index.js"] }
  }
}
npm install && npm run build
node dist/index.js     # speaks MCP over stdio

テスト

npm test

2つの層があり、どちらもオフラインで動作します:

  • ユニット — ノートストアと検索ランキング。

  • 統合 — 実際の MCP Client がインメモリトランスポートを介してサーバーと通信します(stdio 経由のクライアントと同じ方法)。ツールの一覧表示、search_notes/add_note/get_note の呼び出し、note:// リソースの読み取りを行います。合計9テスト。

ライセンス

MIT

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • -
    license
    C
    quality
    D
    maintenance
    Enables creating and managing text notes through MCP resources and tools. Provides note creation capabilities and automatic summarization of all stored notes.
    1
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables managing local Markdown notes by creating, viewing, listing, and searching notes and their contents through MCP tools.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables managing notes through add, get, update, delete, and list tools via MCP.
    -