Skip to content

feat: add streamable HTTP transport and NOTION_TOKEN environment variable support#75

Merged
mquan merged 2 commits into
makenotion:mainfrom
zencoderai:main
Jul 27, 2025
Merged

feat: add streamable HTTP transport and NOTION_TOKEN environment variable support#75
mquan merged 2 commits into
makenotion:mainfrom
zencoderai:main

Conversation

@zencoderai

Copy link
Copy Markdown
Contributor

Disclaimer
All of the code was generated by Zencoder under supervision by @alexs-forgood-ai :)
Addressing #33
Also partially addressing #56 taking into account comments about backward compatibility
Please let me know if there is anything else required before this PR can be accepted
</end of disclaimer and human generated text :)>

Major enhancements:

🌐 Streamable HTTP Transport (SSE)

  • Add support for Server-Sent Events transport alongside existing stdio
  • Implement bearer token authentication for HTTP endpoints
  • Add command-line options: --transport, --port, --auth-token
  • Support auto-generated or custom authentication tokens
  • Include health check endpoint and proper session management
  • Enable web-based applications to use MCP over HTTP

🔑 NOTION_TOKEN Environment Variable

  • Add simplified configuration using NOTION_TOKEN env var
  • Automatically set Authorization header and Notion-Version
  • Maintain backward compatibility with OPENAPI_MCP_HEADERS
  • Prioritize OPENAPI_MCP_HEADERS when both are present
  • Update documentation with recommended NOTION_TOKEN usage

📚 Documentation & Configuration

  • Add comprehensive transport options section to README
  • Update npm, Docker, and Smithery configuration examples
  • Include authentication and usage examples for both transports
  • Add command-line help and usage instructions

🔧 Dependencies & Testing

  • Upgrade @modelcontextprotocol/sdk to v1.13.3
  • Extend test coverage for new NOTION_TOKEN functionality
  • Update Smithery configuration to support both token methods

This update makes the MCP server more accessible and flexible while maintaining full backward compatibility.

