- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Description
Description
Add support for Notion MCP server to the fluent-toolkit registry with intelligent authentication handling using the self-hosted approach with integration tokens.
Background
Notion MCP supports two authentication approaches:
- Self-hosted with Integration Token (our approach) - Uses NOTION_TOKENenv var with STDIO transport
- Hosted OAuth via SSE - Notion's managed service at https://mcp.notion.com/mcp
We're implementing the self-hosted approach because it's simpler, more consistent with other MCP servers, and gives users full control over integration permissions.
Documentation: https://developers.notion.com/docs/mcp
GitHub Repository: https://github.com/makenotion/notion-mcp-server
npm Package: @notionhq/notion-mcp-server
Requirements
Authentication Detection
-  Check if Notion MCP is already configured in user's .mcp.json
-  If configured, detect whether NOTION_TOKENis set in the server configuration
- Optionally validate token by making test API call to Notion API
Authentication Flow
-  If not authenticated, guide user through Notion Integration setup:
- Direct user to https://www.notion.so/profile/integrations
- Instruct to create a new internal integration or select existing one
- Explain integration capabilities (read-only vs. full access)
- Guide user to connect pages/databases to the integration
- Prompt user to copy the integration token (ntn_****)
- Store token securely in .env.mcp.secrets(if available) or directly in.mcp.jsonenv
 
MCP Configuration
-  Generate proper .mcp.jsonconfiguration using STDIO transport (default):
{
  "mcpServers": {
    "notion": {
      "command": "npx",
      "args": ["-y", "@notionhq/notion-mcp-server"],
      "env": {
        "NOTION_TOKEN": "ntn_****"
      }
    }
  }
}Note: The server defaults to STDIO transport which is what Claude Code expects. No need to specify --transport stdio explicitly.
CLAUDE.md Documentation
-  Add Notion MCP usage instructions to CLAUDE.md
-  Include examples of common operations:
- Searching Notion workspace
- Creating/updating pages
- Querying databases
- Adding comments
 
- Document integration capabilities and permissions
Implementation Details
Authentication Method: Self-Hosted with Integration Token
Why this approach:
- ✅ Simpler authentication flow (just paste integration token)
- ✅ Works with standard STDIO transport (no SSE complexity)
- ✅ No OAuth redirect handling required
- ✅ User has full control over integration permissions
- ✅ Consistent with other MCP servers in registry
- ✅ Works offline after initial setup
Token Format: Integration tokens start with ntn_ prefix
Authentication Detection Strategy
// Check if notion server exists in .mcp.json
const notionServer = mcpConfig.mcpServers?.notion;
const hasNotionToken = notionServer?.env?.NOTION_TOKEN;
if (!hasNotionToken) {
  // Launch interactive authentication flow
}Token Validation (Optional Enhancement)
Test token validity with:
GET https://api.notion.com/v1/users/me
Headers:
  Authorization: Bearer {token}
  Notion-Version: 2022-06-28
Interactive Setup Flow
Use prompts to guide user through:
- Creating Notion integration (with link to settings page)
- Configuring integration capabilities (offer presets: read-only, full-access)
- Connecting pages/databases to integration
- Entering integration token
- Validating token (optional, recommended)
- Writing configuration to .mcp.json
Acceptance Criteria
-  ftk initdetects existing Notion MCP configuration
- User is guided through authentication if not configured
- Integration token is stored securely
-  Generated .mcp.jsonuses STDIO transport (default)
- Configuration works with Claude Code out of the box
-  CLAUDE.mdincludes Notion-specific usage instructions
- Error messages provide clear guidance for authentication issues
Questions for Implementation
- Should we validate the token during setup (make API call) or trust user input?
- Recommendation: Validate with optional skip flag for offline scenarios
 
- Should we offer capability presets (read-only, full-access, custom)?
- Recommendation: Yes, offer presets with explanation of each
 
- How should we handle token expiration/rotation?
- Recommendation: Provide clear error message directing user to refresh token