Skip to main content
Glama
Pocket Notes MCP

Pocket Notes MCP

by fredisbusy

Pocket Notes MCP

장보기 메모를 예제로 MCP를 쉽게 배우는 작은 TypeScript 프로젝트입니다.

익숙한 장보기 흐름만 알면 됩니다.

장보기 메모 보기 → 새 메모 만들기 → 분류별로 확인 → 체크리스트 만들기

메모는 로컬 data/notes.json 파일에 저장됩니다. 데이터베이스나 외부 서비스는 사용하지 않습니다.

먼저 해볼 것

MCP Host에 서버를 연결한 뒤 아래처럼 요청해 보세요.

  • "저장된 장보기 메모를 보여줘."

  • "우유 1팩과 달걀 10개를 이번 주 장보기 메모로 저장해 줘."

  • "식료품으로 분류된 메모만 보여줘."

  • "이 메모를 매장에서 볼 체크리스트로 만들어 줘."

Related MCP server: API MCP Server

장보기로 배우는 MCP

MCP 개념

장보기 예제

Tools

메모 보기, 만들기, 분류 확인

Structured output

장보기 메모 목록을 JSON 형태로 반환

Resources

저장된 메모 전체 또는 하나를 읽기

Resource links

새 메모를 만들면 바로 읽을 수 있는 URI 반환

Prompts

메모를 체크리스트·절약 목록·식사 계획으로 정리

Completion

메모 ID와 정리 방식을 추천

Notifications

새 메모가 생겼음을 Client에 알림

Progress / cancellation

여러 메모의 분류를 확인하는 진행 상황

Multi-round-trip input

Sampling·Elicitation·Roots 입력을 받아 원 요청 재실행

Subscriptions

subscriptions/listen으로 메모 목록 변경 알림

Cache hints

목록·Resource·Discovery 결과의 TTL과 공개 범위

Logging

stdio의 stderr로 메모 생성 이벤트 기록

Tools, Resources, Prompts가 프로젝트의 핵심입니다. 최신 2026-07-28 프로토콜에서는 server/discover와 요청별 capability를 사용하고, Client 입력은 multi-round-trip input_required 결과로 요청합니다. Sampling과 Roots는 deprecated 예제를 이해하기 위해 남겨 두었으며 Client가 해당 입력 요청을 지원할 때만 작동합니다.

주요 기능

Tools

이름

하는 일

list_notes

저장된 장보기 메모 보기

create_note

새 장보기 메모 만들기

analyze_notes

분류별 메모 수 확인

summarize_note

Host 모델로 메모를 짧게 정리

create_note_interactive

입력 폼으로 메모 만들기

list_workspace_roots

Client가 공개한 작업 폴더 보기

Resources

notes://catalog
notes://note/{id}

notes://catalog는 전체 목록이고, notes://note/{id}는 메모 하나의 전체 내용입니다.

Prompt

prepare_shopping은 저장된 메모를 다음 방식으로 정리합니다.

  • simple: 살 것만 짧게

  • checklist: 매장에서 체크할 목록으로

  • budget: 꼭 필요한 것과 나중에 살 것으로

  • meal: 만들 수 있는 식사와 빠진 재료로

실행하기

요구사항:

  • Node.js 24 LTS 권장

  • Node.js 22 LTS도 호환

  • pnpm 10 이상

cd /Users/home/Projects/pocket-notes-mcp
pnpm install
pnpm check

개발 모드:

pnpm dev

아무 출력 없이 실행을 기다리는 것이 정상입니다. stdio MCP 서버는 터미널에서 직접 사용하는 CLI가 아니라 MCP Host의 JSON-RPC 메시지를 기다립니다.

빌드된 서버 실행:

pnpm build
pnpm start

MCP Host에 연결하기

제품마다 설정 모양은 조금 다르지만 필요한 값은 같습니다.

{
  "mcpServers": {
    "pocket-notes": {
      "command": "node",
      "args": [
        "/Users/home/Projects/pocket-notes-mcp/dist/index.js"
      ],
      "env": {
        "POCKET_NOTES_FILE": "/Users/home/Projects/pocket-notes-mcp/data/notes.json"
      }
    }
  }
}

POCKET_NOTES_FILE을 생략하면 현재 작업 폴더의 data/notes.json을 사용합니다.

MCP Inspector로 살펴보기

pnpm build
npx @modelcontextprotocol/inspector \
  node /Users/home/Projects/pocket-notes-mcp/dist/index.js

Inspector에서는 다음 순서로 보면 쉽습니다.

  1. list_notes Tool 호출

  2. notes://catalog Resource 읽기

  3. create_note로 메모 만들기

  4. 반환된 notes://note/{id} 링크 읽기

  5. prepare_shopping Prompt를 checklist 방식으로 실행

프로젝트 구조

pocket-notes-mcp/
├── src/
│   ├── index.ts                 stdio 연결
│   ├── server.ts                MCP 서버 조립
│   ├── register-tools.ts        기본 Tools
│   ├── register-client-tools.ts Sampling, Elicitation, Roots
│   ├── register-resources.ts    장보기 Resources
│   ├── register-prompts.ts      장보기 Prompt와 Completion
│   ├── note-store.ts            JSON 파일 저장소
│   └── note.ts                  메모 타입과 Markdown 변환
├── data/
│   └── notes.json               장보기 예제
├── tests/                       실제 MCP 연결 테스트
└── scripts/
    └── stdio-smoke.ts           실제 프로세스 연결 확인

파일은 MCP 개념별로만 나눴습니다. 학습에 필요하지 않은 프레임워크, 데이터베이스, DI 컨테이너는 넣지 않았습니다.

테스트

pnpm test

테스트는 함수만 따로 호출하지 않습니다. 실제 MCP Client와 Server를 메모리에서 연결해 Tool, Resource, Prompt, Completion과 양방향 기능을 확인합니다.

전체 검증:

pnpm check

안전 경계

  • 서버는 POCKET_NOTES_FILE로 지정한 JSON 파일만 읽고 씁니다.

  • 새 메모를 추가할 뿐 기존 메모를 삭제하지 않습니다.

  • 저장 중 파일이 깨지지 않도록 임시 파일을 만든 뒤 교체합니다.

  • 입력 폼에는 비밀번호나 API 키를 적지 마세요.

  • 실제 승인과 권한 관리는 MCP Host가 담당합니다.

공식 자료

Available Tools

5 tools
analyze_notesAnalyze note tagsA
Read-onlyIdempotent

Count notes by tag while demonstrating MCP progress notifications and cancellation.

Inputs: no named parameters. Returns: tags, noteCount

create_note_interactiveCreate note interactivelyA

Ask the user for non-sensitive note fields through MCP form elicitation, then create the note.

Inputs: no named parameters.

list_notesList notesA
Read-onlyIdempotent

List note summaries, optionally filtered by an exact tag.

Inputs: tag. Returns: count, notes

list_workspace_rootsList client workspace rootsA
Read-onlyIdempotent

Ask the MCP client which workspace roots it has made available to this server.

Inputs: no named parameters.

summarize_noteSummarize note with the host modelA
Read-only

Read a note and ask the MCP client's language model to summarize it using MCP sampling.

Inputs: noteId (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: listing notes with optional tag filter, analyzing notes by tag, summarizing a note via sampling, interactively creating a note, and listing workspace roots. No overlap or ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (e.g., list_notes, analyze_notes, summarize_note, create_note_interactive, list_workspace_roots), making them predictable and easy to parse.

    Tool Count5/5

    With 5 tools, the server is well-scoped for its purpose of demonstrating MCP features (progress notifications, sampling, form elicitation, workspace roots) while maintaining a manageable tool surface.

    Completeness2/5

    As a notes management server, essential operations like updating, deleting, or searching notes are missing. The tool set is incomplete for actual note management, likely because it prioritizes demonstrating MCP capabilities over full CRUD coverage.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      Not graded
      maintenance
      A demonstration TypeScript MCP server that showcases basic MCP concepts with simple tools (greeting, calculator), text resources, and prompt templates for learning the Model Context Protocol.
      2
      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
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A minimal test MCP server built with TypeScript, demonstrating basic Model Context Protocol capabilities like tools, resources, and prompts.
      MIT