refactor: make Server class framework-agnostic by moving express to separate module (#1223)
This commit is contained in:
parent
401a189fb8
commit
7c9257cdf5
1 changed files with 93 additions and 92 deletions
|
|
@ -71,7 +71,7 @@ For more detailed patterns (stateless vs stateful, JSON response mode, CORS, DNS
|
|||
MCP servers running on localhost are vulnerable to DNS rebinding attacks. Use `createMcpExpressApp()` to create an Express app with DNS rebinding protection enabled by default:
|
||||
|
||||
```typescript
|
||||
import { createMcpExpressApp } from '@modelcontextprotocol/sdk/server/index.js';
|
||||
import { createMcpExpressApp } from '@modelcontextprotocol/sdk/server/express.js';
|
||||
|
||||
// Protection auto-enabled (default host is 127.0.0.1)
|
||||
const app = createMcpExpressApp();
|
||||
|
|
|
|||
Loading…
Reference in a new issue