mcp-notion-usage-guide

mcp-notion-usage-guide is a skill for Claude Code, Codex from magic3007/dotfiles. It costs 152 tokens per session (2,479 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.

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.

agentmods
npx agentmods add skills/magic3007/dotfiles/mcp-notion-usage-guide
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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 152 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,479 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00152 $0.02479
Opus 5 $0.00076 $0.01239
Sonnet 5 $0.00030 $0.00496
Haiku 4.5 $0.00015 $0.00248

Measured 5d ago against content hash 193f8b31ecfb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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.

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

How it starts

The opening of the file, as written. The whole thing — 176 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]:startdate:[field-name]:enddate:[field-name]:is_datetime
  • 多选字段的内容需要以JSON数组格式传递,如["THU", "Yale"]
  • MULTI_SELECT字段的值必须是数据库schema中已定义的选项,否则创建会失败

Read the full file on GitHub · 176 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. 5d 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 152 tokens to every session and 2,479 once invoked, about $0.0008 per session on Opus 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

orchestrate-agents

Orchestrate multiple agent CLIs (Claude, Codex, Antigravity) via tmux with a shared fleet store, dispatching one guardian subagent per pane. Survey-first: inspects and adopts existing tmux sessions, windows, and agent panes before creating anything new. Use when running a multi-agent session, dispatching parallel…

urmzd/dotfiles · 83 tokens

assess-quality

Foundational quality framework: the five questions (readable, easy to start, expands without bloat, consistent, intentional) every other dev skill is judged against, plus the dual-audience and workshop principles. Use when onboarding to a project, defining a quality bar, setting an assessment checklist, or arbitrating…

urmzd/dotfiles · 120 tokens

create-oss-skill

Create well-formed Agent Skills following the agentskills.io specification. Scaffold directories, write SKILL.md files, bundle scripts, and structure instructions for progressive disclosure. Use when creating a new skill, reviewing skill structure, optimizing a skill description, or setting up evals for skill quality.

urmzd/dotfiles · 63 tokens

extend-oss-skills-to-claude

Extend standard agentskills.io skills with Claude Code-specific features. Invocation control, subagent execution, dynamic context injection, string substitutions, model/effort overrides, and deployment scoping. Use when adapting a portable skill for Claude Code, adding Claude-specific frontmatter, setting up subagent…

urmzd/dotfiles · 74 tokens

merge-ready

Drive an existing pull request to a mergeable state: get CI green, resolve merge conflicts with the base branch, address and resolve review comments, trigger required bot reviews/approvals (e.g. commenting '@claude review'), link associated issues, and clean up the PR title and description. Ends with a readiness…

urmzd/dotfiles · 208 tokens

scaffold-project

Generates cross-language standard files (README, AGENTS.md, LICENSE, CONTRIBUTING.md, SECURITY.md, sr.yaml, .envrc, llms.txt), documentation conventions, and project structure, then dispatches to language-specific scaffolds. Use first for cross-language standard files and structure, THEN load the matching scaffold…

urmzd/dotfiles · 137 tokens