https://github.com/ramidecodes/mcp-server-notion
A Model Context Protocol server wrapping the official Notion SDK
https://github.com/ramidecodes/mcp-server-notion
Last synced: 4 months ago
JSON representation
A Model Context Protocol server wrapping the official Notion SDK
- Host: GitHub
- URL: https://github.com/ramidecodes/mcp-server-notion
- Owner: ramidecodes
- License: apache-2.0
- Created: 2025-03-03T17:08:10.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-03T19:11:38.000Z (4 months ago)
- Last Synced: 2025-03-03T19:23:08.554Z (4 months ago)
- Language: TypeScript
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- mcp-index - Notion Integration Server - Connects AI models to Notion workspaces using the Notion API for managing pages, databases, and content. Provides easy setup and robust error handling for integration with Notion's capabilities. (Note-Taking and Knowledge Bases)
README
# Notion MCP Server
A Model Context Protocol (MCP) server that exposes the official Notion SDK, allowing AI models to interact with Notion workspaces.
## Quick Start
### 1. Set up your Notion integration
1. Go to [https://www.notion.so/my-integrations](https://www.notion.so/my-integrations)
2. Create a new integration
3. Copy the API key### 2. Add to Claude Desktop or Cursor AI
Add the following command to your AI assistant's MCP server configuration:
```bash
npx @ramidecodes/mcp-server-notion@latest -y --api-key=your-notion-integration-key
```Replace `your-notion-integration-key` with the API key from step 1.
## Integration Guide
### For Claude Desktop
1. Open Claude Desktop
2. Go to Settings > Advanced > Model Context Protocol
3. Add a new MCP server with the command above
4. Save and restart Claude### For Cursor AI
1. Open Cursor AI
2. Go to Settings > AI > MCP Servers
3. Add a new MCP server with the command above
4. Save settings## Available Tools
The server provides tools for interacting with Notion:
- **Search**: Find pages or databases
- **Databases**: Query and retrieve database entries
- **Pages**: Create, retrieve, and update pages
- **Blocks**: Manage content blocks (paragraphs, lists, etc.)
- **Users**: List users and get user information
- **Comments**: Create and list comments
- **Link Previews**: Create link previews for URLs## Alternative Setup Methods
### Using Environment Variables
Instead of passing the API key directly, you can use a `.env` file:
1. Create a `.env` file with:
```
NOTION_API_KEY=your-notion-integration-key
```2. Run the server:
```bash
npx @ramidecodes/mcp-server-notion@latest -y
```### Command Line Options
```
OPTIONS:
-h, --help Show help message
-v, --version Show version information
--verbose Enable verbose logging
--env-path Path to .env file
--api-key Notion API key
-y Skip confirmation prompts
```## Troubleshooting
If you encounter "Failed to create client" errors:
- On Windows, try using `cmd /c` before the npx command
- On macOS/Linux, try using the full path to npx
- Test the command in a terminal before adding it to your AI assistant## Features
- Full Notion API support through the official SDK
- MCP compliant for seamless AI integration
- Comprehensive tools for all Notion operations
- Robust error handling with detailed messages
- Easy configuration with environment variablesFor detailed documentation on each tool, see the [Tools Documentation](docs/TOOLS.md).
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.