Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
32 changes: 32 additions & 0 deletions lib/compatible-clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,35 @@ export const compatibleClients: readonly CompatibleClient[] = [
},
},
];

const markdownMcpTransportLabels: Record<McpTransport, string> = {
stdio: "stdio",
"streamable-http": "Streamable HTTP",
sse: "legacy SSE",
};

export const renderCompatibleClientsMarkdown = (): string =>
compatibleClients
.map((client) => {
const lines = [
`## [${client.name}](${client.homepageUrl})`,
"",
client.description,
"",
client.supports.skills ? "- Agent Skills" : null,
client.supports.mcp
? `- MCP: ${client.supports.mcp.transports
.map((transport) => markdownMcpTransportLabels[transport])
.join(", ")}`
: null,
client.instructionsUrl
? `- [Setup instructions](${client.instructionsUrl})`
: null,
client.sourceUrl ? `- [Source code](${client.sourceUrl})` : null,
];

return lines
.filter((line): line is string => line !== null)
.join("\n");
})
.join("\n\n");
7 changes: 5 additions & 2 deletions lib/geistdocs/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { type InferPageType, loader } from "fumadocs-core/source";
import { lucideIconsPlugin } from "fumadocs-core/source/lucide-icons";
import { docs } from "@/.source/server";
import { basePath } from "@/geistdocs";

import { renderCompatibleClientsMarkdown } from "@/lib/compatible-clients";
// See https://fumadocs.dev/docs/headless/source-api for more info
export const source = loader({
baseUrl: "/",
Expand Down Expand Up @@ -31,7 +31,10 @@ export const getLLMText = async (
page: InferPageType<typeof source>,
{ includeNavigationFooter = true } = {}
) => {
const processed = await page.data.getText("processed");
const processed = (await page.data.getText("processed")).replace(
"<CompatibleClients />",
renderCompatibleClientsMarkdown()
);
const { title, description, product, type, summary, prerequisites, related } =
page.data;

Expand Down