Commit 9d71184
Set custom User-Agent for TFE API requests (#268)
This change sets a custom User-Agent header ("terraform-mcp-server/{version}")
for all Terraform Cloud/Enterprise API requests made by the MCP server.
Previously, the MCP server used the default go-tfe User-Agent ("go-tfe"),
making it impossible to distinguish MCP server requests from other go-tfe
client requests in HCP Terraform logs and metrics.
With this change:
- TFE API requests will use: "terraform-mcp-server/{version}"
- This matches the pattern already used for Registry API requests
- HCP Terraform can now identify and track MCP server usage separately
Co-authored-by: Claude Sonnet 4.5 <[email protected]>1 parent 865332b commit 9d71184
2 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
2 | 8 | | |
3 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
0 commit comments