mcp notion server
A bridge between Claude AI and Notion that enables users to interact with Notion databases and pages through natural language, supporting operations like creating, reading, updating, and deleting content.
A bridge between Claude AI and Notion that enables users to interact with Notion databases and pages through natural language, supporting operations like creating, reading, updating, and deleting content.
A Model Context Protocol server for Notion integration
This TypeScript-based MCP server implements a bridge between Claude and Notion, allowing seamless interaction with Notion's databases and pages. It demonstrates core MCP concepts through:
list_databases
- List all accessible Notion databasescreate_database
- Create a new database with custom propertiesquery_database
- Search and filter database entriesupdate_database
- Modify database properties and schemacreate_page
- Create new pages in databases or as subpagesupdate_page
- Update existing page propertiesget_page
- Retrieve page content and metadatadelete_page
- Remove pages from databases or parent pagesappend_blocks
- Add new blocks to a pagedelete_blocks
- Remove blocks from a pageget_blocks
- Retrieve block contentupdate_blocks
- Modify existing block contentsummarize_notes
- Generate concise summaries of notesanalyze_content
- Provide insights and analysis of page contentsuggest_tags
- Recommend relevant tags based on contentCreate a Notion Integration:
Click "New Integration".
Retrieve the Secret Key:
Copy the "Internal Integration Token" from your integration. This token will be used for authentication.
Add the Integration to Your Workspace:
Open the page or database you want the integration to access in Notion.
Add the server configuration to Claude Desktop:
MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%/Claude/claude_desktop_config.json
Configuration content:
{
"mcpServers": {
"mcp-notion-server": {
"command": "npx",
"args": [
"-y",
"@gabornyerges/mcp-notion-server"
],
"env": {
"NOTION_API_KEY": "your-notion-api-key"
}
}
}
}
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
MIT License - see LICENSE for details
[
{
"description": "List all accessible databases",
"inputSchema": {
"properties": {},
"required": [],
"type": "object"
},
"name": "list_databases"
},
{
"description": "Create a new database",
"inputSchema": {
"properties": {
"parent_id": {
"description": "ID of the parent page",
"type": "string"
},
"properties": {
"description": "Database properties schema",
"type": "object"
},
"title": {
"description": "Title of the database",
"type": "string"
}
},
"required": [
"parent_id",
"title",
"properties"
],
"type": "object"
},
"name": "create_database"
},
{
"description": "Create a new page",
"inputSchema": {
"properties": {
"content": {
"description": "Content in markdown format",
"type": "string"
},
"parent_id": {
"description": "ID of the parent page or database",
"type": "string"
},
"parent_type": {
"description": "Type of parent (database or page)",
"enum": [
"database",
"page"
],
"type": "string"
},
"properties": {
"description": "Page properties (required for database pages)",
"type": "object"
},
"title": {
"description": "Title of the page",
"type": "string"
}
},
"required": [
"parent_type",
"parent_id"
],
"type": "object"
},
"name": "create_page"
},
{
"description": "Update an existing page",
"inputSchema": {
"properties": {
"page_id": {
"description": "ID of the page to update",
"type": "string"
},
"properties": {
"description": "Updated page properties",
"type": "object"
}
},
"required": [
"page_id",
"properties"
],
"type": "object"
},
"name": "update_page"
},
{
"description": "Append blocks to a page",
"inputSchema": {
"properties": {
"blocks": {
"description": "Array of block objects to append",
"type": "array"
},
"page_id": {
"description": "ID of the page",
"type": "string"
}
},
"required": [
"page_id",
"blocks"
],
"type": "object"
},
"name": "append_blocks"
},
{
"description": "Delete blocks from a page",
"inputSchema": {
"properties": {
"block_id": {
"description": "ID of the block to delete",
"type": "string"
}
},
"required": [
"block_id"
],
"type": "object"
},
"name": "delete_blocks"
},
{
"description": "Retrieve a page by ID",
"inputSchema": {
"properties": {
"page_id": {
"description": "ID of the page to retrieve",
"type": "string"
}
},
"required": [
"page_id"
],
"type": "object"
},
"name": "get_page"
},
{
"description": "Retrieve a database by ID",
"inputSchema": {
"properties": {
"database_id": {
"description": "ID of the database to retrieve",
"type": "string"
}
},
"required": [
"database_id"
],
"type": "object"
},
"name": "get_database"
},
{
"description": "Query a database with filters and sorting",
"inputSchema": {
"properties": {
"database_id": {
"description": "ID of the database to query",
"type": "string"
},
"filter": {
"description": "Filter conditions",
"type": "object"
},
"page_size": {
"description": "Number of results per page",
"type": "number"
},
"sorts": {
"description": "Sorting parameters",
"type": "array"
},
"start_cursor": {
"description": "Pagination cursor",
"type": "string"
}
},
"required": [
"database_id"
],
"type": "object"
},
"name": "query_database"
},
{
"description": "Search pages and databases",
"inputSchema": {
"properties": {
"filter": {
"description": "Filter by object type (page or database)",
"type": "object"
},
"page_size": {
"description": "Number of results per page",
"type": "number"
},
"query": {
"description": "Search query",
"type": "string"
},
"sort": {
"description": "Sort by last edited or created time",
"type": "object"
},
"start_cursor": {
"description": "Pagination cursor",
"type": "string"
}
},
"required": [
"query"
],
"type": "object"
},
"name": "search"
}
]