Notion MCP Server
Notion API-Server
Referenzvideo
Ein benutzerdefinierter Server zur einfachen Verwendung der Notion-API. Es wird mit Express.js implementiert und stellt verschiedene Funktionen der Notion-API als REST-API bereit.
Related MCP server: Notion MCP Server
So installieren Sie
Installieren Sie die erforderlichen Pakete:
npm install express cors @notionhq/client swagger-jsdoc swagger-ui-expressAusführen des Servers:
node server.jsDer Server läuft unter http://localhost:3000 .
So richten Sie ein
Legen Sie Ihr Notion-API-Token in der Variable
NOTION_TOKENin Ihrer Datei server.js fest:
const NOTION_TOKEN = '여기에_노션_API_토큰_입력';Bei Bedarf können Sie es auf einem anderen Port ausführen, indem Sie die PORT-Variable ändern.
API-Funktionen
Such-API
POST /api/search: Durchsuchen Sie Seiten und Datenbanken in Ihrem Notion-Arbeitsbereich.
Datenbank-API
POST /api/databases: Erstellen Sie eine DatenbankGET /api/databases/:id: Datenbank abfragenPATCH /api/databases/:id: Datenbank aktualisierenPOST /api/databases/:id/query: Datenbankabfrage
Seiten-API
POST /api/pages: Eine Seite erstellenGET /api/pages/:id: Seiteninformationen anzeigenPATCH /api/pages/:id: Seite aktualisierenGET /api/pages/:page_id/properties/:property_id: Seiteneigenschaften anzeigen
Block-API
GET /api/blocks/:idBlockabfrageGET /api/blocks/:id/children: Blockinhalte anzeigenPATCH /api/blocks/:id: Block aktualisierenPATCH /api/blocks/:id/children: Blockinhalt hinzufügenDELETE /api/blocks/:id: Block löschen
Benutzer-API
GET /api/users: Benutzerliste anzeigenGET /api/users/:id: BenutzersucheGET /api/users/me: Zeigen Sie Ihre eigenen Benutzerinformationen an
Kommentar-API
POST /api/comments: Einen Kommentar erstellenGET /api/comments?block_id=...: Kommentare anzeigen
Cursor MCP-Integration
Fügen Sie
.cursor/mcp.jsondie folgenden Einstellungen hinzu:
{
"mcpServers": {
"customApi": {
"url": "http://localhost:3000",
"toolNameStrategy": "url-path-segments"
}
}
}Sie können mithilfe von MCP-Funktionen in Cursor auf die Notion-API zugreifen, während der Server läuft.
Anwendungsbeispiele
Beispiel einer Suchanfrage
// 페이지 검색
fetch('http://localhost:3000/api/search', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
filter: {
value: "page",
property: "object"
}
})
})
.then(response => response.json())
.then(data => console.log(data));Beispiel für die Seitenerstellung
// 새 페이지 생성
fetch('http://localhost:3000/api/pages', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
parent: {
page_id: "페이지_ID"
},
properties: {
title: {
title: [
{
text: {
content: "새 페이지 제목"
}
}
]
}
}
})
})
.then(response => response.json())
.then(data => console.log(data));Beispiel für das Erstellen einer Datenbank
// 데이터베이스 생성
fetch('http://localhost:3000/api/databases', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
parent: {
type: "page_id",
page_id: "페이지_ID"
},
title: [
{
text: {
content: "테스트 데이터베이스"
}
}
],
properties: {
"이름": {
"title": {},
"description": "제목 항목"
},
"상태": {
"description": "작업 상태",
"select": {
"options": [
{
"name": "진행 중",
"color": "blue"
},
{
"name": "완료",
"color": "green"
}
]
}
}
}
})
})
.then(response => response.json())
.then(data => console.log(data));API-Dokumentation
Die API-Dokumentation ist beim Ausführen des Servers unter der folgenden URL verfügbar:
Swagger-Benutzeroberfläche: http://localhost:3000/api-docs
OpenAPI-Schema: http://localhost:3000/openapi.json
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.174610Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA server that connects to the Notion API and exposes functionality through Claude's Machine Context Protocol, enabling search, retrieval, querying, and creation of Notion pages and databases.837MIT
- -licenseNot gradedqualityNot gradedmaintenanceAn MCP server that enables natural language interaction with the Notion API, allowing users to search, comment, create pages, and access content within their Notion workspace.141,622
- -licenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server that enables AI assistants to interact with Notion's API for reading, creating, and modifying Notion content through natural language interactions.
Related MCP Connectors
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
A basic MCP server to operate on the Postman API.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HariFatherKR/notion_mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server