@sylphlab/tools-pdf-mcp
Version:
MCP server providing PDF tools (text extraction, etc.)
1 lines • 3.54 kB
Source Map (JSON)
{"version":3,"sources":["../src/index.ts","../package.json"],"sourcesContent":["#!/usr/bin/env node\nimport process from 'node:process';\n// Remove direct SDK imports\n// import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport type { ToolDefinition, ToolExecuteOptions } from '@sylphlab/tools-core'; // Use ToolDefinition\n// Import the server start function\nimport { startMcpServer } from '@sylphlab/tools-adaptor-mcp';\n\n// Import the tool object from the core library\nimport { getTextTool } from '@sylphlab/tools-pdf';\nimport { description, name, version } from '../package.json'; // Import metadata\n\n// --- Server Setup ---\n\n// biome-ignore lint/suspicious/noExplicitAny: Necessary for array of tools with diverse signatures\nconst tools: ToolDefinition<any>[] = [getTextTool]; // Use ToolDefinition\n\n// --- Server Start ---\n// Directly call startMcpServer at the top level\n(async () => {\n const toolOptions: ToolExecuteOptions = {\n workspaceRoot: process.cwd(),\n // Add other options if needed, e.g., allowOutsideWorkspace: false\n };\n try {\n await startMcpServer(\n {\n name, // Use name from package.json\n version, // Use version from package.json\n description, // Use description from package.json\n tools,\n },\n toolOptions, // Pass the created options object\n );\n } catch (_error) {\n // Error handling is inside startMcpServer\n process.exit(1);\n }\n})();\n\n// Graceful shutdown\nprocess.on('SIGINT', () => {\n process.exit(0);\n});\nprocess.on('SIGTERM', () => {\n process.exit(0);\n});\n","{\n \"name\": \"@sylphlab/tools-pdf-mcp\",\n \"version\": \"0.5.1\",\n \"description\": \"MCP server providing PDF tools (text extraction, etc.)\",\n \"type\": \"module\",\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n }\n },\n \"files\": [\n \"dist\"\n ],\n \"bin\": {\n \"mcp-pdf\": \"./dist/index.js\"\n },\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup src/index.ts --format cjs,esm --dts --watch\",\n \"test\": \"vitest run\",\n \"lint\": \"biome lint\"\n },\n \"keywords\": [\n \"mcp\",\n \"tool\",\n \"pdf\",\n \"text\"\n ],\n \"author\": \"\",\n \"license\": \"ISC\",\n \"devDependencies\": {\n \"@types/node\": \"^22.14.1\",\n \"tsup\": \"^8.0.2\",\n \"typescript\": \"^5.4.5\",\n \"vitest\": \"^3.1.2\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.10.1\",\n \"@sylphlab/tools-adaptor-mcp\": \"workspace:*\",\n \"@sylphlab/tools-core\": \"workspace:*\",\n \"@sylphlab/tools-pdf\": \"workspace:*\",\n \"zod\": \"^3.23.8\"\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,0BAAoB;AAMpB,+BAA+B;AAG/B,uBAA4B;;;ACT1B,WAAQ;AACR,cAAW;AACX,kBAAe;;;ADajB,IAAM,QAA+B,CAAC,4BAAW;AAAA,CAIhD,YAAY;AACX,QAAM,cAAkC;AAAA,IACtC,eAAe,oBAAAA,QAAQ,IAAI;AAAA;AAAA,EAE7B;AACA,MAAI;AACF,cAAM;AAAA,MACJ;AAAA,QACE;AAAA;AAAA,QACA;AAAA;AAAA,QACA;AAAA;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA;AAAA,IACF;AAAA,EACF,SAAS,QAAQ;AAEf,wBAAAA,QAAQ,KAAK,CAAC;AAAA,EAChB;AACF,GAAG;AAGH,oBAAAA,QAAQ,GAAG,UAAU,MAAM;AACzB,sBAAAA,QAAQ,KAAK,CAAC;AAChB,CAAC;AACD,oBAAAA,QAAQ,GAAG,WAAW,MAAM;AAC1B,sBAAAA,QAAQ,KAAK,CAAC;AAChB,CAAC;","names":["process"]}