import Layout from "@theme/Layout"; import { Download, Terminal, Star, ArrowLeft, Info } from "lucide-react"; import { Button } from "@site/src/components/ui/button"; import { Badge } from "@site/src/components/ui/badge"; import { getGooseInstallLink } from "@site/src/utils/install-links"; import { useLocation } from "@docusaurus/router"; import { useEffect, useState } from "react"; import type { MCPServer } from "@site/src/types/server"; import { fetchMCPServers } from "@site/src/utils/mcp-servers"; import Link from "@docusaurus/Link"; function ExtensionDetail({ server }: { server: MCPServer }) { return (

{server.name}

{server.is_builtin && ( Built-in )}

{server.description}

{server.installation_notes && (

{server.installation_notes}

)}
{server.is_builtin ? (
Can be enabled in the goose settings page
) : ( <>

Command

{`goose session --with-extension "${server.command}"`}
)}
{server.environmentVariables && (

Environment Variables

{server.environmentVariables.length > 0 ? (
{server.environmentVariables.map((env) => (
{env.name}
{env.description}
{env.required && ( Required )}
))}
) : (
No environment variables needed
)}
)}
{server.githubStars} on Github {server.is_builtin ? (
Built-in
) : ( Install )}
); } export default function DetailPage(): JSX.Element { const location = useLocation(); const [server, setServer] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); useEffect(() => { const loadServer = async () => { try { setLoading(true); setError(null); const servers = await fetchMCPServers(); // Get the ID from the query parameter const params = new URLSearchParams(location.search); const id = params.get("id"); if (!id) { setError("No extension ID provided"); return; } const foundServer = servers.find((s) => s.id === id); if (foundServer) { setServer(foundServer); } else { setError("Extension not found"); } } catch (err) { setError("Failed to load extension details"); console.error(err); } finally { setLoading(false); } }; loadServer(); }, [location]); if (loading) { return (
); } if (error || !server) { return (
{error || "Extension not found"}
); } return ; }