whistler-mcp 1.0.4 → 1.0.6

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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/package.json +1 -1
  3. package/server.js +5 -1
package/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Whistler MCP Server
2
+ ![npm downloads](https://img.shields.io/npm/dt/whistler-mcp?color=indigo&style=flat) ![npm version](https://img.shields.io/npm/v/whistler-mcp?color=indigo&style=flat)
2
3
 
3
4
  An official [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for interacting with the Whistler placement data platform. This allows AI assistants like Claude Desktop, Cursor, and others to seamlessly read job roles, platform statistics, and PDFs on your behalf.
4
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whistler-mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "An MCP Server for retrieving placement data, job roles, and platform statistics from the Whistler API.",
5
5
  "main": "server.js",
6
6
  "bin": {
package/server.js CHANGED
@@ -217,7 +217,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
217
217
  result = await invokeApi('/buy-bid', 'POST', params);
218
218
  break;
219
219
  case 'view_job_pdf': {
220
- const arrayBuffer = await invokeApiBinary(params.pdfUrl);
220
+ // pdfUrl from the backend is a relative path like /api/pdfs/secure/:id
221
+ // invokeApiBinary prepends API_BASE_URL which already ends in /api,
222
+ // so we must strip the leading /api prefix to avoid doubling it.
223
+ const normalizedPdfUrl = params.pdfUrl.replace(/^\/api/, '');
224
+ const arrayBuffer = await invokeApiBinary(normalizedPdfUrl);
221
225
  const buffer = Buffer.from(arrayBuffer);
222
226
  const pdfData = await pdfParse(buffer);
223
227
  result = {