{
  "markdown": "# Notion MCP for Gemini CLI\n\nA lightweight Model Context Protocol (MCP) server that lets Gemini CLI (and other MCP clients) search, read, and write Notion content.\n\n[![CI](https://github.com/gitremko/Gemini_cli_notion_extention/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/gitremko/Gemini_cli_notion_extention/actions/workflows/ci.yml)\n\n## Requirements\n- Gemini CLI installed and working\n- Node.js 20+ and npm\n- A Notion Internal Integration (API key)\n\n## Quick Install (recommended)\n- Install from GitHub:\n  - `gemini extensions install https://github.com/gitremko/Gemini_cli_notion_extention`\n- Create a Notion Internal Integration and grant access (see below)\n- Set your API key (see \"Set API Key\")\n- Restart Gemini CLI, then run: `gemini extensions list` (should show `notion`)\n\n## Create the Notion Integration (required)\n1) Open https://www.notion.so/profile/integrations\n2) Click \"New integration\"\n   - Workspace: choose the workspace you will use\n   - Type: Internal\n   - Capabilities: enable at minimum \"Read content\". To write, also enable \"Insert content\" and \"Update content\".\n   - Save\n3) Grant access to pages/databases\n   - In the integration page, open the \"Access\" tab and add the pages/databases you want to use\n   - Or share specific Notion pages/databases with your integration from Notion\n4) Copy the \"Internal Integration Secret\" â€” this is your API key\n\n## Set API Key\n- Windows (User-scoped, required on Windows)\n  - PowerShell: `[Environment]::SetEnvironmentVariable('NOTION_API_KEY','secret_...','User')`\n  - Open a new terminal after setting it\n- macOS/Linux\n  - Current shell: `export NOTION_API_KEY=secret_...`\n  - Persist: add the export line to `~/.zshrc` or `~/.bashrc`\n\nNotes\n- Windows: this server reads the token only from the User-scoped environment (registry `HKCU\\Environment`).\n- Non-Windows: the token is read from the process environment.\n- Supported names (first match wins): `NOTION_API_KEY`, `GEMINI_NOTION_API_KEY`, `NOTION_TOKEN`, `NOTION_SECRET`.\n\n## Verify the Install\n- Bundled server (no node_modules required):\n  - Windows: `node \"%USERPROFILE%\\.gemini\\extensions\\notion\\dist\\extension.cjs\"`\n  - macOS/Linux: `node \"$HOME/.gemini/extensions/notion/dist/extension.cjs\"`\n- Expected log: `Using Notion API key from: ...` and the process waits for a client connection\n\n## Use in Gemini CLI\n- After install, Gemini CLI discovers the MCP server `notion` automatically.\n- Try a simple tool call (search):\n  - Ask: \"search Notion for 'your term'\" â€” the tool used is `notion_search`.\n\n## Local Development (link)\n- `git clone https://github.com/gitremko/Gemini_cli_notion_extention && cd Gemini_cli_notion_extention`\n- `npm install && npm run build`\n- `gemini extensions link .`\n- Edit code, then `npm run build` and restart Gemini CLI\n- Unlink later: `gemini extensions unlink notion`\n\n## Available Tools (full)\n\n- `notion_search` â€” search pages/databases (query, optional filter, page_size)\n- `notion_get_page` â€” fetch a page object by id\n- `notion_list_blocks` â€” list child blocks for a page/block\n- `notion_append_paragraph` â€” append paragraph text\n- `notion_create_page` â€” create a page in a database (with title property)\n- `notion_create_subpage` â€” create a subpage under a page\n- `notion_query_database` â€” query a database (filter, sorts, cursor, page_size)\n- `notion_update_page` â€” update properties of a page\n- `notion_get_block` â€” fetch a single block by id\n- `notion_append_blocks` â€” append one or more blocks under a parent\n- `notion_archive_page` â€” archive a page\n- `notion_unarchive_page` â€” restore an archived page\n- `notion_delete_block` â€” delete (archive) a block\n- `notion_update_block_text` â€” update rich_text of paragraph/heading\n- `notion_append_heading` â€” append a heading (1/2/3)\n- `notion_append_todo` â€” append a to_do (checkbox)\n- `notion_list_databases` â€” list databases in the workspace\n- `notion_list_pages_in_database` â€” list pages in a database\n- `notion_append_image_url` â€” append an image block from an external URL\n\nPrompts\n- `notion_build_filter` â€” build a database filter skeleton\n- `notion_blocks_snippet` â€” generate blocks JSON for append\n- `notion_create_page_snippet` â€” generate properties JSON for page creation\n\n## Troubleshooting\n- Connection closed (-32000): ensure Node is available on PATH and reinstall the extension.\n- API token is invalid: verify your key and that the integration has access to the pages/databases.\n- Verify the bundled entry runs:\n  - Windows: `node \"%USERPROFILE%\\.gemini\\extensions\\notion\\dist\\extension.cjs\"`\n  - macOS/Linux: `node \"$HOME/.gemini/extensions/notion/dist/extension.cjs\"`\n\n## Uninstall / Update\n- Uninstall a GitHub-installed extension: `gemini extensions uninstall notion`\n- Update: uninstall, then install again from the GitHub URL\n- Remove a local link: `gemini extensions unlink notion`\n\n## License\nMIT\n\n\n",
  "bytes": 4906,
  "sha": "0a059b5298cf0785de4a706e881ef7cb1c58ee0beff6cf590a6b82e278fb142d",
  "repo_slug": "gitremko/gemini_cli_notion_extention",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_gitremko_gemini_cli_notion_extention_16176e7e/readme"
}