Skip to main content
Glama
gaurav-oberoi

mcp-knowledge-base

mcp-knowledge-base

A Model Context Protocol (MCP) server that exposes a notes knowledge base to MCP clients — Claude Desktop, IDEs, or any agent. It demonstrates the two things an MCP server provides: tools (actions the model can call) and resources (data the model can read). TypeScript, runs over stdio.

mcp typescript

What it exposes

Tools (src/server.ts):

Tool

Purpose

search_notes

keyword search across the knowledge base (title/tags/content weighted)

add_note

add a new note

get_note

fetch one note by id

Resources: every note is readable at note://{id}, with a listing — so a client can browse the knowledge base as data, not just call tools.

The domain logic (the notes store + search ranking) lives in src/notes.ts, separate from the protocol layer.

Related MCP server: simple-mcp-example

Use it with an MCP client

Build it, then point a client at the binary. For example, in Claude Desktop's 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

Tests

npm test

Two layers, both offline:

  • Unit — the notes store and search ranking.

  • Integration — a real MCP Client talks to the server over an in-memory transport (the same way a client would over stdio): it lists tools, calls search_notes/add_note/get_note, and reads a note:// resource. 9 tests total.

License

MIT

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.
    -