nx-mcp-server 1.0.5 → 1.0.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx-mcp-server",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "NX MCP Server — 远程图片压缩 MCP 工具",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -43,14 +43,9 @@ async function startHttp(){
43
43
  const {StreamableHTTPServerTransport}=await import('@modelcontextprotocol/sdk/server/streamableHttp.js');
44
44
  const {createMcpExpressApp}=await import('@modelcontextprotocol/sdk/server/express.js');
45
45
  const {randomUUID}=await import('node:crypto');
46
- const {default:express}=await import('express');
47
46
 
48
47
  const PORT=parseInt(process.env.MCP_PORT||'3000',10);
49
48
  const app=createMcpExpressApp({host:'0.0.0.0'});
50
-
51
- // 增大 body 限制 — 支持 dataUrl 等大体积图片参数
52
- app.use(express.json({limit:'50mb'}));
53
- app.use(express.urlencoded({limit:'50mb',extended:true}));
54
49
  const transports={};
55
50
 
56
51
  const mcpPostHandler=async (req,res)=>{
@@ -3,7 +3,7 @@ import {compressImage} from '../nx-api.js';
3
3
  // ===== 工具处理函数 =====
4
4
 
5
5
  async function handleCompress(args){
6
- return compressImage({urls:args.urls,files:args.files,quality:args.quality,output:args.output});
6
+ return compressImage({urls:args.urls,files:args.files,quality:args.quality,output:args.output,apiKey:args.apiKey});
7
7
  }
8
8
 
9
9
  // ===== 工具路由表 =====