@cyanheads/pubmed-mcp-server 1.3.1 → 1.3.2

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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-^5.8.3-blue.svg?style=flat-square)](https://www.typescriptlang.org/)
8
8
  [![Model Context Protocol](https://img.shields.io/badge/MCP%20SDK-^1.17.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/)
9
- [![Version](https://img.shields.io/badge/Version-1.3.1-blue.svg?style=flat-square)](./CHANGELOG.md)
9
+ [![Version](https://img.shields.io/badge/Version-1.3.2-blue.svg?style=flat-square)](./CHANGELOG.md)
10
10
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://opensource.org/licenses/Apache-2.0)
11
11
  [![Status](https://img.shields.io/badge/Status-Stable-green.svg?style=flat-square)](https://github.com/cyanheads/pubmed-mcp-server/issues)
12
12
  [![GitHub](https://img.shields.io/github/stars/cyanheads/pubmed-mcp-server?style=social)](https://github.com/cyanheads/pubmed-mcp-server)
@@ -32,6 +32,11 @@ async function createMcpServerInstance() {
32
32
  operation: "createMcpServerInstance",
33
33
  });
34
34
  logger.info("Initializing MCP server instance", context);
35
+ requestContextService.configure({
36
+ appName: config.mcpServerName,
37
+ appVersion: config.mcpServerVersion,
38
+ environment,
39
+ });
35
40
  const server = new McpServer({ name: config.mcpServerName, version: config.mcpServerVersion }, {
36
41
  capabilities: {
37
42
  logging: {},
@@ -90,11 +95,6 @@ export async function initializeAndStartServer() {
90
95
  operation: "initializeAndStartServer",
91
96
  });
92
97
  logger.info("MCP Server initialization sequence started.", context);
93
- requestContextService.configure({
94
- appName: config.mcpServerName,
95
- appVersion: config.mcpServerVersion,
96
- environment,
97
- });
98
98
  try {
99
99
  const result = await startTransport();
100
100
  logger.info("MCP Server initialization sequence completed successfully.", context);
@@ -19,6 +19,7 @@ export declare class NcbiRequestQueueManager {
19
19
  private requestQueue;
20
20
  private isProcessingQueue;
21
21
  private lastRequestTime;
22
+ private keepAliveInterval;
22
23
  constructor();
23
24
  /**
24
25
  * Processes the request queue, ensuring delays between requests to respect NCBI rate limits.
@@ -9,8 +9,11 @@ export class NcbiRequestQueueManager {
9
9
  this.requestQueue = [];
10
10
  this.isProcessingQueue = false;
11
11
  this.lastRequestTime = 0;
12
- // Constructor should not have side-effects like logging.
13
- // The service that uses this manager can log its creation if needed.
12
+ // This interval's purpose is to keep the Node.js event loop alive
13
+ // so the process doesn't exit prematurely when running in stdio mode.
14
+ this.keepAliveInterval = setInterval(() => {
15
+ // This empty interval keeps the event loop active.
16
+ }, 1000000);
14
17
  }
15
18
  /**
16
19
  * Processes the request queue, ensuring delays between requests to respect NCBI rate limits.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/pubmed-mcp-server",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "A Model Context Protocol (MCP) server enabling AI agents to intelligently search, retrieve, and analyze biomedical literature from PubMed via NCBI E-utilities. Built on the mcp-ts-template for robust, production-ready performance.",
5
5
  "main": "dist/index.js",
6
6
  "files": [