docs(update): address review comments for MCP server guide (#41274)

* docs: improve BYOM guide for MCP server deployment and OAuth integration

* fix rebase

* fix pnpm.lock

* docs: clarify MCP guide and example naming

* fix pnpm-lock

* docs: remove basePath from MCP tutorial and example

- Remove misleading comment about Edge Functions routing
- Remove basePath as it's not needed - Edge Functions automatically strip /functions/v1/<functionName> prefix
- Simplify code to just use const app = new Hono()

* docs: clarify --no-verify-jwt flag and authentication options

- Explain that omitting --no-verify-jwt enables JWT verification at Edge Function layer
- Clarify this provides basic protection for internal servers but not full MCP auth
- Update authentication section to be consistent
- Add tip in deployment section about omitting the flag

* fiox format

* PR feedback

* chore: restore pnpm-lock.yaml from master
This commit is contained in:
Pedro Rodrigues authored and GitHub committed 2025-12-12 11:50:57 +00:00
1 parent b97e41e20b
commit 50302662f7
4 files changed
+31 -86

No files matched your search

@@ -1,9 +1,8 @@
{
"imports": {
"@hono/mcp": "npm:@hono/mcp@^0.1.1",
"@modelcontextprotocol/sdk": "npm:/@modelcontextprotocol/sdk@^1.17.3",
"@modelcontextprotocol/sdk/": "npm:/@modelcontextprotocol/sdk@^1.17.3/",
"@modelcontextprotocol/sdk": "npm:/@modelcontextprotocol/sdk@^1.24.3",
"hono": "npm:hono@^4.9.2",
"zod": "npm:zod@^3.25.76"
"zod": "npm:zod@^4.1.13"
}
}
@@ -6,14 +6,13 @@ import { StreamableHTTPTransport } from "@hono/mcp";
import { Hono } from "hono";
import { z } from "zod";
// Change this to your function name
const functionName = "simple-mcp-server";
const app = new Hono().basePath(`/${functionName}`);
// Create Hono app
const app = new Hono();
// Create your MCP server
const server = new McpServer({
name: "simple-mcp-server",
version: "1.0.0",
name: "mcp",
version: "0.1.0",
});
// Register a simple addition tool
@@ -25,8 +24,8 @@ server.registerTool("add", {
content: [{ type: "text", text: String(a + b) }],
}));
// Handle MCP requests
app.all("/mcp", async (c) => {
// Handle MCP requests at the root path
app.all("/", async (c) => {
const transport = new StreamableHTTPTransport();
await server.connect(transport);
return transport.handleRequest(c);