Skip to main content
Glama

noteking-mcp

Version MCP Server TypeScript Node.js NoteKing Engine License: MIT

Official TypeScript-based Model Context Protocol (MCP) server for NoteKing, the local-first Markdown note-taking studio and developer workspace.

This server enables AI assistants and agents (Antigravity, Claude Desktop, Cursor, and custom MCP clients) to seamlessly search, author, append, organize, and pin developer notes, Architecture Decision Records (ADRs), and project workspaces, manage ActiveStorage file attachments, and render GitHub Flavored Markdown directly through the NoteKing REST API.


Features

  • Full MCP Capabilities Suite:

    • 18 Comprehensive Tools: Full CRUD for projects and notes, safe Markdown appending (noteking_append_to_note), full-text search, pin & reorder management, file attachments, and GFM Markdown rendering.

    • 5 MCP Resources: Direct URI inspection via noteking://stats, noteking://projects, noteking://projects/{id}, noteking://notes, and noteking://notes/{id} (Markdown with YAML frontmatter).

    • Developer Note & ADR Prompts + Dynamic Sync: Built-in prompts for authoring structured notes/ADRs (noteking_author_note), synthesizing project workspaces (noteking_summarize_project), and executing {{variable}} note templates (noteking_use_note_template), plus automatic startup registration of saved NoteKing notes.

  • Stdio Transport: Ultra-fast JSON-RPC 2.0 communication over standard input/output.

  • Resilient Attachment Handling: Upload context files via local filesystem paths or base64-encoded strings streamed as multipart/form-data.

  • OpenAPI 3.1 Contract: Strongly typed client generated directly against NoteKing's OpenAPI 3.1.0 specification with runtime Zod validation.

  • Zero Friction Setup: Works out of the box with your local NoteKing Rails server.


Related MCP server: API MCP Server

Architecture Overview

flowchart LR
    Client["AI Agent / Desktop Client<br/>(Antigravity, Claude, Cursor)"]
    Stdio["Stdio Transport<br/>(JSON-RPC 2.0)"]
    MCPServer["NoteKing MCP Server<br/>(@modelcontextprotocol/sdk)"]
    APIClient["Typed NotekingClient<br/>(Node native fetch)"]
    NotekingAPI["NoteKing Rails API<br/>(http://localhost:3000/api/v1)"]

    Client <-->|MCP Protocol| Stdio
    Stdio <--> MCPServer
    MCPServer -->|18 Tools / 5 Resources / Prompts| APIClient
    APIClient <-->|REST JSON & Multipart| NotekingAPI

Quickstart

Prerequisites

  • Node.js: v18.0.0 or higher (recommended: Node 20+)

  • NoteKing: Running locally (default: http://localhost:3000)

Installation & Build

# Clone repository
git clone https://github.com/leouofa/noteking-mcp.git
cd noteking-mcp

# Install dependencies
npm install

# Build the TypeScript distribution
npm run build

Configuration

The server can be configured via environment variables or command-line arguments:

Option

Environment Variable

CLI Flag

Default

Description

API URL

NOTEKING_API_URL

-u, --url <url>

http://localhost:3000

NoteKing API base URL

API Key

NOTEKING_API_KEY

-k, --api-key <key>

(none)

Optional Bearer token for authentication

Timeout

NOTEKING_TIMEOUT_MS

-t, --timeout <ms>

30000

HTTP request timeout in milliseconds

Note Sync

—

--no-sync

true

Eagerly register saved NoteKing notes at startup


Client Integration Guides

1. Antigravity IDE

Add to your local MCP server configuration in Antigravity (~/.gemini/antigravity/mcp_config.json or project settings):

{
  "mcpServers": {
    "noteking": {
      "command": "node",
      "args": ["/Users/leonid/src/noteking-mcp/dist/index.js"],
      "env": {
        "NOTEKING_API_URL": "http://localhost:3000"
      }
    }
  }
}

2. Claude Desktop

Add noteking to your claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "noteking": {
      "command": "node",
      "args": ["/absolute/path/to/noteking-mcp/dist/index.js"],
      "env": {
        "NOTEKING_API_URL": "http://localhost:3000"
      }
    }
  }
}

3. Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "noteking": {
      "command": "node",
      "args": ["/absolute/path/to/noteking-mcp/dist/index.js"],
      "env": {
        "NOTEKING_API_URL": "http://localhost:3000"
      }
    }
  }
}

Available MCP Primitives

MCP Tools (18)

Tool

Description

Key Parameters

noteking_list_projects

Search and list project workspaces

q (query), limit, offset

noteking_get_project

Get project details and associated note index

id

noteking_create_project

Create a new project workspace

name, description

noteking_update_project

Update project name or description

id, name, description

noteking_delete_project

Delete a project (notes preserved as standalone)

id

noteking_list_notes

Search & filter notes across scopes

q, project_id, scope (standalone, all), pinned, limit, offset

noteking_get_note

Retrieve note Markdown body, attachments & HTML

id, render_markdown

noteking_create_note

Create a note (in a project or standalone)

title, body, project_id, pinned, pinned_position

noteking_update_note

Edit note content, project assignment, or pin

id, title, body, project_id, pinned, pinned_position, render_markdown

noteking_append_to_note

Safely append Markdown content to an existing note

id, content, separator, render_markdown

noteking_delete_note

Delete a note and its attachments permanently

id

noteking_toggle_pin

Toggle sidebar pin status for a note

id

noteking_reorder_pinned

