markdown2pdf-oss-mcp
v1.0.1
Published
MCP server for converting markdown to PDF and uploading to Alibaba Cloud OSS
Readme
Markdown to PDF OSS MCP Service
This is a Model Context Protocol (MCP) service that converts Markdown content to PDF files and uploads them to Alibaba Cloud OSS (Object Storage Service).
Features
- Convert Markdown content to PDF files
- Automatically upload generated PDFs to Alibaba Cloud OSS
- Customizable storage paths in OSS
- Supports standard Markdown formatting
Installation
You can install this MCP service globally via npm:
npm install -g markdown2pdf-oss-mcpUsage with MCP Clients
This MCP service can be used with any MCP-compatible client, such as Claude 3 Opus in Anthropic's Claude web client, or with the Aliyun Bailian platform.
Example Configuration
To configure this MCP service in an MCP client, use the following example:
{
"mcpServers": {
"markdown2pdf-oss": {
"disabled": false,
"timeout": 300000,
"command": "markdown2pdf-oss-mcp",
"transportType": "stdio"
}
}
}Input Parameters
The service accepts the following parameters:
access_key_id(string, required): OSS access key IDaccess_key_secret(string, required): OSS access key secretbucket_name(string, required): OSS bucket nameendpoint(string, required): OSS endpointcontent(string, required): Markdown format text contenttitle(string, required): Document title, will be used as the base filenamestorage_path(string, optional): Storage path in the bucket (defaults to root directory)
Output Format
The service returns a JSON object with the following properties:
success(boolean): Whether the operation was successfulfile_url(string): URL of the generated PDF file in OSSfile_path(string): Full path and filename in OSSerror(string): Error message (if the operation failed)
Example Use in Claude
Please convert this markdown to PDF and upload it to my OSS:
access_key_id: LTAI5xxxxxxxxxxx
access_key_secret: D9xxxxxxxxxxxxxxxxxxx
bucket_name: my-document-bucket
endpoint: oss-cn-beijing.aliyuncs.com
title: Project Documentation
storage_path: docs/project-a/
# Project Documentation
## Introduction
This is a sample project documentation.
## Features
- Feature 1
- Feature 2
- Feature 3
## Conclusion
Thank you for reading!Development
If you'd like to contribute to the development of this MCP service:
- Clone the repository
- Install dependencies:
npm install - Build the project:
npm run build - Test the service:
npm start
License
MIT
