内容
# junipr-mcp
MCP 服务器,用于 [Junipr](https://junipr.io) API。使 AI 助手能够访问 75+ 网络智能工具 — 截图、PDF、元数据提取、爬虫、验证器等。
## 工具列表
| 工具 | 描述 |
|------|-------------|
| `screenshot` | 捕获任意网页的截图(PNG、JPEG 或 WebP) |
| `pdf` | 从 URL 或原始 HTML 生成 PDF |
| `metadata` | 提取标题、描述、Open Graph、Twitter Cards、JSON-LD 等 |
| `run_tool` | 通过 slug 运行任意 75+ Junipr 工具(爬虫、验证器、转换器、分析器) |
## 设置
### 1. 获取 API 密钥
在 [junipr.io/login](https://junipr.io/login) 注册以获取免费 API 密钥(500 积分/月)。
### 2. 配置您的 MCP 客户端
#### Claude Desktop
将以下内容添加到您的 Claude Desktop 配置文件中:
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"junipr": {
"command": "npx",
"args": ["-y", "junipr-mcp"],
"env": {
"JUNIPR_API_KEY": "your-api-key-here"
}
}
}
}
```
#### Claude Code (CLI)
```bash
claude mcp add junipr -- npx -y junipr-mcp
```
然后设置环境变量:
```bash
export JUNIPR_API_KEY=your-api-key-here
```
#### Cursor
将以下内容添加到您的 Cursor MCP 设置(`.cursor/mcp.json`):
```json
{
"mcpServers": {
"junipr": {
"command": "npx",
"args": ["-y", "junipr-mcp"],
"env": {
"JUNIPR_API_KEY": "your-api-key-here"
}
}
}
}
```
#### VS Code
将以下内容添加到您的 VS Code 设置(`.vscode/mcp.json`):
```json
{
"servers": {
"junipr": {
"command": "npx",
"args": ["-y", "junipr-mcp"],
"env": {
"JUNIPR_API_KEY": "your-api-key-here"
}
}
}
}
```
#### Windsurf
将以下内容添加到您的 Windsurf MCP 配置(`~/.codeium/windsurf/mcp_config.json`):
```json
{
"mcpServers": {
"junipr": {
"command": "npx",
"args": ["-y", "junipr-mcp"],
"env": {
"JUNIPR_API_KEY": "your-api-key-here"
}
}
}
}
```
## 工具参考
### screenshot
捕获任意网页的截图。
| 参数 | 类型 | 默认值 | 描述 |
|-----------|------|---------|-------------|
| `url` | 字符串 | (必填) | 要捕获的 URL |
| `format` | `png` | `jpeg` | `webp` | `png` | 图片格式 |
| `width` | 数字 | `1280` | 视口宽度(320-3840) |
| `height` | 数字 | `720` | 视口高度(200-2160) |
| `fullPage` | 布尔值 | `false` | 捕获完整的可滚动页面 |
| `deviceType` | `desktop` | `mobile` | `tablet` | `desktop` | 要模拟的设备 |
| `blockCookieBanners` | 布尔值 | `true` | 隐藏 cookie 横幅 |
### pdf
从 URL 或 HTML 生成 PDF。
| 参数 | 类型 | 默认值 | 描述 |
|-----------|------|---------|-------------|
| `url` | 字符串 | — | 要转换的 URL(提供 `url` 或 `html`) |
| `html` | 字符串 | — | 要转换的原始 HTML(提供 `url` 或 `html`) |
| `format` | `A4` | `Letter` | `Legal` | `Tabloid` | `A3` | `A5` | `A4` | 纸张格式 |
| `landscape` | 布尔值 | `false` | 横向 |
| `printBackground` | 布尔值 | `true` | 包括背景 |
| `margin` | 对象 | `1cm` 每个 | `{ top, right, bottom, left }` 以 CSS 单位 |
| `headerTemplate` | 字符串 | — | 页眉 HTML 模板 |
| `footerTemplate` | 字符串 | — | 页脚 HTML 模板 |
| `displayHeaderFooter` | 布尔值 | `false` | 显示页眉/页脚 |
### metadata
从任意网页提取元数据。
| 参数 | 类型 | 默认值 | 描述 |
|-----------|------|---------|-------------|
| `url` | 字符串 | (必填) | 要提取元数据的 URL |
返回标题、描述、Open Graph 标签、Twitter Cards、JSON-LD 结构化数据、favicon、规范 URL、语言等。
## 许可证
MIT