Skip to content

Commit 223984b

Browse files
authored
Add MCP server card endpoint (#60)
1 parent cb4b3fb commit 223984b

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import type { APIRoute } from "astro";
2+
3+
export const prerender = true;
4+
5+
const serverCard = {
6+
$schema: "https://static.modelcontextprotocol.io/schemas/mcp-server-card/v1.json",
7+
version: "1.0",
8+
protocolVersion: "2025-06-18",
9+
serverInfo: {
10+
name: "asynctalk",
11+
title: "AsyncTalk",
12+
version: "2.0.0",
13+
},
14+
description: "AsyncTalk 是一档中文 Web 开发播客。",
15+
documentationUrl: "https://asynctalk.com",
16+
transport: {
17+
type: "streamable-http",
18+
endpoint: "/mcp",
19+
},
20+
capabilities: {
21+
tools: {},
22+
prompts: {},
23+
resources: {},
24+
},
25+
};
26+
27+
export const GET: APIRoute = () => {
28+
return new Response(JSON.stringify(serverCard, null, 2), {
29+
headers: {
30+
"Access-Control-Allow-Origin": "*",
31+
"Cache-Control": "public, max-age=3600",
32+
"Content-Type": "application/json; charset=utf-8",
33+
"X-Content-Type-Options": "nosniff",
34+
},
35+
});
36+
};

0 commit comments

Comments
 (0)