Skip to content

Commit 8c9ff3b

Browse files
authored
fix: Use official HashiCorp Terraform MCP server (#231)
* debug: add comprehensive MCP server diagnostics and cache clearing Phase 1 of systematic MCP connectivity fix: - Environment snapshot (Node, NPM, disk, memory, network) - Complete cache clearing (NPM, NPX caches) - MCP package accessibility tests - Network connectivity validation This will help identify if cache corruption or environment differences are causing the Terraform MCP server to fail while Context7 works. * fix: Use official HashiCorp Terraform MCP server - Replace non-existent @modelcontextprotocol/server-terraform package - Use docker-based HashiCorp terraform-mcp-server - Keep Context7 MCP server as npx package (working) - Docker validated and working in GitHub Actions environment - This fixes MCP server connectivity issues in feature discovery Resolves: #224
1 parent 74508e9 commit 8c9ff3b

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

.github/workflows/feature-discovery.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,38 @@ jobs:
7070
fi
7171
echo "Provider version validation passed: $PROVIDER_VERSION"
7272
73+
- name: Environment Diagnostics & Cache Clearing
74+
run: |
75+
echo "=== Environment Snapshot ==="
76+
echo "Node.js: $(node --version)"
77+
echo "NPM: $(npm --version)"
78+
echo "NPX: $(npx --version)"
79+
echo "Runner: $(uname -a)"
80+
echo "Disk space: $(df -h /)"
81+
echo "Memory: $(free -h)"
82+
echo "Network test: $(curl -s -o /dev/null -w '%{http_code}' https://registry.npmjs.org/)"
83+
84+
echo "=== Cache Clearing ==="
85+
echo "Clearing NPM caches..."
86+
npm cache clean --force || echo "npm cache clean failed"
87+
rm -rf ~/.npm/_cacache ~/.npm/_logs || echo "npm cache dir cleanup failed"
88+
89+
echo "Clearing NPX cache..."
90+
rm -rf ~/.npm/_npx || echo "npx cache cleanup failed"
91+
92+
echo "=== Testing MCP Package Access ==="
93+
echo "Testing Terraform MCP server package access..."
94+
npm view @modelcontextprotocol/server-terraform version || echo "Package lookup failed"
95+
96+
echo "Testing Context7 MCP server package access..."
97+
npm view @upstash/context7-mcp version || echo "Package lookup failed"
98+
99+
echo "=== Pre-installation Test ==="
100+
echo "Testing NPX with verbose output..."
101+
npx --version
102+
103+
echo "Environment diagnostics complete!"
104+
73105
- name: Run Claude Code Feature Discovery
74106
id: claude-discovery
75107
uses: anthropics/claude-code-action@beta
@@ -86,10 +118,12 @@ jobs:
86118
{
87119
"mcpServers": {
88120
"terraform": {
89-
"command": "npx",
121+
"command": "docker",
90122
"args": [
91-
"-y",
92-
"@modelcontextprotocol/server-terraform@latest"
123+
"run",
124+
"-i",
125+
"--rm",
126+
"hashicorp/terraform-mcp-server"
93127
]
94128
},
95129
"context7": {

0 commit comments

Comments
 (0)