@smithery/sdk 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ import { createLRUStore } from "./session.js";
13
13
  */
14
14
  export function createStatefulServer(createMcpServer, options) {
15
15
  const app = options?.app ?? express();
16
- app.use(express.json());
16
+ app.use("/mcp", express.json());
17
17
  const sessionStore = options?.sessionStore ?? createLRUStore();
18
18
  // Handle POST requests for client-to-server communication
19
19
  app.post("/mcp", async (req, res) => {
@@ -10,7 +10,7 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
10
10
  */
11
11
  export function createStatelessServer(createMcpServer, options) {
12
12
  const app = options?.app ?? express();
13
- app.use(express.json());
13
+ app.use("/mcp", express.json());
14
14
  app.post("/mcp", async (req, res) => {
15
15
  // In stateless mode, create a new instance of transport and server for each request
16
16
  // to ensure complete isolation. A single instance would cause request ID collisions
@@ -81,10 +81,7 @@ export function parseAndValidateConfig(req, schema) {
81
81
  if (schema) {
82
82
  const result = schema.safeParse(config);
83
83
  if (!result.success) {
84
- const jsonSchema = zodToJsonSchema(schema, {
85
- name: "ConfigSchema",
86
- $refStrategy: "none",
87
- });
84
+ const jsonSchema = zodToJsonSchema(schema);
88
85
  const errors = result.error.issues.map((issue) => {
89
86
  // Safely traverse the config object to get the received value
90
87
  let received = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithery/sdk",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "SDK to develop with Smithery",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",