File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ deno add @deco/mcp
1313
1414Here's how to set up an MCP server with your Deco site:
1515
16+ 1 . If you're using ` https://github.com/deco-sites/mcp ` as template
17+
1618``` typescript
1719import { Deco } from " @deco/deco" ;
1820import { Hono } from " @hono/hono" ;
@@ -36,6 +38,25 @@ Deno.serve({
3638});
3739```
3840
41+ 2 . If you're a fresh-based site
42+ // in your fresh.config.ts
43+
44+ ``` typescript
45+ import { defineConfig } from " $fresh/server.ts" ;
46+ import { plugins } from " deco/plugins/deco.ts" ;
47+ import manifest from " ./manifest.gen.ts" ;
48+
49+ export default defineConfig ({
50+ plugins: plugins ({
51+ manifest ,
52+ htmx: true ,
53+ useServer : (deco , hono ) => {
54+ hono .use (" /*" , mcpServer (deco as any )); // some type errors may occur
55+ },
56+ }),
57+ });
58+ ```
59+
3960## Configuration
4061
4162The server will run on port 8000 by default. You can override this by setting
You can’t perform that action at this time.
0 commit comments