Skip to main content
Glama
PS4 PKG MCP Server

PS4 PKG MCP Server

by Ampiso4
README.md
<div align="center">

# šŸŽ® PS4 PKG MCP Server

**A Model Context Protocol server for browsing and downloading PS4 PKG files**

[![npm version](https://badge.fury.io/js/ps4-pkg-mcp-server.svg)](https://www.npmjs.com/package/ps4-pkg-mcp-server)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Node.js Version](https://img.shields.io/node/v/ps4-pkg-mcp-server.svg)](https://nodejs.org)

</div>

---

## ✨ Features

- šŸ” **Search** through the complete catalog of PS4 games
- šŸ“‹ **Browse** games with pagination support (120+ pages)
- šŸ“ **Get Details** including descriptions, images, firmware requirements
- šŸ”— **Extract Download Links** from multiple file hosts (MediaFire, AkiraBox, etc.)
- šŸŽÆ **Resolve Direct URLs** for automated downloads (when available)
- šŸ¤– **MCP Compatible** - Works seamlessly with Claude Desktop

## šŸ“¦ Installation

```bash
# Clone the repository
git clone https://github.com/yourusername/ps4-pkg-mcp-server.git
cd ps4-pkg-mcp-server

# Install dependencies
npm install
```

## āš™ļø Configuration

Add this server to your Claude Desktop configuration file.

### Configuration File Location

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Linux**: `~/.config/Claude/claude_desktop_config.json`

### Configuration

```json
{
  "mcpServers": {
    "ps4-pkg": {
      "command": "node",
      "args": ["/absolute/path/to/ps4-pkg-mcp-server/index.js"]
    }
  }
}
```

**Windows Example:**
```json
{
  "mcpServers": {
    "ps4-pkg": {
      "command": "node",
      "args": ["C:\\Users\\YourUser\\ps4-pkg-mcp-server\\index.js"]
    }
  }
}
```

## šŸš€ Usage

### Available Tools

| Tool | Description |
|------|-------------|
| `list_games` | List PS4 games with pagination (1-120) |
| `search_games` | Search games by title |
| `get_game_details` | Get detailed game information |
| `get_download_links` | Get download links from download page |
| `get_final_download_url` | Resolve direct download URL |

### Examples

#### 1. List Games

```javascript
// List first page
list_games()

// List specific page
list_games({ page: 5 })
```

**Response:**
```json
{
  "games": [
    {
      "title": "Game Name",
      "link": "https://www.superpsx.com/game-slug/",
      "image": "https://www.superpsx.com/wp-content/uploads/...jpg",
      "excerpt": "Brief description..."
    }
  ],
  "currentPage": 1,
  "hasNextPage": true,
  "totalPages": 120
}
```

#### 2. Search Games

```javascript
search_games({ query: "resident evil" })
```

**Response:**
```json
{
  "query": "resident evil",
  "games": [...],
  "count": 12
}
```

#### 3. Get Game Details

```javascript
get_game_details({ game_url: "https://www.superpsx.com/game-slug/" })
```

**Response:**
```json
{
  "title": "Game Title",
  "link": "https://www.superpsx.com/...",
  "description": "Full description...",
  "images": ["url1", "url2"],
  "downloadPage": "https://www.superpsx.com/dll-xyz/",
  "info": {
    "Region": "EUR",
    "Version": "1.03",
    "Firmware": "5.05/6.72/7.02/7.55/9.00"
  }
}
```

#### 4. Get Download Links

```javascript
get_download_links({ download_page_url: "https://www.superpsx.com/dll-xyz/" })
```

**Response:**
```json
{
  "downloadPage": "https://www.superpsx.com/dll-xyz/",
  "downloads": [
    {
      "type": "Game",
      "source": "AKR",
      "url": "https://akirabox.com/XXX/file",
      "directUrl": null
    },
    {
      "type": "Update v1.11",
      "source": "MediaF",
      "url": "https://www.mediafire.com/file/...",
      "directUrl": null
    }
  ]
}
```

#### 5. Get Direct Download URL

```javascript
get_final_download_url({ file_host_url: "https://www.mediafire.com/file/..." })
```

**Success Response (MediaFire):**
```json
{
  "url": "https://downloadXXX.mediafire.com/.../file.pkg",
  "method": "download-text",
  "found": true,
  "requiresManualAccess": false
}
```

**Blocked Response (AkiraBox):**
```json
{
  "url": "https://akirabox.com/XXX/file",
  "method": "blocked",
  "found": false,
  "message": "File host has anti-bot protection. Please visit the URL manually in a browser.",
  "requiresManualAccess": true
}
```

### Complete Workflow

```javascript
// 1. Search for a game
const searchResults = await search_games({ query: "spider-man" })

// 2. Get details of the first result
const gameDetails = await get_game_details({
  game_url: searchResults.games[0].link
})

// 3. Get download links
const downloadLinks = await get_download_links({
  download_page_url: gameDetails.downloadPage
})

// 4. Try to get direct download URLs
for (const download of downloadLinks.downloads) {
  const result = await get_final_download_url({
    file_host_url: download.url
  })

  if (result.found && !result.requiresManualAccess) {
    console.log(`Direct download: ${result.url}`)
  } else {
    console.log(`Manual access required: ${result.url}`)
  }
}
```

## 🌐 File Host Support

| File Host | Direct URL Extraction | Status |
|-----------|----------------------|--------|
| MediaFire | āœ… Yes | Supported |
| AkiraBox | āŒ No | Anti-bot protection |
| KeepLinks | āš ļø Partial | Manual access may be required |

## šŸ› ļø Development

```bash
# Run in development mode
npm run dev

# Run normally
npm start

# Test the server
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_games","arguments":{"page":1}}}' | node index.js
```

## šŸ“ Project Structure

```
ps4-pkg-mcp-server/
ā”œā”€ā”€ index.js           # Main MCP server
ā”œā”€ā”€ package.json       # Dependencies and scripts
ā”œā”€ā”€ README.md          # This file
└── .gitignore        # Git ignore rules
```

## āš ļø Disclaimer

This tool is for educational and research purposes only. The developers:

- **Do not** host any copyrighted content
- **Do not** encourage piracy
- **Do not** violate any laws or terms of service

Users are responsible for ensuring they have the legal right to download and use any content. Please respect copyright laws and only download content you own or have permission to use.

## šŸ¤ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## šŸ“ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## šŸ™ Acknowledgments

- [Model Context Protocol](https://modelcontextprotocol.io/) - MCP SDK
- [superpsx.com](https://www.superpsx.com) - Game data source
- [cheerio](https://cheerio.js.org/) - HTML parsing

## šŸ“§ Support

If you encounter any issues or have questions:

1. Check existing [Issues](https://github.com/yourusername/ps4-pkg-mcp-server/issues)
2. Create a new issue with details
3. Join the discussion

---

<div align="center">

**Made with ā¤ļø for the PS4 homebrew community**

</div>