diff --git a/package-lock.json b/package-lock.json index 70fb737..cce999b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@makeplane/plane-mcp-server", - "version": "0.1.3", + "version": "0.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@makeplane/plane-mcp-server", - "version": "0.1.3", + "version": "0.1.4", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.9.0", diff --git a/package.json b/package.json index 2b408cf..9d71bd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@makeplane/plane-mcp-server", - "version": "0.1.3", + "version": "0.1.4", "description": "The Plane MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with Plane APIs, enabling projects, work items, and automations capabilities for develops and AI interfaces.", "bin": { "plane-mcp-server": "./build/index.js" diff --git a/src/common/request-helper.ts b/src/common/request-helper.ts index d4f07e4..b6ddc21 100644 --- a/src/common/request-helper.ts +++ b/src/common/request-helper.ts @@ -5,20 +5,27 @@ export async function makePlaneRequest(method: string, path: string, body: an const host = hostUrl.endsWith("/") ? hostUrl : `${hostUrl}/`; const url = `${host}api/v1/${path}`; const headers: Record = { - "Content-Type": "application/json", "X-API-Key": process.env.PLANE_API_KEY || "", }; + // Only add Content-Type for non-GET requests + if (method.toUpperCase() !== 'GET') { + headers["Content-Type"] = "application/json"; + } + try { const config: AxiosRequestConfig = { url, method, headers, - data: body, }; - const response = await axios(config); + // Only include body for non-GET requests + if (method.toUpperCase() !== 'GET' && body !== null) { + config.data = body; + } + const response = await axios(config); return response.data; } catch (error) { if (axios.isAxiosError(error)) {