Comment thread README.md Outdated
npx @notionhq/notion-mcp-server --transport stdio
```

#### Streamable HTTP Transport (SSE)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Streamable HTTP is different than SSE which is deprecated https://modelcontextprotocol.io/docs/concepts/transports#server-sent-events-sse-deprecated

Comment thread scripts/start-server.ts Outdated
const proxy = await initProxy(specPath, baseUrl)
await proxy.connect(new StdioServerTransport())
return proxy.getServer()
} else if (transport === 'sse') {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment about sse vs. streamable http

alexs-forgood-ai added a commit to zencoderai/notion-mcp-server that referenced this pull request Jul 14, 2025
- Replace all "SSE" references with "Streamable HTTP" terminology
- Update transport option from --transport sse to --transport http
- Update documentation to use correct MCP transport naming
- Fix docker-compose to docker compose command
- Address PR makenotion#75 review comments about deprecated SSE terminology

Addresses: makenotion#75
@zencoderai

Copy link
Copy Markdown
Contributor Author

@mquan thanks, addressed
image

…able support

Major enhancements:

🌐 **Streamable HTTP Transport (SSE)**
- Add support for Server-Sent Events transport alongside existing stdio
- Implement bearer token authentication for HTTP endpoints
- Add command-line options: --transport, --port, --auth-token
- Support auto-generated or custom authentication tokens
- Include health check endpoint and proper session management
- Enable web-based applications to use MCP over HTTP

🔑 **NOTION_TOKEN Environment Variable**
- Add simplified configuration using NOTION_TOKEN env var
- Automatically set Authorization header and Notion-Version
- Maintain backward compatibility with OPENAPI_MCP_HEADERS
- Prioritize OPENAPI_MCP_HEADERS when both are present
- Update documentation with recommended NOTION_TOKEN usage

📚 **Documentation & Configuration**
- Add comprehensive transport options section to README
- Update npm, Docker, and Smithery configuration examples
- Include authentication and usage examples for both transports
- Add command-line help and usage instructions

🔧 **Dependencies & Testing**
- Upgrade @modelcontextprotocol/sdk to v1.13.3
- Extend test coverage for new NOTION_TOKEN functionality
- Update Smithery configuration to support both token methods

This update makes the MCP server more accessible and flexible while maintaining full backward compatibility.
- Replace all "SSE" references with "Streamable HTTP" terminology
- Update transport option from --transport sse to --transport http
- Update documentation to use correct MCP transport naming
- Fix docker-compose to docker compose command
- Address PR makenotion#75 review comments about deprecated SSE terminology

Addresses: makenotion#75
@zencoderai

Copy link
Copy Markdown
Contributor Author

Resolved conflicts also

@zencoderai zencoderai requested a review from mquan July 18, 2025 17:41
@mquan mquan merged commit f469fc3 into makenotion:main Jul 27, 2025
4 checks passed
Mingxiao300 pushed a commit to Mingxiao300/Notion-MCP-Server-Smithery that referenced this pull request Sep 28, 2025
…able support (#75)

* feat: add streamable HTTP transport and NOTION_TOKEN environment variable support

Major enhancements:

🌐 **Streamable HTTP Transport (SSE)**
- Add support for Server-Sent Events transport alongside existing stdio
- Implement bearer token authentication for HTTP endpoints
- Add command-line options: --transport, --port, --auth-token
- Support auto-generated or custom authentication tokens
- Include health check endpoint and proper session management
- Enable web-based applications to use MCP over HTTP

🔑 **NOTION_TOKEN Environment Variable**
- Add simplified configuration using NOTION_TOKEN env var
- Automatically set Authorization header and Notion-Version
- Maintain backward compatibility with OPENAPI_MCP_HEADERS
- Prioritize OPENAPI_MCP_HEADERS when both are present
- Update documentation with recommended NOTION_TOKEN usage

📚 **Documentation & Configuration**
- Add comprehensive transport options section to README
- Update npm, Docker, and Smithery configuration examples
- Include authentication and usage examples for both transports
- Add command-line help and usage instructions

🔧 **Dependencies & Testing**
- Upgrade @modelcontextprotocol/sdk to v1.13.3
- Extend test coverage for new NOTION_TOKEN functionality
- Update Smithery configuration to support both token methods

This update makes the MCP server more accessible and flexible while maintaining full backward compatibility.

* fix: update transport terminology from SSE to Streamable HTTP

- Replace all "SSE" references with "Streamable HTTP" terminology
- Update transport option from --transport sse to --transport http
- Update documentation to use correct MCP transport naming
- Fix docker-compose to docker compose command
- Address PR #75 review comments about deprecated SSE terminology

Addresses: makenotion/notion-mcp-server#75

---------

Co-authored-by: Alex Shershebnev <alexs@forgood.ai>
jyoansah pushed a commit to drapesinc/notion-mcp that referenced this pull request Feb 2, 2026
…able support (makenotion#75)

* feat: add streamable HTTP transport and NOTION_TOKEN environment variable support

Major enhancements:

🌐 **Streamable HTTP Transport (SSE)**
- Add support for Server-Sent Events transport alongside existing stdio
- Implement bearer token authentication for HTTP endpoints
- Add command-line options: --transport, --port, --auth-token
- Support auto-generated or custom authentication tokens
- Include health check endpoint and proper session management
- Enable web-based applications to use MCP over HTTP

🔑 **NOTION_TOKEN Environment Variable**
- Add simplified configuration using NOTION_TOKEN env var
- Automatically set Authorization header and Notion-Version
- Maintain backward compatibility with OPENAPI_MCP_HEADERS
- Prioritize OPENAPI_MCP_HEADERS when both are present
- Update documentation with recommended NOTION_TOKEN usage

📚 **Documentation & Configuration**
- Add comprehensive transport options section to README
- Update npm, Docker, and Smithery configuration examples
- Include authentication and usage examples for both transports
- Add command-line help and usage instructions

🔧 **Dependencies & Testing**
- Upgrade @modelcontextprotocol/sdk to v1.13.3
- Extend test coverage for new NOTION_TOKEN functionality
- Update Smithery configuration to support both token methods

This update makes the MCP server more accessible and flexible while maintaining full backward compatibility.

* fix: update transport terminology from SSE to Streamable HTTP

- Replace all "SSE" references with "Streamable HTTP" terminology
- Update transport option from --transport sse to --transport http
- Update documentation to use correct MCP transport naming
- Fix docker-compose to docker compose command
- Address PR makenotion#75 review comments about deprecated SSE terminology

Addresses: makenotion#75

---------

Co-authored-by: Alex Shershebnev <alexs@forgood.ai>
jyoansah added a commit to drapesinc/notion-mcp that referenced this pull request Feb 2, 2026
Merged 63 commits from upstream bringing:
- feat: Add retrieve database endpoint to OpenAPI spec (makenotion#195)
- feat: Add option to disable authentication (makenotion#105)
- fix: preserve const values and allow any property in page schemas (makenotion#173)
- fix: handle double-serialized JSON parameters from MCP clients (makenotion#180)
- feat: Add tool annotations for improved LLM tool understanding (makenotion#169)
- feat: add streamable HTTP transport and NOTION_TOKEN env var support (makenotion#75)

Preserved our customizations:
- Multi-workspace support with NOTION_TOKEN_* env vars
- Custom unified tools (notion-page, notion-blocks, etc.)
- get-due-tasks with assignee filtering and dual date property checking
- Toolset configuration and filtering

Merged deserializeParams fix into our multi-workspace flow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants