Commit a930a9f
authored
feat: Add environment variable support for HTTP MCP headers (#3075)
* feat: Add environment variable support for HTTP MCP headers
- Enable ${env:VAR_NAME} syntax in HTTP MCP server headers
- Extends existing env var processing from stdio to http transport
- Improves security by avoiding hardcoded tokens in config files
Example usage:
"headers": {
"Authorization": "Bearer ${env:GITHUB_TOKEN}"
}
* test: Add unit test for HTTP headers environment variable processing
- Tests that env vars in HTTP headers are properly substituted
- Covers Authorization header with Bearer token pattern
- Verifies multiple headers and mixed content scenarios
* revert: Remove unnecessary formatting change in oauth_util.rs
Keep PR focused only on the core environment variable feature1 parent e501b5a commit a930a9f
1 file changed
+33
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
462 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
463 | 468 | | |
464 | 469 | | |
465 | 470 | | |
| |||
673 | 678 | | |
674 | 679 | | |
675 | 680 | | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
676 | 707 | | |
0 commit comments