agentleFS
makenotionmakenotion/notion-mcp-server/CLAUDE.md

notion-mcp-server

CLAUDE.md4.7k starsChanged 5 months agoMITView on GitHub

This file provides guidance for Claude Code when working with this repository. This is the Notion MCP Server - an MCP (Model Context Protocol) server that exposes the Notion API as MCP tools. It auto-generates tools from an OpenAPI specification. Only modify scripts/notion-openapi.json. Tools are auto-generated from the spec - no code changes needed elsewhere. Tests are in tests directories adjacent to source files. Run with npm test. Uses Notion API version 2025-09-03 (Data Source Edition). The spec includes both:…

We split this CLAUDE.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Only modify scripts/notion-openapi.json.

    line 26

≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance for Claude Code when working with this repository.

Project Overview

This is the Notion MCP Server - an MCP (Model Context Protocol) server that exposes the Notion API as MCP tools. It auto-generates tools from an OpenAPI specification.

Architecture

scripts/notion-openapi.json    # OpenAPI spec (source of truth for all tools)
        ↓
src/init-server.ts             # Loads & validates spec, creates MCPProxy
        ↓
src/openapi-mcp-server/
├── openapi/parser.ts          # Converts OpenAPI → MCP tools
├── mcp/proxy.ts               # Registers tools with MCP server
└── client/http-client.ts      # Executes API calls

Key Patterns

Adding New Endpoints

Only modify scripts/notion-openapi.json. Tools are auto-generated from the spec - no code changes needed elsewhere.

Tool Generation Flow

  1. OpenAPIToMCPConverter.convertToMCPTools() iterates all paths/operations
  2. Each operation becomes an MCP tool (name = operationId)
  3. Parameters + requestBody → inputSchema
  4. Response schema → returnSchema
  5. MCPProxy.setupHandlers() registers tools with the MCP SDK

Naming Conventions

  • Tool names come from OpenAPI operationId (e.g., retrieve-a-database)
  • Names are truncated to 64 chars and converted to title case for display

Common Commands

npm run build      # TypeScript compilation + CLI bundling
npm test           # Run vitest tests
npm run dev        # Start dev server with hot reload

File Structure

  • scripts/notion-openapi.json - OpenAPI 3.1.0 spec defining all Notion API endpoints
  • scripts/start-server.ts - Entry point
  • src/init-server.ts - Server initialization
  • src/openapi-mcp-server/ - Core MCP server implementation
    • openapi/parser.ts - OpenAPI to MCP conversion (529 lines)
    • mcp/proxy.ts - MCP tool registration and execution (209 lines)
    • client/http-client.ts - HTTP request execution (198 lines)

Testing

Tests are in __tests__ directories adjacent to source files. Run with npm test.

API Version

Uses Notion API version 2025-09-03 (Data Source Edition). The spec includes both:

  • /v1/databases/{database_id} - Traditional database endpoints
  • /v1/data_sources/{data_source_id} - New data source endpoints

Download now (ZIP)

Trending

Less talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 3 mentionsFeb 2026: 5 mentionsMar 2026: 4 mentionsApr 2026: 0 mentionsMay 2026: 3 mentionsJun 2026: 4 mentionsJul 2026: 3 mentionsAug 2026: 1 mentionSep 2026: 3 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the makenotion/notion-mcp-server repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about makenotion/notion-mcp-server

The biggest 5 of 49 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 49

Talked about on GitHub, Bluesky and Stack Overflow (49 times).

On GitHub · 42

37 more on GitHub

On Bluesky · 6

1 more on Bluesky

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.