Reorder sequential pinned notes

note_ids (array of numbers)

noteking_list_attachments

List files attached to a note

note_id

noteking_upload_attachment

Attach files (paths or base64) to a note

note_id, files (path or content_base64 + filename)

noteking_delete_attachment

Purge an attachment from a note

note_id, attachment_id

noteking_render_markdown

Render GFM into sanitized HTML

text

noteking_get_stats

Inspect platform counts & metrics

(none)

MCP Resources (5)

URI Pattern

MIME Type

Description

noteking://stats

application/json

Workbench metrics (total notes, standalone notes, pinned notes, projects, attachments)

noteking://projects

application/json

Index list of all project workspaces

noteking://projects/{id}

application/json

Project detail including its associated note list

noteking://notes

application/json

Index list of all notes and scratchpads

noteking://notes/{id}

text/markdown

Full note Markdown body with YAML metadata frontmatter

MCP Prompts

  • noteking_use_note_template: Dynamically loads any NoteKing note by ID and populates {{variable}} placeholders from a variables JSON dictionary.

  • noteking_author_note: Interactive engineering guide that assists agents and users in drafting structured ADRs, design docs, runbooks, meeting notes, or scratchpads and saving them to NoteKing.

  • noteking_summarize_project: Loads a NoteKing project and all its associated notes to synthesize an executive project summary, key architectural decisions, and open action items.

  • Dynamic Note Prompts (noteking_<id>_<slug>): On startup, saved NoteKing notes are automatically discovered, {{variable}} placeholders are extracted from the body, and each note is exposed as a typed MCP prompt.


Development & Testing

# Regenerate TypeScript types from openapi.json
npm run typegen

# Typecheck with TypeScript
npm run typecheck

# Run unit and integration tests (Vitest)
npm test

# Build production bundle
npm run build

License

MIT © Leonid Medovyy

Available Tools

18 tools
noteking_append_to_noteA

Safely append a Markdown section or log entry to the end of an existing note without overwriting its prior body

Inputs: id (required), content (required), separator, render_markdown.

noteking_create_noteB

Create a new Markdown note in NoteKing (under a project or as a standalone scratchpad note)

Inputs: title (required), body, pinned, project_id, +1 more.

noteking_create_projectC

Create a new note project workspace in NoteKing

Inputs: name (required), description.

noteking_delete_attachmentC

Purge and delete an attachment from a note

Inputs: note_id (required), attachment_id (required).

noteking_delete_noteB

Permanently delete a note and its attachments from NoteKing

Inputs: id (required).

noteking_delete_projectB

Delete a project from NoteKing (notes belonging to this project are preserved as standalone notes)

Inputs: id (required).

noteking_get_noteB

Retrieve a note's full Markdown content, metadata, attachments, and optional rendered HTML

Inputs: id (required), render_markdown.

noteking_get_projectB

Get full project details including its associated note list index and metadata

Inputs: id (required).

noteking_get_statsA

Get system statistics from NoteKing (total notes, standalone notes, pinned notes, projects, and attachments)

Inputs: no named parameters.

noteking_list_attachmentsC

List file attachments associated with a note

Inputs: note_id (required).

noteking_list_notesB

List, filter, and search notes in NoteKing by full-text query, project, standalone scope, or pinned status

Inputs: q, limit, scope, offset, +2 more.

noteking_list_projectsB

List and search note projects / workspaces in NoteKing with note count metrics and pagination

Inputs: q, limit, offset.

noteking_render_markdownB

Render Markdown text to sanitized HTML using NoteKing's GitHub-flavored markdown pipeline

Inputs: text (required).

noteking_reorder_pinnedC

Update the sequential order of pinned notes displayed in the NoteKing sidebar

Inputs: note_ids (required).

noteking_toggle_pinC

Toggle the pinned status of a note on the NoteKing sidebar

Inputs: id (required).

noteking_update_noteC

Update a note's title, Markdown body, project assignment, or pinned status

Inputs: id (required), body, title, pinned, +3 more.

noteking_update_projectC

Update an existing project's name or description in NoteKing

Inputs: id (required), name, description.

noteking_upload_attachmentB

Upload one or more files to attach to a note in NoteKing (accepts local file paths or base64 data)

Inputs: files (required), note_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 18 tools

    Disambiguation4/5

    Most tools target distinct resources and actions, and the note/project/attachment boundaries are clear. Minor overlap exists: update_note can also change pinned status while toggle_pin exists, and get_note returns attachment info while list_attachments is a separate tool.

    Naming Consistency5/5

    All tools follow a consistent noteking_verb_noun snake_case pattern. Variants like append_to_note, toggle_pin, and render_markdown still fit the same predictable convention.

    Tool Count4/5

    The 18-tool surface is somewhat large but reasonable for a full note workspace covering notes, projects, attachments, pinning, stats, and markdown rendering. A few tools could be consolidated, but each broadly earns its place.

    Completeness4/5

    CRUD coverage for notes and projects is strong, with useful extras like append, pinning, stats, and rendering. The main gap is attachment retrieval/download: attachments can be listed, uploaded, and deleted, but their content cannot be fetched directly.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A TypeScript-based MCP server that enables AI assistants to create, search, list, and delete notes with tags. Serves as a starter template for building custom MCP servers with tools and resources.
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A TypeScript-based MCP server that implements a simple note-taking system using low-level server components and streamable HTTP. It enables users to create, store, and summarize text notes through a set of tools, resources, and specialized prompts.
      3
      -