### Streamable HTTP Server Quickstart Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/readme.md Start the server for Streamable HTTP communication. The server will listen on the specified port. ```sh MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 ACME_API_KEY=... bun run start:http # Server listens at http://localhost:3010/mcp ``` -------------------------------- ### Configure Bun Install and Run Behavior Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/SKILL.md A `bunfig.toml` file at the project root configures Bun's installation and run behavior. Set `install.auto` to `fallback` and `run.bun` to `true` for flexible dependency management and to ensure Bun is used for running scripts. ```toml [install] auto = "fallback" frozenLockfile = false [run] bun = true ``` -------------------------------- ### Configuring Environment Variables Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/readme.md Copy the example environment file and edit it to set required variables. ```sh cp .env.example .env # edit .env and set required vars ``` -------------------------------- ### Example Repository Field Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/package-meta.md The standard format for specifying the Git repository URL in package.json. ```json "repository": { "type": "git", "url": "git+https://github.com/org/repo.git" } ``` -------------------------------- ### Example PackageManager Field Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/package-meta.md Indicates the intended package manager and its version, such as Bun. ```json "packageManager": "bun@1.3.2" ``` -------------------------------- ### LLM Service Usage Example Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-services/references/llm.md Code examples demonstrating how to use the LLM provider for chat completions and streaming. ```APIDOC ## Usage ### Non-Streaming Chat Completion ```ts // In a tool handler — assumes LLM provider was initialized in setup() // Note: chatCompletion takes RequestContext, not the unified Context. // In services, pass the RequestContext directly. In tool handlers, // create one via requestContextService or pass through from the service layer. const completion = await llmProvider.chatCompletion({ model: 'anthropic/claude-sonnet-4-20250514', messages: [{ role: 'user', content: 'Hello' }], max_tokens: 500, }, requestContext); ``` ### Streaming Chat Completion ```ts const stream = await llmProvider.chatCompletionStream({ model: 'anthropic/claude-sonnet-4-20250514', messages: [{ role: 'user', content: 'Hello' }], max_tokens: 500, }, requestContext); for await (const chunk of stream) { // chunk is ChatCompletionChunk } ``` ``` -------------------------------- ### Refresh and Initialization Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-mirror/SKILL.md Details how refresh is wired via `schedulerService` in `setup()`, with initialization running out-of-band. ```javascript Refresh wired via schedulerService in setup(); init runs out-of-band ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/README.md Install the project dependencies for the PubMed MCP Server using Bun. This command should be run after navigating into the project directory. ```sh bun install ``` -------------------------------- ### Package Arguments Example Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/server-json.md Defines arguments passed to the package command. Use this to specify positional arguments for running the server package. ```json "packageArguments": [ { "type": "positional", "value": "run" }, { "type": "positional", "value": "start:stdio" } ] ``` -------------------------------- ### IdGenerator Usage Examples Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-utils/references/security.md Shows how to generate IDs with custom prefixes, for specific entities, and raw random strings. Includes examples for validating IDs, retrieving entity types, and normalizing IDs. Demonstrates standalone UUID and request context ID generation. ```typescript // Simple ID with prefix const id = idGenerator.generate('PROJ'); // 'PROJ_A7K2M9' ``` ```typescript // Entity-based generation const gen = new IdGenerator({ project: 'PROJ', task: 'TASK' }); const taskId = gen.generateForEntity('task'); // 'TASK_X3B8P1' const valid = gen.isValid('TASK_X3B8P1', 'task'); // true const type = gen.getEntityType('TASK_X3B8P1'); // 'task' ``` ```typescript // Raw random string const token = idGenerator.generateRandomString(32); // 32-char alphanumeric ``` ```typescript // UUIDs const uuid = generateUUID(); // 'a1b2c3d4-e5f6-...' ``` -------------------------------- ### Example Author Field Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/package-meta.md Defines the package author, including their name, email, and a link to their GitHub profile. ```json "author": "Name (https://github.com/org/repo#readme)" ``` -------------------------------- ### Example Bin Field for npx Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/package-meta.md Configures the 'bin' field to make the server executable via 'npx'. This is crucial for command-line usability. ```json "bin": { "my-server": "dist/index.js" } ``` -------------------------------- ### Example Keywords Field Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/package-meta.md A list of keywords to improve npm discoverability. Includes base MCP terms and domain-specific terms. ```json "keywords": [ "mcp", "mcp-server", "model-context-protocol", "acme", "project-management", "task-tracking" ] ``` -------------------------------- ### Example Engines Field Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/package-meta.md Specifies the required Node.js and Bun versions for the project. Bun support is added alongside Node.js. ```json "engines": { "node": ">=24.0.0", "bun": ">=1.3.0" } ``` -------------------------------- ### MCP Client Configuration with Npx Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/readme.md Configure your MCP client to use the server via stdio with npx. No Bun installation is required. ```json { "mcpServers": { "my-server": { "type": "stdio", "command": "npx", "args": ["-y", "@cyanheads/my-mcp-server@latest"], "env": { "MCP_TRANSPORT_TYPE": "stdio", "MCP_LOG_LEVEL": "info", "ACME_API_KEY": "your-api-key" } } } } ``` -------------------------------- ### Usage Example Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-services/references/speech.md Illustrates how to use the SpeechService to perform Text-to-Speech and Speech-to-Text operations, as well as list voices and check health. ```APIDOC ## Usage Example ### Text-to-Speech ```ts // Access the TTS provider const ttsProvider = speechService.getTTSProvider(); // Synthesize speech const ttsResult = await ttsProvider.textToSpeech({ text: 'Hello, world!', voice: { voiceId: 'some-voice-id' }, format: 'mp3', }); ``` ### Speech-to-Text ```ts // Access the STT provider const sttProvider = speechService.getSTTProvider(); // Transcribe audio const sttResult = await sttProvider.speechToText({ audio: buffer, format: 'mp3', language: 'en', }); ``` ### List Available Voices ```ts // Get voices from the TTS provider const voices = await ttsProvider.getVoices(); ``` ### Health Check ```ts // Check the health of both TTS and STT providers const health = await speechService.healthCheck(); // Expected output: { tts: boolean, stt: boolean } ``` ``` -------------------------------- ### Navigate to Project Directory Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/README.md Change the current directory to the cloned PubMed MCP Server repository. This is necessary before installing dependencies. ```sh cd pubmed-mcp-server ``` -------------------------------- ### Remove First Session Block Example Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/agent-protocol.md This markdown block should be removed from agent protocol files once the initial onboarding steps are complete. It serves as a one-time guide for setup. ```markdown ## First Session > **Remove this section** from CLAUDE.md / AGENTS.md after completing these steps. 1. **Read the framework API** — ... 2. **Run the `setup` skill** — ... 3. **Design the server** — ... --- ``` -------------------------------- ### Register Service in Entry Point Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/add-service/SKILL.md Shows how to import and initialize the service within the application's setup callback in the main entry point file (e.g., `src/index.ts`). ```typescript // In src/index.ts (or src/worker.ts for Worker-only servers) import { init{{ServiceName}} } from './services/{{domain}}/{{domain}}-service.js'; // Add setup() alongside existing options: setup(core) { init{{ServiceName}}(core.config, core.storage); }, ``` -------------------------------- ### Build and Run Production Server Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/README.md Use these commands to build the production version of the server and then run it using either HTTP or stdio protocols. ```sh # One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdio ``` -------------------------------- ### HTML Sanitization Example Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-utils/references/security.md Sanitizes user-provided HTML content, allowing only specified tags and attributes. Ensure `sanitize-html` is installed as a peer dependency. ```typescript // HTML sanitization const clean = await sanitization.sanitizeHtml(userHtml, { allowedTags: ['p', 'b', 'i', 'a'], allowedAttributes: { a: ['href'] }, }); ``` -------------------------------- ### Tool Description Examples Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/design-mcp-server/SKILL.md Examples of effective tool descriptions that include operational guidance and prerequisites for LLM selection. ```typescript // Good — describes a prerequisite the LLM must know description: 'Set the session working directory for all git operations. This allows subsequent git commands to omit the path parameter.' ``` ```typescript // Good — self-explanatory, no workflow hints needed description: 'Show the working tree status including staged, unstaged, and untracked files.' ``` ```typescript // Good — warns about constraints description: 'Fetches trial results data for completed studies. Only available for studies where hasResults is true.' ``` -------------------------------- ### Example TypeScript Code Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/report-issue-local/SKILL.md This is an example of a TypeScript code snippet that might be included within the body of a feature request to illustrate proposed behavior. ```typescript // Example: new input field or output shape ``` -------------------------------- ### Defining and Using the MirrorService Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-mirror/SKILL.md This snippet demonstrates how to define a mirror using `defineMirror` and `sqliteMirrorStore`, configure its schema, and implement a server-specific ingester. It also shows how to run the sync process in 'init' and 'refresh' modes, query the mirror, and retrieve its status. ```typescript import { defineMirror, sqliteMirrorStore } from '@cyanheads/mcp-ts-core/mirror'; const papers = defineMirror({ name: 'arxiv-papers', store: sqliteMirrorStore({ path: config.mirrorPath, primaryKey: 'id', columns: { id: 'TEXT', title: 'TEXT', authors: 'TEXT', abstract: 'TEXT', updated: 'TEXT' }, fts: ['title', 'authors', 'abstract'], // opt-in FTS5 external-content index indexes: [{ columns: ['updated'] }], }), // The ingester — the one part that is always server-specific. async *sync({ mode, cursor, checkpoint, signal }) { for await (const page of harvestPages({ resumeFrom: cursor, since: checkpoint, signal })) { yield { records: page.rows, // objects keyed by declared column tombstones: page.deletedIds, // primary-key values to delete cursor: page.token, // volatile resume position (see below) checkpoint: page.maxStamp, // durable high-water mark (see below) }; } }, }); await papers.runSync({ mode: 'init', signal: AbortSignal.timeout(3_600_000) }); // full; resumes on interrupt await papers.runSync({ mode: 'refresh' }); // incremental const { rows, total } = await papers.query({ match: 'transformers', limit: 10, offset: 0 }); const status = await papers.status(); // { status, ready, checkpoint, total, ... } ``` -------------------------------- ### Service Test Setup and Operation Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/add-test/SKILL.md Sets up the service with a mock configuration and storage, then tests its core operation. Ensure mockConfig fields match the server config schema. ```typescript /** * @fileoverview Tests for {{SERVICE_NAME}} service. * @module tests/services/{{domain}}/{{domain}}-service.test */ import { beforeEach, describe, expect, it } from 'vitest'; import { createMockContext } from '@cyanheads/mcp-ts-core/testing'; import { StorageService } from '@cyanheads/mcp-ts-core/storage'; import { get{{ServiceClass}}, init{{ServiceClass}} } from '@/services/{{domain}}/{{domain}}-service.js'; // Derive the minimal mock config from src/config/server-config.ts — read // the server's Zod schema to see which fields init{{ServiceClass}}() needs. const mockConfig = { /* fields from server config schema */ } as AppConfig; describe('{{ServiceClass}}', () => { beforeEach(async () => { const mockStorage = await StorageService.create({ type: 'in-memory' }); init{{ServiceClass}}(mockConfig, mockStorage); }); it('performs the expected operation', async () => { const ctx = createMockContext({ tenantId: 'test-tenant' }); const service = get{{ServiceClass}}(); const result = await service.doWork('input', ctx); expect(result).toBeDefined(); }); }); ``` -------------------------------- ### Setup Canvas Access in createApp Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-canvas/SKILL.md Wires the canvas service into the application setup by calling setCanvas with the core canvas instance during application initialization. ```typescript // src/index.ts — wire in setup() import { setCanvas } from './services/canvas-accessor.js'; await createApp({ setup(core) { setCanvas(core.canvas); }, }); ``` -------------------------------- ### Per-Tool Subsection Example: acme_search_projects Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/readme.md Details the capabilities of the `acme_search_projects` tool, including search parameters, pagination, and sorting. Links to detailed examples are provided. ```markdown ### `acme_search_projects` Search for projects using free-text queries and filters. - Full-text search plus typed status/phase filters - Geographic proximity filtering by coordinates and distance - Pagination (up to 100 per page) and sorting - Field selection to limit response size [View detailed examples](./examples/acme_search_projects.md) ``` -------------------------------- ### Tag Annotation Format Example Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/orchestrations/workflows/field-test-fix.md This is an example of the structured markdown format used for tag annotations, detailing bug fixes across multiple tools and including test counts. ```markdown Field-test bug fixes across N tools Fixed: - : (#) - : (#) ; `bun run devcheck` clean. ``` -------------------------------- ### MCP Server Title Block Example Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/readme.md An example of a centered HTML title block for an MCP server, including the server name, a descriptive tagline, and counts for tools, resources, and prompts. ```html

