@sylphlab/tools-pdf-mcp
Version:
MCP server providing PDF tools (text extraction, etc.)
67 lines (64 loc) • 2.41 kB
JavaScript
;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// src/index.ts
var import_node_process = __toESM(require("process"), 1);
var import_tools_adaptor_mcp = require("@sylphlab/tools-adaptor-mcp");
var import_tools_pdf = require("@sylphlab/tools-pdf");
// package.json
var name = "@sylphlab/tools-pdf-mcp";
var version = "0.5.1";
var description = "MCP server providing PDF tools (text extraction, etc.)";
// src/index.ts
var tools = [import_tools_pdf.getTextTool];
(async () => {
const toolOptions = {
workspaceRoot: import_node_process.default.cwd()
// Add other options if needed, e.g., allowOutsideWorkspace: false
};
try {
await (0, import_tools_adaptor_mcp.startMcpServer)(
{
name,
// Use name from package.json
version,
// Use version from package.json
description,
// Use description from package.json
tools
},
toolOptions
// Pass the created options object
);
} catch (_error) {
import_node_process.default.exit(1);
}
})();
import_node_process.default.on("SIGINT", () => {
import_node_process.default.exit(0);
});
import_node_process.default.on("SIGTERM", () => {
import_node_process.default.exit(0);
});
//# sourceMappingURL=index.cjs.map