Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
Target branch: Verify that the pull request targets the dev branch. Not targeting the dev branch may lead to immediate closure of the PR.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: If necessary, update relevant documentation Open WebUI Docs like environment variables, the tutorials, or other documentation sources.
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description.
Agentic AI Code:: Confirm this Pull Request is not written by any AI Agent or has at least gone through additional human review and manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Title Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
Changelog Entry
Description
Makes it possible to add custom headers to tool calls by adding a (optional) KEY => VALUE list to the Tools Modal.
Reason is that not all MCP's use or require the "standard" Auth headers, and custom MCP's can use it for custom implementations (eg. require API_CLIENT and API_SECRET ).
Added
added (optional) list of Custom Headers in the Add Tool Modal, for both admin tools and user tools
implemented the custom headers to all tool calls (verify and actual tool calls)
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/18598
**Author:** [@Grezvany13](https://github.com/Grezvany13)
**Created:** 10/24/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `feature/custom-tool-headers`
---
### 📝 Commits (8)
- [`845f111`](https://github.com/open-webui/open-webui/commit/845f111dc79c766842acd3cfbcb5a11ff9ab21c2) add frontend part of custom MCP headers
- [`353f1c8`](https://github.com/open-webui/open-webui/commit/353f1c81df74847419d6d668427cf7c623a8c25a) Merge remote-tracking branch 'origin/main' into feature/custom-tool-headers
- [`3fe2640`](https://github.com/open-webui/open-webui/commit/3fe2640f72e031e4df4e16b79b78f2c836930fe2) Merge branch 'main' into feature/custom-tool-headers
- [`b988994`](https://github.com/open-webui/open-webui/commit/b9889940366660d7154a532e456ef3dfc395f43c) Merge remote-tracking branch 'origin/feature/custom-tool-headers' into feature/custom-tool-headers
- [`05c01b6`](https://github.com/open-webui/open-webui/commit/05c01b6a64956d54487e583729f1a4e4e5c7c23c) add additional headers to actual Tool calls + minor fixes
- [`3b8b0e2`](https://github.com/open-webui/open-webui/commit/3b8b0e2c47c5347afc3cd14d5f2a12085bb181cc) add config to get_tool_server_data call
- [`3d58fe0`](https://github.com/open-webui/open-webui/commit/3d58fe06ce8243113e2a1738f026a6e29416aaf4) Merge branch 'refs/heads/dev' into feature/custom-tool-headers
- [`20c74db`](https://github.com/open-webui/open-webui/commit/20c74dbf3f921666b6462b776d3a43c40769e620) remove console.log + cleanup
### 📊 Changes
**5 files changed** (+97 additions, -5 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/routers/configs.py` (+8 -1)
📝 `backend/open_webui/utils/middleware.py` (+5 -0)
📝 `backend/open_webui/utils/tools.py` (+8 -2)
➕ `src/lib/components/AddServerModal.svelte` (+0 -0)
📝 `src/lib/components/AddToolServerModal.svelte` (+76 -2)
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Verify that the pull request targets the `dev` branch. Not targeting the `dev` branch may lead to immediate closure of the PR.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [ ] **Documentation:** If necessary, update relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs) like environment variables, the tutorials, or other documentation sources.
- [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Take this as an opportunity to make screenshots of the feature/fix and include it in the PR description.
- [x] **Agentic AI Code:**: Confirm this Pull Request is **not written by any AI Agent** or has at least gone through additional human review **and** manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Title Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
Makes it possible to add custom headers to tool calls by adding a (optional) KEY => VALUE list to the Tools Modal.
Reason is that not all MCP's use or require the "standard" Auth headers, and custom MCP's can use it for custom implementations (eg. require `API_CLIENT` and `API_SECRET` ).
### Added
- added (optional) list of Custom Headers in the Add Tool Modal, for both admin tools and user tools
- implemented the custom headers to all tool calls (verify and actual tool calls)
### Changed
N/A
### Deprecated
N/A
### Removed
N/A
### Fixed
N/A
### Security
N/A
### Breaking Changes
- **BREAKING CHANGE**: N/A
---
### Additional Information
Based on Discussion: https://github.com/open-webui/open-webui/discussions/17893
### Screenshots or Videos
<img width="497" height="331" alt="image" src="https://github.com/user-attachments/assets/6d490640-99fb-422a-b44f-8695d1a2b38d" />
### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18598
Author: @Grezvany13
Created: 10/24/2025
Status: ❌ Closed
Base:
dev← Head:feature/custom-tool-headers📝 Commits (8)
845f111add frontend part of custom MCP headers353f1c8Merge remote-tracking branch 'origin/main' into feature/custom-tool-headers3fe2640Merge branch 'main' into feature/custom-tool-headersb988994Merge remote-tracking branch 'origin/feature/custom-tool-headers' into feature/custom-tool-headers05c01b6add additional headers to actual Tool calls + minor fixes3b8b0e2add config to get_tool_server_data call3d58fe0Merge branch 'refs/heads/dev' into feature/custom-tool-headers20c74dbremove console.log + cleanup📊 Changes
5 files changed (+97 additions, -5 deletions)
View changed files
📝
backend/open_webui/routers/configs.py(+8 -1)📝
backend/open_webui/utils/middleware.py(+5 -0)📝
backend/open_webui/utils/tools.py(+8 -2)➕
src/lib/components/AddServerModal.svelte(+0 -0)📝
src/lib/components/AddToolServerModal.svelte(+76 -2)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch may lead to immediate closure of the PR.Changelog Entry
Description
Makes it possible to add custom headers to tool calls by adding a (optional) KEY => VALUE list to the Tools Modal.
Reason is that not all MCP's use or require the "standard" Auth headers, and custom MCP's can use it for custom implementations (eg. require
API_CLIENTandAPI_SECRET).Added
Changed
N/A
Deprecated
N/A
Removed
N/A
Fixed
N/A
Security
N/A
Breaking Changes
Additional Information
Based on Discussion: https://github.com/open-webui/open-webui/discussions/17893
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.