Skip to main content

MCP Server for Google Keep

Project description

keep-mcp

MCP server for Google Keep

keep-mcp

How to use

  1. Add the MCP server to your MCP servers:
  "mcpServers": {
    "keep-mcp-pipx": {
      "command": "pipx",
      "args": [
        "run",
        "keep-mcp"
      ],
      "env": {
        "GOOGLE_EMAIL": "Your Google Email",
        "GOOGLE_MASTER_TOKEN": "Your Google Master Token - see README.md"
      }
    }
  }
  1. Add your credentials:
  • GOOGLE_EMAIL: Your Google account email address
  • GOOGLE_MASTER_TOKEN: Your Google account master token

Check https://gkeepapi.readthedocs.io/en/latest/#obtaining-a-master-token and https://github.com/simon-weber/gpsoauth?tab=readme-ov-file#alternative-flow for more information.

Features

Query and read tools

  • find: Search notes with optional filters for labels, colors, pinned, archived, and trashed
  • get_note: Get a single note by ID

Creation and update tools

  • create_note: Create a new note with title and text (automatically adds keep-mcp label)
  • create_list: Create a checklist note
  • update_note: Update a note's title and text
  • add_list_item: Add an item to a checklist note
  • update_list_item: Update checklist item text and checked state
  • delete_list_item: Delete a checklist item

Note state tools

  • set_note_color: Set a note color (valid values: DEFAULT, RED, ORANGE, YELLOW, GREEN, TEAL, BLUE, CERULEAN, PURPLE, PINK, BROWN, GRAY)
  • pin_note: Pin or unpin a note
  • archive_note: Archive or unarchive a note
  • trash_note: Move a note to trash
  • restore_note: Restore a trashed/deleted note
  • delete_note: Mark a note for deletion

Labels, collaborators, and media tools

  • list_labels: List labels
  • create_label: Create a label
  • delete_label: Delete a label
  • add_label_to_note: Add a label to a note
  • remove_label_from_note: Remove a label from a note
  • list_note_collaborators: List collaborator emails for a note
  • add_note_collaborator: Add a collaborator email to a note
  • remove_note_collaborator: Remove a collaborator email from a note
  • list_note_media: List media blobs for a note (with media links)

By default, all destructive and modification operations are restricted to notes that have were created by the MCP server (i.e. have the keep-mcp label). Set UNSAFE_MODE to true to bypass this restriction.

"env": {
  ...
  "UNSAFE_MODE": "true"
}

Local development (uv + make)

If you prefer a JS-style workflow (npm i, npm start), use the included Makefile:

make install   # like npm i
make start     # like npm start
make test
make lint

Run the real-account smoke test with credentials:

GOOGLE_EMAIL="you@example.com" \
GOOGLE_MASTER_TOKEN="..." \
make smoke

Equivalent direct uv commands (without make):

UV_CACHE_DIR=/tmp/uv-cache uv venv --python 3.11 .venv
UV_CACHE_DIR=/tmp/uv-cache uv pip install --python .venv/bin/python -e .
UV_CACHE_DIR=/tmp/uv-cache uv run --no-sync --python .venv/bin/python -m server

Testing

Unit tests (default)

The project includes a lightweight unit test suite under tests/.

It validates:

  • note serialization shape for note and list objects (including labels, collaborators, media, and list items)
  • modification safety behavior (keep-mcp label requirement and UNSAFE_MODE=true override)
  • MCP tool behavior in src/server/cli.py using mocked Keep client objects (tool happy paths and key error paths)

Run locally:

make test

Smoke test against a real Keep account

For additional confidence, run a basic lifecycle smoke test against a dedicated test account:

GOOGLE_EMAIL="you@example.com" \
GOOGLE_MASTER_TOKEN="..." \
make smoke

What it does:

  • create note
  • update note
  • pin/unpin
  • archive/unarchive
  • trash/restore
  • delete

This script is intended for manual verification and is not run in CI.

CI checks

GitHub Actions runs on every pull request and executes:

  • lint (ruff check .)
  • unit tests with coverage (pytest -q --cov=src/server --cov-report=term-missing --cov-fail-under=70)
  • bytecode sanity (python -m compileall src)

Publishing

To publish a new version to PyPI:

  1. Update the version in pyproject.toml
  2. Build the package:
    pipx run build
    
  3. Upload to PyPI:
    pipx run twine upload --repository pypi dist/*
    

Run locally with MCP clients

This is useful when you want a client to run this server from your local checkout instead of PyPI.

  1. Create a local virtualenv and install in editable mode:
cd /ABSOLUTE/PATH/TO/keep-mcp
make install
  1. Add the server to your MCP client config.

config.toml clients (Codex, Goose, etc.)

[mcp_servers.keep_mcp]
command = "make"
args = ["-C", "/ABSOLUTE/PATH/TO/keep-mcp", "start"]

[mcp_servers.keep_mcp.env]
GOOGLE_EMAIL = "you@example.com"
GOOGLE_MASTER_TOKEN = "your-master-token"
UNSAFE_MODE = "false"

JSON mcpServers clients (Claude Desktop, Cursor, Cline, etc.)

{
  "mcpServers": {
    "keep-mcp-local": {
      "command": "make",
      "args": ["-C", "/ABSOLUTE/PATH/TO/keep-mcp", "start"],
      "env": {
        "GOOGLE_EMAIL": "you@example.com",
        "GOOGLE_MASTER_TOKEN": "your-master-token",
        "UNSAFE_MODE": "false"
      }
    }
  }
}

Alternative (without make):

[mcp_servers.keep_mcp]
command = "uv"
args = [
  "--directory", "/ABSOLUTE/PATH/TO/keep-mcp",
  "run", "--no-sync", "--python", ".venv/bin/python",
  "-m", "server"
]

Notes:

  • Run make install once before starting from an MCP client.
  • Only the repo root path is required (no absolute /.venv/bin/python path).
  • Ensure make and uv are in your PATH.
  • Restart your MCP client after updating config files.
  • UNSAFE_MODE is optional; keep it "false" unless you explicitly want to modify non-keep-mcp notes.

Troubleshooting

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keep_mcp-0.3.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keep_mcp-0.3.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file keep_mcp-0.3.0.tar.gz.

File metadata

  • Download URL: keep_mcp-0.3.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for keep_mcp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f2eaece3fbc0b757e8fcfe15665b42704afea86a00bdd8ea43eaa47501988fe8
MD5 ce06e2ef9c9c9b9a7d3e560069f3fef7
BLAKE2b-256 e161a2989ba496d082bd33f4e1ba9de72e95e3f96875c1d648ebe0bd755365b1

See more details on using hashes here.

File details

Details for the file keep_mcp-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: keep_mcp-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for keep_mcp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1271f67daddc9d48f0a1cd3774155748b145273962bb74dac6bc835a0b97cd0b
MD5 35c6feab84f9692fb5897bdc43f229a2
BLAKE2b-256 fd723a610b90876d57cd5500affa4d40a148f8ca2024669497535cab47a0b261

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page