Add support for headers in extensions deeplinks (#5034)

This commit is contained in:
Amed Rodriguez
2025-10-06 16:03:05 -07:00
committed by GitHub
parent 1af5bea578
commit d41e32a478
4 changed files with 43 additions and 4 deletions
@@ -167,6 +167,34 @@ const getDocumentationPath = (serverId: string): string => {
</div>
)}
{server.headers && server.headers.length > 0 && (
<div className="space-y-4">
<h2 className="text-lg font-medium text-textStandard m-0">
Request Headers
</h2>
<div>
{server.headers.map((header) => (
<div
key={header.name}
className="border-b border-borderSubtle py-4 first:pt-0 last:border-0"
>
<div className="text-sm text-textStandard font-medium">
{header.name}
</div>
<div className="text-textSubtle text-sm mt-1">
{header.description}
</div>
{header.required && (
<Badge variant="secondary" className="mt-2">
Required
</Badge>
)}
</div>
))}
</div>
</div>
)}
<div className="card-footer">
{githubStars !== null && (
<a
+5
View File
@@ -14,4 +14,9 @@ export interface MCPServer {
description: string;
required: boolean;
}[];
headers?: {
name: string;
description: string;
required: boolean;
}[];
}
+5
View File
@@ -25,6 +25,11 @@ export function getGooseInstallLink(server: MCPServer): string {
.map(
(env) => `env=${encodeURIComponent(`${env.name}=${env.description}`)}`
),
...(server.headers || [])
.filter((header) => header.required)
.map(
(header) => `header=${encodeURIComponent(`${header.name}=${header.description}`)}`
),
].join("&");
return `goose://extension?${queryParams}`;
+5 -4
View File
@@ -285,13 +285,14 @@
"description": "GitHub repository management and operations",
"url": "https://api.githubcopilot.com/mcp/",
"link": "https://github.com/github/github-mcp-server",
"installation_notes": "This is a remote extension. Configure using the endpoint URL in Goose settings.",
"installation_notes": "This is a remote extension that requires a GitHub Personal Access Token as a Request Header e.g Authorization: Bearer <YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>.",
"is_builtin": false,
"endorsed": true,
"environmentVariables": [
"environmentVariables": [],
"headers": [
{
"name": "GITHUB_PERSONAL_ACCESS_TOKEN",
"description": "Required environment variable",
"name": "Authorization",
"description": "Bearer <YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>",
"required": true
}
],