Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions documentation/src/pages/extensions/detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,34 @@ const getDocumentationPath = (serverId: string): string => {
</div>
)}

{server.headers && server.headers.length > 0 && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @amed-xyz . I added similar support in a different PR but yours is cleaner so I'll rebase yours into my branch! I also hid the Environment Variables section in the details card for streamable http extension types. I can still plan to do that in my branch if you think that's a valid assumption.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, streamable http extensions would only show a Request Headers section

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dianed-square thanks for the review! I'm not sure if there's valid cases for a streamable http extension to have env vars, maybe @blackgirlbytes would more about it!

<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
Expand Down
5 changes: 5 additions & 0 deletions documentation/src/types/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ export interface MCPServer {
description: string;
required: boolean;
}[];
headers?: {
name: string;
description: string;
required: boolean;
}[];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the MCPServer type used across the extensions section

}
5 changes: 5 additions & 0 deletions documentation/src/utils/install-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand Down
7 changes: 4 additions & 3 deletions documentation/static/servers.json
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,11 @@
"installation_notes": "This is a remote extension. Configure using the endpoint URL in Goose settings.",
"is_builtin": false,
"endorsed": true,
"environmentVariables": [
"environmentVariables": [],
"headers": [
{
"name": "GITHUB_PERSONAL_ACCESS_TOKEN",
"description": "Required environment variable",
"name": "Authorization",
"description": "GitHub Personal Access Token",
"required": true
}
],
Expand Down