Notion MCP Server
Servidor API de Notion
Vídeo de referencia
Un servidor personalizado para facilitar el uso de la API de Notion. Se implementa utilizando Express.js y expone varias características de la API de Notion como una API REST.
Related MCP server: Notion MCP Server
Cómo instalar
Instalar los paquetes necesarios:
npm install express cors @notionhq/client swagger-jsdoc swagger-ui-expressEjecutando el servidor:
node server.jsEl servidor se ejecuta en http://localhost:3000 .
Cómo configurar
Establezca su token de API de Notion en la variable
NOTION_TOKENen su archivo server.js:
const NOTION_TOKEN = '여기에_노션_API_토큰_입력';Si es necesario, puede ejecutarlo en un puerto diferente modificando la variable PORT.
Características de la API
API de búsqueda
POST /api/search: busca páginas y bases de datos dentro de tu espacio de trabajo de Notion.
API de base de datos
POST /api/databases: Crear una base de datosGET /api/databases/:id: Consultar base de datosPATCH /api/databases/:id: Actualizar la base de datosPOST /api/databases/:id/query: Consulta de base de datos
API de página
POST /api/pages: Crear una páginaGET /api/pages/:id: Ver información de la páginaPATCH /api/pages/:id: Actualizar páginaGET /api/pages/:page_id/properties/:property_id: Ver propiedades de la página
API de bloque
GET /api/blocks/:id: Consulta de bloqueGET /api/blocks/:id/children: Ver el contenido del bloquePATCH /api/blocks/:id: Actualizar bloquePATCH /api/blocks/:id/children: Agregar contenido del bloqueDELETE /api/blocks/:id: Eliminar bloque
API de usuario
GET /api/users: Ver lista de usuariosGET /api/users/:id: Búsqueda de usuariosGET /api/users/me: Ver su propia información de usuario
API de comentarios
POST /api/comments: Crear un comentarioGET /api/comments?block_id=...: Ver comentarios
Integración de Cursor MCP
Agregue las siguientes configuraciones a
.cursor/mcp.json:
{
"mcpServers": {
"customApi": {
"url": "http://localhost:3000",
"toolNameStrategy": "url-path-segments"
}
}
}Puede acceder a la API de Notion utilizando funciones MCP en Cursor mientras el servidor está en ejecución.
Ejemplos de uso
Ejemplo de solicitud de búsqueda
// 페이지 검색
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));Ejemplo de creación de página
// 새 페이지 생성
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));Ejemplo de creación de una base de datos
// 데이터베이스 생성
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));Documentación de la API
La documentación de la API está disponible en la siguiente URL cuando se ejecuta el servidor:
Interfaz de usuario Swagger: http://localhost:3000/api-docs
Esquema OpenAPI: 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