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

jackett-mcp-server

v1.0.0

Published

MCP server for Jackett service integration

Readme

Jackett MCP Server

一个用于 Jackett 集成的 Model Context Protocol (MCP) 服务器。允许通过 MCP 协议搜索各种种子索引器。

功能

  • 🔍 搜索种子资源: 通过 Jackett 搜索多个索引器
  • 📊 获取搜索结果: 返回包含磁力链、种子数、文件大小等信息
  • 🧪 测试索引器: 验证配置的索引器是否正常工作
  • 📋 列出索引器: 查看所有已配置的索引器

安装

前置要求

  • Node.js >= 18.0.0
  • Jackett 服务已安装并运行
  • Jackett API Key

安装步骤

# 克隆或下载此项目
cd JackettMcp

# 安装依赖
npm install

# 添加可执行权限
chmod +x src/index.js

配置

环境变量

| 变量名 | 必需 | 默认值 | 说明 | |--------|------|--------|------| | JACKETT_BASE_URL | 否 | http://localhost:9117 | Jackett 服务地址 | | JACKETT_API_KEY | 是 | - | Jackett API 密钥 |

获取 API Key

  1. 打开 Jackett Web UI (默认: http://localhost:9117)
  2. 点击右上角的设置图标 ⚙️
  3. 在 "API Key" 部分点击 "Copy" 按钮
  4. 将 API Key 设置为环境变量

使用方法

推荐方式:使用 npx (无需本地安装)

# 全局安装(推荐)
npm install -g /path/to/JackettMcp

# 或者直接使用 npx
npm install -g /path/to/JackettMcp

然后在 Claude Desktop 中配置(推荐):

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "jackett": {
      "command": "jackett-mcp-server",
      "env": {
        "JACKETT_BASE_URL": "http://localhost:9117",
        "JACKETT_API_KEY": "your-api-key-here"
      }
    }
  }
}

方式 1: 本地安装后运行

# 安装依赖
cd /path/to/JackettMcp
npm install

# 启动服务器
npm start

在 Claude Desktop 中配置:

{
  "mcpServers": {
    "jackett": {
      "command": "node",
      "args": ["/path/to/JackettMcp/src/index.js"],
      "env": {
        "JACKETT_BASE_URL": "http://localhost:9117",
        "JACKETT_API_KEY": "your-api-key-here"
      }
    }
  }
}

方式 2: 使用 npx (无需安装)

# 直接运行(自动下载并运行)
npx jackett-mcp-server

在 Claude Desktop 中配置:

{
  "mcpServers": {
    "jackett": {
      "command": "npx",
      "args": ["jackett-mcp-server"],
      "env": {
        "JACKETT_BASE_URL": "http://localhost:9117",
        "JACKETT_API_KEY": "your-api-key-here"
      }
    }
  }
}

注意: npx 方式首次运行时会自动下载包,需要网络连接。

环境变量配置

无论使用哪种方式,都需要设置以下环境变量:

# Linux/macOS
export JACKETT_BASE_URL="http://localhost:9117"
export JACKETT_API_KEY="your-api-key-here"

# Windows (PowerShell)
$env:JACKETT_BASE_URL="http://localhost:9117"
$env:JACKETT_API_KEY="your-api-key-here"

# Windows (CMD)
set JACKETT_BASE_URL=http://localhost:9117
set JACKETT_API_KEY=your-api-key-here

可用工具

1. jackett_search

搜索种子资源。

参数:

  • query (string, 必需): 搜索关键词
  • category (number, 可选): 分类 ID
    • 2000: Movies
    • 5000: TV Shows
    • 1000: Console
    • 3000: Audio
    • 4000: PC
  • limit (number, 可选): 返回结果数量,默认 20

示例:

{
  "query": "Inception",
  "category": 2000,
  "limit": 10
}

响应:

{
  "success": true,
  "query": "Inception",
  "totalResults": 15,
  "results": [
    {
      "Title": "Inception.2010.1080p.BluRay.x264",
      "Size": 8589934592,
      "Seeders": 150,
      "Peers": 20,
      "Tracker": " indexer-name",
      "MagnetUri": "magnet:?xt=urn:btih:...",
      "Link": "http://..."
    }
  ]
}

2. jackett_test_indexers

测试所有配置的索引器是否正常工作。

参数:

3. jackett_list_indexers

列出所有已配置的索引器及其能力。

参数:

响应:

{
  "success": true,
  "totalCount": 25,
  "indexers": [
    {
      "name": "indexer-name",
      "id": "indexer-id",
      "type": "public",
      "capabilities": ["search", "movie-search"],
      "configured": true
    }
  ]
}

开发

项目结构

JackettMcp/
├── src/
│   └── index.js          # MCP 服务器实现
├── tests/
│   ├── test-server.test.js    # MCP 服务器测试
│   └── test-api.test.js       # API 集成测试
├── package.json
└── README.md

运行测试

# 测试 MCP 服务器
npm run test:server

# 测试 API 集成
npm run test:api

# 运行所有测试
npm run test:all

开发模式

# 使用 --watch 模式,代码修改后自动重启
npm run dev

示例用法

搜索电影

# 在 Claude 中询问
"搜索电影 'Interstellar',只看 1080p 版本"

Claude 会调用 jackett_search 工具,然后你可以:

  • 查看搜索结果
  • 选择合适的资源
  • 查看种子数和文件大小
  • 获取磁力链接

搜索电视剧

# 在 Claude 中询问
"搜索 'Breaking Bad' 第一季"

检查索引器状态

# 在 Claude 中询问
"测试所有索引器是否正常工作"

常见问题

Q: 搜索没有结果?

A: 可能的原因:

  1. Jackett 中没有配置索引器
  2. 索引器配置不正确
  3. 搜索关键词不合适
  4. API Key 错误

运行 jackett_test_indexers 检查索引器状态。

Q: 如何添加更多索引器?

A:

  1. 打开 Jackett Web UI
  2. 点击 "Show All" → "Add indexer"
  3. 选择要添加的索引器
  4. 按照提示配置
  5. 测试索引器是否可用

Q: 返回的结果没有磁力链?

A: 某些索引器只提供下载链接,不提供磁力链。这是索引器的限制,不是 MCP 服务的问题。

相关资源

许可证

MIT

作者

MCP Community

更新日志

v1.0.0 (2025-01-XX)

  • 初始版本
  • 支持搜索种子
  • 支持测试和列出索引器
  • 完整的错误处理