Add support for headers in extensions deeplinks (#5034)
This commit is contained in:
@@ -167,6 +167,34 @@ const getDocumentationPath = (serverId: string): string => {
|
|||||||
</div>
|
</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">
|
<div className="card-footer">
|
||||||
{githubStars !== null && (
|
{githubStars !== null && (
|
||||||
<a
|
<a
|
||||||
|
|||||||
@@ -14,4 +14,9 @@ export interface MCPServer {
|
|||||||
description: string;
|
description: string;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
}[];
|
}[];
|
||||||
|
headers?: {
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
required: boolean;
|
||||||
|
}[];
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,11 @@ export function getGooseInstallLink(server: MCPServer): string {
|
|||||||
.map(
|
.map(
|
||||||
(env) => `env=${encodeURIComponent(`${env.name}=${env.description}`)}`
|
(env) => `env=${encodeURIComponent(`${env.name}=${env.description}`)}`
|
||||||
),
|
),
|
||||||
|
...(server.headers || [])
|
||||||
|
.filter((header) => header.required)
|
||||||
|
.map(
|
||||||
|
(header) => `header=${encodeURIComponent(`${header.name}=${header.description}`)}`
|
||||||
|
),
|
||||||
].join("&");
|
].join("&");
|
||||||
|
|
||||||
return `goose://extension?${queryParams}`;
|
return `goose://extension?${queryParams}`;
|
||||||
|
|||||||
@@ -285,13 +285,14 @@
|
|||||||
"description": "GitHub repository management and operations",
|
"description": "GitHub repository management and operations",
|
||||||
"url": "https://api.githubcopilot.com/mcp/",
|
"url": "https://api.githubcopilot.com/mcp/",
|
||||||
"link": "https://github.com/github/github-mcp-server",
|
"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,
|
"is_builtin": false,
|
||||||
"endorsed": true,
|
"endorsed": true,
|
||||||
"environmentVariables": [
|
"environmentVariables": [],
|
||||||
|
"headers": [
|
||||||
{
|
{
|
||||||
"name": "GITHUB_PERSONAL_ACCESS_TOKEN",
|
"name": "Authorization",
|
||||||
"description": "Required environment variable",
|
"description": "Bearer <YOUR_GITHUB_PERSONAL_ACCESS_TOKEN>",
|
||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user