Skip to content

Commit e7a7d21

Browse files
committed
Add site readme
Signed-off-by: Marcos Candeia <[email protected]>
1 parent af29426 commit e7a7d21

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ deno add @deco/mcp
1313

1414
Here'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
1719
import { Deco } from "@deco/deco";
1820
import { 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

4162
The server will run on port 8000 by default. You can override this by setting

0 commit comments

Comments
 (0)