ai-content-extractor-mcp
v1.0.0
Published
MCP server for Cursor with download and document generation tools
Downloads
7
Maintainers
Readme
AI Content Extractor MCP Server
一个用于 Cursor 的 Model Context Protocol (MCP) 服务器,提供文件下载和文档生成功能。
功能特性
- 下载文件: 支持从 HTTP/HTTPS URL 下载文件到本地
- 生成文档: 支持生成 Markdown、HTML、TXT 格式的文档
安装
- 安装依赖:
npm install- 确保
src/index.js有执行权限:
chmod +x src/index.js配置 Cursor
方法 1: 使用项目本地配置
在项目根目录的 .cursor/mcp.json 文件中配置(已创建):
{
"mcpServers": {
"ai-content-extractor-mcp": {
"command": "node",
"args": ["/Users/ckc/Desktop/kunlun/ERP3.0/klerpmcp/src/index.js"],
"env": {}
}
}
}注意: 请将路径替换为你实际的项目路径。
方法 2: 使用全局配置
在 Cursor 的全局配置文件中添加:
- macOS:
~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json - Windows:
%APPDATA%\Cursor\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json - Linux:
~/.config/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
使用方法
配置完成后,重启 Cursor,你就可以在对话中使用以下工具:
1. 下载文件
请使用 download_file 工具下载 https://example.com/file.pdf 到当前目录2. 生成文档
请使用 generate_document 工具生成一个 Markdown 文档,文件名为 readme.md,内容为项目说明可用工具
download_file
下载文件到指定路径。
参数:
url(必需): 要下载的文件 URL(支持 HTTP/HTTPS)filepath(可选): 保存文件的本地路径,默认保存到当前目录
示例:
{
"url": "https://example.com/document.pdf",
"filepath": "./downloads/document.pdf"
}generate_document
生成文档文件。
参数:
content(必需): 文档内容filename(必需): 文件名(包含扩展名,如 .md, .html, .txt)outputDir(可选): 输出目录,默认为当前目录format(可选): 文档格式(markdown, html, txt),会根据文件名自动推断
示例:
{
"content": "# 项目说明\n\n这是一个示例项目。",
"filename": "README.md",
"outputDir": "./docs"
}开发
运行开发模式(自动重启):
npm run dev运行服务器:
npm start扩展功能
要添加更多工具,在 src/index.js 中:
- 在
ListToolsRequestSchema处理器中添加工具定义 - 在
CallToolRequestSchema处理器中添加对应的处理逻辑
许可证
MIT
