refactor: make Server class framework-agnostic by moving express to separate module (#1223)

This commit is contained in:
Wuma 2025-12-03 19:58:42 +08:00 • committed by GitHub
commit 7c9257cdf5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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();