fix: Add required Accept header and read endpoint from config for Forgetful MCP#745
fix: Add required Accept header and read endpoint from config for Forgetful MCP#745Copilot wants to merge 3 commits into
Conversation
- Update Test-MemoryHealth.ps1 to include required Accept header - Update Install-ForgetfulWindows.ps1 with proper headers - Update Install-ForgetfulLinux.ps1 with proper headers - Fix unused variable warnings by assigning to $null Forgetful MCP server requires "Accept: application/json, text/event-stream" header for all HTTP requests to prevent 406 Not Acceptable errors. Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
| @@ -90,7 +90,11 @@ function Test-ForgetfulAvailable { | |||
| # Forgetful runs on localhost:8020 - check if reachable | |||
| try { | |||
| $uri = "http://localhost:8020/mcp" | |||
There was a problem hiding this comment.
@copilot needs to be pulled from .mcp.json file. There's already a method to do this
There was a problem hiding this comment.
Added Get-ForgetfulEndpoint helper function that reads the endpoint from .mcp.json (mcpServers.forgetful.url). Falls back to default http://localhost:8020/mcp if config not found. Fixed in commit d254012.
PR Validation ReportNote ✅ Status: PASS Description Validation
QA Validation
⚡ Warnings
Powered by PR Validation workflow |
| try { | ||
| $uri = "http://localhost:8020/mcp" | ||
| $response = Invoke-WebRequest -Uri $uri -Method Get -TimeoutSec 5 -ErrorAction Stop | ||
| $headers = @{ |
There was a problem hiding this comment.
Hardcoded URI instead of reading from config file (Bugbot Rules)
The reviewer @rjmurillo noted that the Forgetful endpoint URI http://localhost:8020/mcp is hardcoded on line 92, but it needs to be pulled from the .mcp.json file instead. There's already an existing method to read this configuration. Hardcoding the URI makes the code fragile if the port or endpoint changes in the configuration.
Spec-to-Implementation ValidationTip ✅ Final Verdict: PASS What is Spec Validation?This validation ensures your implementation matches the specifications:
Validation Summary
Spec References
Requirements Traceability DetailsRequirements Coverage Matrix
Summary
GapsNone identified. The implementation matches the proposed fix in the issue exactly. The change was also applied consistently to related installation scripts that perform similar HTTP endpoint validation. VERDICT: PASS Implementation Completeness DetailsAcceptance Criteria Checklist
Missing FunctionalityNone identified. All three files specified in the issue are updated. Edge Cases Not Covered
Implementation Quality
VERDICT: PASS Run Details
Powered by AI Spec Validator workflow |
AI Quality Gate ReviewTip ✅ Final Verdict: PASS WalkthroughThis PR was reviewed by six AI agents in parallel, analyzing different aspects of the changes:
Review Summary
💡 Quick Access: Click on individual agent jobs (e.g., "🔒 security Review", "🧪 qa Review") in the workflow run to see detailed findings and step summaries. DevOps Review DetailsLet me verify the existing pattern in Test-ForgetfulHealth.ps1 as mentioned in the PR description. DevOps Review: PR #743PR Scope DetectionCategory: SCRIPT (PowerShell scripts in Pipeline Impact Assessment
CI/CD Quality Checks
Findings
Analysis Details:
Template Assessment
Automation Opportunities
The header pattern is already abstracted in RecommendationsNone. The changes are minimal, correct, and follow established patterns. Security Review DetailsSecurity Review: PR #743PR Type Classification
Findings
AnalysisChanges Reviewed:
Security Observations:
RecommendationsNone. The changes follow existing patterns in VerdictRoadmap Review DetailsThe existing Strategic Alignment Assessment
Feature Completeness
Impact Analysis
Concerns
Recommendations
VerdictQA Review DetailsNow let me look for existing tests for these files and check the reference implementation in Now I have all the information needed. Let me provide the QA review: QA Review VerdictEVIDENCE
Test Coverage AssessmentNote: These are installation and health check scripts, not core application logic. They contain infrastructure code that:
Existing tests: The repository uses Pester tests ( Quality Concerns
Regression Risk Assessment
Positive Observations
Analyst Review DetailsLet me complete my analysis by checking the existing pattern and verifying the consistency of the changes. Code Quality Score
Overall: 5/5 Impact Assessment
Findings
Recommendations
VerdictThe changes are minimal and surgical. Each file receives identical treatment:
The pattern matches the existing implementation in Architect Review DetailsDesign Quality Assessment
Overall Design Score: 5/5 Architectural Concerns
The header values Breaking Change Assessment
Technical Debt Analysis
ADR Assessment
The fix follows the established implementation pattern already present in Recommendations
VerdictRun Details
Powered by AI Quality Gate workflow |
There was a problem hiding this comment.
Pull request overview
This PR fixes HTTP 406 Not Acceptable errors when connecting to the Forgetful MCP server by adding the required Accept: application/json, text/event-stream header to HTTP requests. The Forgetful MCP server requires clients to accept both content types, and previously the health check and installation scripts were making requests without this header, causing false negatives even when the service was functioning correctly.
Key Changes
- Added Accept header with both
application/jsonandtext/event-streamvalues to all Forgetful HTTP requests - Updated variable assignment pattern to use
$null =to explicitly discard unused responses - Pattern aligns with existing implementation in
Test-ForgetfulHealth.ps1
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.claude/skills/memory/scripts/Test-MemoryHealth.ps1 |
Added Accept header to Test-ForgetfulAvailable function for health check validation |
scripts/forgetful/Install-ForgetfulWindows.ps1 |
Added Accept header to HTTP endpoint test during Windows installation verification |
scripts/forgetful/Install-ForgetfulLinux.ps1 |
Added Accept header to HTTP endpoint test during Linux installation verification |
The changes are consistent, well-implemented, and follow the established pattern from Test-ForgetfulHealth.ps1. All three files correctly add the required headers and properly handle the response. No issues were identified during the review.
- Add Get-ForgetfulEndpoint helper function to read from .mcp.json - Update Test-ForgetfulAvailable to use config instead of hardcoding - Falls back to default endpoint if config not found - Addresses review feedback on line 92 Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com> Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
|
Closing this PR as the HTTP infrastructure it addresses was removed in #768. Forgetful now uses stdio transport via uvx, which eliminates the Accept header issue by removing HTTP entirely. |
Work completed: - PR #768: MERGED (session log fix from previous cycle) - PR #566: Auto-merge enabled, blocked by CodeRabbit - PR #745: CLOSED as obsolete (HTTP scripts deleted) - PR #757: Fixed title, auto-merge enabled 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Work completed: - PR #768: MERGED (session log fix from previous cycle) - PR #566: Auto-merge enabled, blocked by CodeRabbit - PR #745: CLOSED as obsolete (HTTP scripts deleted) - PR #757: Fixed title, auto-merge enabled 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: rjmurillo[bot] <rjmurillo-bot@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Work completed: - PR #768: MERGED (session log fix from previous cycle) - PR #566: Auto-merge enabled, blocked by CodeRabbit - PR #745: CLOSED as obsolete (HTTP scripts deleted) - PR #757: Fixed title, auto-merge enabled 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Forgetful MCP server returns 406 Not Acceptable when clients omit the required
Accept: application/json, text/event-streamheader. Health checks and installation scripts were making requests without this header, causing false negatives. Additionally, the Forgetful endpoint is now read from.mcp.jsonconfiguration for better maintainability.Changes
Get-ForgetfulEndpointhelper function to read endpoint from.mcp.jsonTest-ForgetfulAvailableto use configuration instead of hardcoded URLhttp://localhost:8020/mcpif config not foundImplementation
Configuration Reading:
Accept Header:
Pattern follows existing implementation in
Test-ForgetfulHealth.ps1which already included the correct headers. Configuration reading follows the approach used inSync-McpConfig.ps1for parsing.mcp.json.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.