@cyanheads/my-mcp-server

Search projects, manage tasks, track teams via MCP.STDIO or Streamable HTTP.

7 Tools • 2 Resources • 1 Prompt

[![Version](https://img.shields.io/badge/Version-1.0.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/my-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/my-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/my-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/my-mcp-server/releases/latest/download/my-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=my-mcp-server&config=) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?) [![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
``` -------------------------------- ### Build MCPB Bundle and Create GitHub Release Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/release-and-publish/SKILL.md First, build the MCPB bundle, then create the GitHub release. This ensures the bundle asset is available for attachment to the release. ```bash bun run bundle # produces dist/.mcpb (stable filename, no version) bun run release:github # attach + release in one step ``` -------------------------------- ### Start PubMed MCP Server with Streamable HTTP Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/README.md Start the PubMed MCP Server for Streamable HTTP communication. This command sets the transport type and HTTP port, and the server will listen on http://localhost:3010/mcp. ```sh MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http # Server listens at http://localhost:3010/mcp ``` -------------------------------- ### Create App with Landing Page Configuration Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/changelog/2.5.x/2.5.0.md Configure the HTTP landing page for the MCP server. This includes setting a tagline, repository root, footer links, and environment examples for CLI connection. ```typescript createApp({ landing: { tagline: "PubMed MCP Server", repoRoot: "https://github.com/cyanheads/pubmed-mcp-server", footerLinks: [ { label: "PubMed", url: "https://pubmed.ncbi.nlm.nih.gov/" }, { label: "E-utilities", url: "https://www.ncbi.nlm.nih.gov/books/NBK25497/" }, { label: "NCBI API Key Signup", url: "https://account.ncbi.nlm.nih.gov/key/" }, { label: "MeSH Browser", url: "https://meshb.nlm.nih.gov/" } ], envExample: { NCBI_API_KEY: "YOUR_API_KEY", NCBI_ADMIN_EMAIL: "YOUR_EMAIL@EXAMPLE.COM" } } }) ``` -------------------------------- ### Read Path Readiness Check Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-mirror/SKILL.md Ensures the read path is gated on `mirror.ready()` and provides a live fallback when the mirror is not ready. ```javascript Read path gated on await mirror.ready() with a live fallback when not ready ``` -------------------------------- ### createMockContext Usage and Options Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-testing/SKILL.md Demonstrates the usage of `createMockContext` with different options to configure a mock context for testing. It shows how to enable various features like state management, elicitation, error handling, and more by passing specific options. ```APIDOC ## `createMockContext` options This function allows for the creation of mock contexts with various configurations to simulate different testing scenarios. ### Method `createMockContext(options?: MockContextOptions)` ### Parameters #### Request Body (MockContextOptions) - **auth** (AuthContext) - Optional - Sets `ctx.auth` for scope-checking tests. - **elicit** ((message: string, schema: z.ZodObject) => Promise) - Optional - Assigns a function to `ctx.elicit` for testing elicitation calls. - **errors** (readonly ErrorContract[]) - Optional - Attaches a typed `ctx.fail` against the contract. Pass `myTool.errors` directly. - **notifyPromptListChanged** (() => void) - Optional - Assigns `ctx.notifyPromptListChanged` for prompt-list change notification tests. - **notifyResourceListChanged** (() => void) - Optional - Assigns `ctx.notifyResourceListChanged` for resource notification tests. - **notifyResourceUpdated** ((uri: string) => void) - Optional - Assigns `ctx.notifyResourceUpdated` for resource update notification tests. - **notifyToolListChanged** (() => void) - Optional - Assigns `ctx.notifyToolListChanged` for tool-list change notification tests. - **progress** (boolean) - Optional - Populates `ctx.progress` with real state-tracking implementation. - **sessionId** (string) - Optional - Sets `ctx.sessionId` for handlers that branch on session ID. - **requestId** (string) - Optional - Overrides `ctx.requestId` (default: `'test-request-id'`). - **signal** (AbortSignal) - Optional - Overrides `ctx.signal` — useful for cancellation testing. - **tenantId** (string) - Optional - Sets `ctx.tenantId` and enables `ctx.state` operations with in-memory storage. - **uri** (URL) - Optional - Sets `ctx.uri` for resource handler testing. ### Default Behavior - Minimal context: `ctx.state` operations throw without `tenantId`; `ctx.elicit`/`ctx.progress` are `undefined`. ### Mock Progress Details When `progress: true`, `ctx.progress` is a real state-tracking object. Its internal state can be inspected via properties like `_total`, `_completed`, and `_messages` after casting `ctx.progress`. ### Mock Logger Details `ctx.log` captures all log calls for inspection. Import `MockContextLogger` from `@cyanheads/mcp-ts-core/testing` and cast `ctx.log` to access the `.calls` array. ### Request Example ```ts import { createMockContext } from '@cyanheads/mcp-ts-core/testing'; // Minimal context createMockContext(); // Context with tenantId createMockContext({ tenantId: 'test-tenant' }); // Context with errors attached createMockContext({ errors: myTool.errors }); // Context with elicitation enabled createMockContext({ elicit: vi.fn().mockResolvedValue(...) }); // Context with progress tracking enabled createMockContext({ progress: true }); // Context with custom request ID createMockContext({ requestId: 'my-id' }); // Context with resource update notifier createMockContext({ notifyResourceUpdated: (_uri) => {} }); // Context with custom AbortSignal createMockContext({ signal: controller.signal }); // Context with authentication details createMockContext({ auth: { clientId: 'test', scopes: [], sub: 'test-user' } }); // Context for resource handler testing createMockContext({ uri: new URL('myscheme://item/123') }); ``` ### Response Example (No specific response structure is defined for `createMockContext` itself, as it returns a mock context object.) ``` -------------------------------- ### Create Mock Context with Various Options Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-testing/SKILL.md Demonstrates the different options available when creating a mock context. Each option enables specific functionalities or configurations for testing purposes. ```typescript import { createMockContext } from '@cyanheads/mcp-ts-core/testing'; createMockContext() // minimal — ctx.state operations throw without tenantId createMockContext({ tenantId: 'test-tenant' }) // enables ctx.state (tenant-scoped in-memory storage) createMockContext({ errors: myTool.errors }) // attaches typed ctx.fail keyed by the contract reasons createMockContext({ elicit: vi.fn().mockResolvedValue(...) }) // with elicitation createMockContext({ progress: true }) // with task progress (ctx.progress populated) createMockContext({ requestId: 'my-id' }) // override request ID (default: 'test-request-id') createMockContext({ notifyResourceListChanged: () => {} }) // with resource-list change notifier createMockContext({ notifyResourceUpdated: (_uri) => {} }) // with resource update notifier createMockContext({ signal: controller.signal }) // custom AbortSignal createMockContext({ auth: { clientId: 'test', scopes: [], sub: 'test-user' } }) // with auth context createMockContext({ uri: new URL('myscheme://item/123') }) // for resource handler testing ``` -------------------------------- ### Example MCP Server Description Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/package-meta.md A concise, action-first description for an MCP server. It should lead with the server's primary actions and end with the transport mechanisms used. ```json "description": "Search projects, manage tasks, track teams via MCP. STDIO or Streamable HTTP." ``` -------------------------------- ### Rebuild and Verify Project Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/maintenance/SKILL.md Run these commands to clean, build, and check the project for API surface and type-alignment issues. `devcheck` includes dependency audits. ```bash bun run rebuild bun run devcheck bun run test ``` -------------------------------- ### Example Bugs Field Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/package-meta.md Specifies the URL for reporting issues, typically linking to the GitHub issues page. ```json "bugs": { "url": "https://github.com/org/repo/issues" } ``` -------------------------------- ### Embed Image in PDF Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-utils/references/parsing.md Asynchronously embed an image into a PDF document. Requires 'pdf-lib' and 'unpdf' to be installed. ```typescript const image = await pdfParser.embedImage(doc, { data: imageBytes }); ``` -------------------------------- ### Public Hosted Instance Configuration Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/polish-docs-meta/references/readme.md Configure your MCP client to connect to a public hosted instance via Streamable HTTP. No local installation is needed. ```json { "mcpServers": { "my-server": { "type": "streamable-http", "url": "https://my-server.example.com/mcp" } } } ``` -------------------------------- ### Batch operations with ctx.state Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/api-context/SKILL.md Perform batch get, set, and delete operations on tenant-scoped storage for efficiency. ```typescript const values = await ctx.state.getMany(['item:1', 'item:2']); ``` ```typescript await ctx.state.setMany(new Map([['a', 1], ['b', 2]])); ``` ```typescript const deleted = await ctx.state.deleteMany(['item:1', 'item:2']); ``` -------------------------------- ### Run Verification Gate Source: https://github.com/cyanheads/pubmed-mcp-server/blob/main/skills/release-and-publish/SKILL.md Execute tests to ensure the package is ready for release. Use 'test:all' if available, otherwise fall back to 'test'. Halts on any non-zero exit code. ```bash bun run devcheck bun run rebuild bun run test:all # or `bun run test` if no test:all ```