mcp-notion-usage-guide

mcp-notion-usage-guide is a skill for Claude Code, Codex from magic3007/dotfiles. It costs 174 tokens per session (2,861 once invoked), scanned A, original, MIT.

A usage guide for connecting AI agents to Notion databases through MCP. Notion is a workspace for documents and databases, while a database view is a saved way of displaying database records.

In plain words
What is it for?
Use it when building Notion automations or troubleshooting database access. It covers database-page URLs, data-source URLs, SQL queries, filters, schema updates, and common errors.
Why use it?
It explains how to avoid unsupported view URLs, find a database schema, query records, handle missing multi-select options, and work around queries that return only structure.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it when building Notion automations or troubleshooting database access. It covers database-page URLs, data-source URLs, SQL queries, filters, schema updates, and common errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magic3007/dotfiles/mcp-notion-usage-guide
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add magic3007/dotfiles --skill mcp-notion-usage-guide
Clone the repo
git clone --depth 1 https://github.com/magic3007/dotfiles

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-notion-usage-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/magic3007/dotfiles/mcp-notion-usage-guide/github.svg)](https://agentmods.dev/skills/magic3007/dotfiles/mcp-notion-usage-guide)
Your own site
<a href="https://agentmods.dev/skills/magic3007/dotfiles/mcp-notion-usage-guide"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/mcp-notion-usage-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-notion-usage-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/magic3007/dotfiles/mcp-notion-usage-guide"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/mcp-notion-usage-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 174 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,861 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00174 $0.02861
Opus 5.5 $0.00070 $0.01144
Sonnet 5.5 $0.00035 $0.00572
Haiku 4.5 $0.00017 $0.00286

Measured 1mo ago against content hash 4d69136694e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp-notion-usage-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/mcp-notion-usage-guide/SKILL.md · 198 lines

How it starts

The opening of the file, as written. The whole thing — 198 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Notion工具使用指南

Problem

MCP Notion工具的使用方式和错误处理在官方文档中没有详细说明,遇到错误时难以快速定位和解决,尤其是在访问数据库视图和查询数据时容易遇到问题。

Context / Trigger Conditions

  • 调用mcp__notion__notion-fetch工具访问view URL时返回错误:"URL type view not currently supported for fetch tool"
  • 需要获取Notion数据库的字段结构和schema信息
  • 需要查询数据库中的所有条目或过滤特定条目
  • 开发自动化工作流需要从Notion数据库获取数据

Solution

1. 数据库访问最佳实践

当需要访问Notion数据库内容时:

  1. 优先使用数据库页面URL,而不是view URL,避免不支持的URL类型错误
  2. 数据库页面URL格式通常为:https://www.notion.so/[workspace]/[database-id]
  3. 调用mcp__notion__notion-fetch工具时传入数据库页面URL,即可获取完整的数据库schema信息,包括所有字段定义、选项配置等

2. 获取数据库条目内容

要获取数据库中的所有条目:

  1. 首先通过数据库页面URL获取对应的data source URL,格式为:collection://[data-source-id]
  2. 使用该data source URL作为mcp__notion__notion-fetch的参数,并搭配SQL查询语句获取内容
  3. 示例查询:
    # 获取所有条目的基本信息
    query = """
    SELECT "Name", "Institution", "Category", "Advisor", "userDefined:URL", "url" 
    FROM "collection://[data-source-id]"
    """
    

3. 常见错误解决方案

错误:"URL type view not currently supported for fetch tool"
  • 原因:当前MCP Notion工具不支持直接访问view类型的URL
  • 解决方案:改用数据库的主页面URL访问,所有view的数据都可以通过SQL查询在主数据源上实现
  • 替代方案:如果需要特定view的过滤条件,可以在SQL查询中添加对应的WHERE子句实现相同效果
限制:SQL查询仅返回表结构,无实际数据
  • 现象:使用SELECT查询数据库内容时,仅返回表结构和schema信息,没有实际数据记录
  • 原因:当前版本MCP Notion工具的SQL查询功能尚未完全实现,只支持获取表结构,不支持查询实际数据
  • 解决方案:
    1. 如果需要获取数据库中的实际记录,使用mcp__notion__notion-search工具搜索特定条目,然后通过mcp__notion__notion-fetch获取单个页面的完整属性
    2. 直接访问数据库页面或通过Notion API获取完整数据集
  • 注意:技能文档中的SQL查询示例仅为预期功能,目前暂不支持使用

4. 数据库Schema更新(添加MULTI_SELECT新选项)

当需要在数据库中创建新页面,但目标字段的MULTI_SELECT选项中不存在需要的值时:

  1. 先使用notion-update-data-source更新schema,添加新选项
  2. 然后才能创建包含该选项值的页面

示例:

ALTER COLUMN "Institution" SET MULTI_SELECT('existing1':blue, 'existing2':red, 'NewSchool':green)

注意事项:

  • 必须列出所有现有选项和新选项,否则会丢失已有选项
  • 颜色值可选:default, gray, brown, orange, yellow, green, blue, purple, pink, red
  • 更新完成后,SQLite表定义中的枚举值列表会自动更新

5. 创建页面时的属性命名注意事项

  • URL属性必须使用userDefined:URL(URL是保留字,不能直接写为"URL")
  • 日期字段需要拆分为date:[field-name]:start、date:[field-name]:end和date:[field-name]:is_datetime
  • 多选字段的内容需要以JSON数组格式传递,如["THU", "Yale"]
  • MULTI_SELECT字段的值必须是数据库schema中已定义的选项,否则创建会失败

Read the full file on GitHub · 198 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +22 lines · +22 tokens per session 4d69136694e4
  2. 1mo ago First seen · 176 lines · 152 tokens per session scan A 193f8b31ecfb

Subscribe to this mod's changes

mcp-notion-usage-guide is a skill published in the GitHub repository magic3007/dotfiles (11 stars, last pushed yesterday), licensed MIT. It adds 174 tokens to every session and 2,861 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

align-readmes

Audit and converge README.md across every local urmzd/ checkout so the fleet reads as one product: skip archived repos, flag renamed repos and stale identities, score each README against write-readme, then fix in priority order. Use when the user asks to consolidate, unify, standardize, or audit READMEs across repos…

urmzd/dotfiles · 113 tokens

orchestrate-rex

Oversee a batch of related work items (tickets, PRs and what blocks them) through to done from one session. Keeps a status table, sets the order, watches slow external runs, and starts Rex sessions for workers when code needs changing. Use when the user hands over a batch of work to coordinate.

ooloth/dotfiles · 69 tokens

write-ticket-description

Voice guide for writing issue/ticket/task/epic descriptions. Use this skill for ALL issue creation and for every rewrite of an existing issue's body — GitHub issues, Jira tasks, Monday tasks, Linear tasks, and epics. Contains section structure, voice rules, and anti-patterns. Never write ticket descriptions without…

ooloth/dotfiles · 74 tokens

implement-unattended

Take a ticket whose approach and design are already approved through implementation, review and evidence to a draft PR, with nobody watching. Escalates decisions on the ticket and stops rather than choosing.

ooloth/dotfiles · 43 tokens

plan-unattended

Plan a ticket with nobody watching. Three independent discuss runs are reconciled into one approach and three design runs into one design, both are posted on the ticket, and implement-unattended is started in a new tmux window. Escalates on the ticket rather than taking a one-way decision.

ooloth/dotfiles · 65 tokens

wrap-up

End a session by confirming every action it mentioned was dealt with, then finding what in the codebase and the backlog would mislead the next agent. Reports both and fixes only what the user approves.

ooloth/dotfiles · 43 tokens