github/http_mcp_headers
Implement secret-safe HTTP headers for MCP transport in gh-aw.
npx skills add https://github.com/github/gh-aw --skill http_mcp_headers
Use this reference for HTTP MCP header secret support in the copilot engine.
When HTTP MCP headers include GitHub Actions secrets, mcp-config.json must:
${{ secrets.DD_API_KEY }})on:
workflow_dispatch:
permissions:
contents: read
engine: copilot
mcp-servers:
datadog:
type: http
url: "https://mcp.datadoghq.com/api/unstable/mcp-server/mcp"
headers:
DD_API_KEY: "${{ secrets.DD_API_KEY }}"
DD_APPLICATION_KEY: "${{ secrets.DD_APPLICATION_KEY }}"
DD_SITE: "${{ secrets.DD_SITE || 'datadoghq.com' }}"
allowed:
- search_datadog_dashboards
- search_datadog_slos
- search_datadog_metrics
- get_datadog_metric
# Datadog Dashboard Search
Search for Datadog dashboards and provide a summary.
{
"mcpServers": {
"datadog": {
"type": "http",
"url": "https://mcp.datadoghq.com/api/unstable/mcp-server/mcp",
"headers": {
"DD_API_KEY": "${DD_API_KEY}",
"DD_APPLICATION_KEY": "${DD_APPLICATION_KEY}",
"DD_SITE": "${DD_SITE}"
},
"tools": [
"search_datadog_dashboards",
"search_datadog_slos",
"search_datadog_metrics",
"get_datadog_metric"
],
"env": {
"DD_API_KEY": "\\${DD_API_KEY}",
"DD_APPLICATION_KEY": "\\${DD_APPLICATION_KEY}",
"DD_SITE": "\\${DD_SITE}"
}
}
}
}
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
DD_APPLICATION_KEY: ${{ secrets.DD_APPLICATION_KEY }}
DD_SITE: ${{ secrets.DD_SITE || 'datadoghq.com' }}
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
# ... other env vars
GH_AW_MCP_CONFIG is intentionally NOT in the YAML env: block — it is exported from the run script (export GH_AW_MCP_CONFIG="$HOME/.copilot/mcp-config.json") so $HOME is resolved at runtime. GitHub Actions does not shell-expand env: values, so the path must be set via export to work on self-hosted/containerized runners where HOME is not /home/runner.
${{ secrets.VAR_NAME }} patterns${{ secrets.VAR || 'default' }}${{ secrets.DD_API_KEY }} to ${DD_API_KEY}\${VAR_NAME})${{ secrets.* }} syntaxAll tests pass ✓
Take github/http_mcp_headers from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.