mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
Add support for headers in extensions deeplinks (#5034)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -14,4 +14,9 @@ export interface MCPServer {
|
||||
description: string;
|
||||
required: boolean;
|
||||
}[];
|
||||
headers?: {
|
||||
name: string;
|
||||
description: string;
|
||||
required: boolean;
|
||||
}[];
|
||||
}
|
||||
@@ -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}`;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user