npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cf-mcp

v1.0.2

Published

Confluence MCP server with attachment download functionality

Readme

Confluence MCP Server

Confluence MCP Server 是一个增强版的 Confluence MCP 工具,提供文档附件下载功能。

功能特性

  1. 获取页面内容 - 读取 Confluence 页面的完整内容,包括所有附件元数据
  2. 列出页面附件 - 获取页面内所有附件的详细信息(ID、文件名、大小、下载 URL 等)
  3. 下载单个附件 - 将指定附件下载到本地文件系统
  4. 批量下载附件 - 一键下载页面内所有附件到指定目录

安装

npm install

配置

  1. 复制 .env.example.env
cp .env.example .env
  1. 编辑 .env 文件,填入你的 Confluence 配置:
CONFLUENCE_BASE_URL=https://your-domain.atlassian.net/wiki
[email protected]
CONFLUENCE_API_TOKEN=your-api-token

获取 API Token

  1. 访问 Atlassian API Tokens
  2. 创建新的 API Token
  3. 将 Token 复制到 .env 文件中的 CONFLUENCE_API_TOKEN

使用说明

可用工具

1. confluence_get_page

获取 Confluence 页面内容和附件信息。

参数:

  • page_id (必需): Confluence 页面 ID

示例:

{
  "page_id": "123456789"
}

2. confluence_get_page_attachments

列出页面的所有附件。

参数:

  • page_id (必需): Confluence 页面 ID
  • start (可选): 分页起始索引,默认 0
  • limit (可选): 返回结果数量,默认 50,最大 100

示例:

{
  "page_id": "123456789",
  "limit": 100
}

3. confluence_download_attachment

下载单个附件到本地。

参数:

  • attachment_id (必需): 附件 ID
  • save_path (必需): 本地保存路径

示例:

{
  "attachment_id": "att123456789",
  "save_path": "/Users/you/Documents/report.pdf"
}

4. confluence_download_all_page_attachments

下载页面的所有附件。

参数:

  • page_id (必需): Confluence 页面 ID
  • save_directory (可选): 保存目录,默认 ./downloads

示例:

{
  "page_id": "123456789",
  "save_directory": "/Users/you/Documents/attachments"
}

工作流程示例

完整的附件下载流程

  1. 首先获取页面内容,查看有哪些附件:

    confluence_get_page(page_id="123456789")
  2. 或者直接列出所有附件:

    confluence_get_page_attachments(page_id="123456789")
  3. 批量下载所有附件:

    confluence_download_all_page_attachments(page_id="123456789", save_directory="./my-attachments")
  4. 或者下载单个附件:

    confluence_download_attachment(attachment_id="att123456789", save_path="./document.pdf")

项目结构

.
├── package.json              # 项目依赖配置
├── .env.example             # 环境变量示例
├── .gitignore               # Git 忽略文件
├── README.md                # 项目说明文档
├── src/
│   ├── index.js             # MCP 服务器主文件
│   └── confluence-client.js # Confluence API 客户端
├── tools/                   # MCP 工具描述文件
│   ├── confluence_get_page.json
│   ├── confluence_get_page_attachments.json
│   ├── confluence_download_attachment.json
│   └── confluence_download_all_page_attachments.json
└── SERVER_METADATA.json     # 服务器元数据

技术栈

  • Node.js
  • @modelcontextprotocol/sdk (MCP SDK)
  • Axios (HTTP 客户端)
  • dotenv (环境变量管理)

许可证

MIT