PG

PGYER MCP Server for App Uploads and Queries

Upload and query apps quickly using the PGYER MCP server for seamless app management, testing, and distribution.

Quick Install
npx -y @PGYER/pgyer-mcp-server

Overview

The PGYER MCP Server is a self-hosted implementation of the PGYER MCP (Model Context Protocol) API for managing mobile app packages. It provides HTTP endpoints compatible with the common PGYER upload and query workflows so teams can upload builds, query app metadata, and distribute builds within CI pipelines or internal networks without relying on the public PGYER service.

This server is useful for developers and release engineers who want a lightweight, private app distribution backend. It supports automated uploads from CI systems, simple metadata queries, and secure download links — enabling fast testing cycles and controlled distribution for iOS and Android builds.

Features

  • Compatible MCP-style endpoints for app upload and metadata queries
  • Multipart/form-data upload support for APK/IPA packages and associated metadata
  • API key / token-based authentication for secure access
  • Persistent storage of uploaded packages (local disk or configurable object storage)
  • Simple JSON responses for easy integration with scripts and CI tools
  • Docker-friendly deployment for local or server environments
  • Basic database support (SQLite/MySQL) for storing app records and user metadata
  • Utilities and examples for curl / CI integration

Installation / Configuration

Prerequisites: Docker and docker-compose are recommended for quick setup. You can also run the server directly if the repo contains language-specific instructions.

Clone the repository:

git clone https://github.com/PGYER/pgyer-mcp-server.git
cd pgyer-mcp-server

Example Docker Compose (typical):

version: '3.7'
services:
  pgyer-mcp:
    image: pgyer/pgyer-mcp-server:latest
    ports:
      - "8080:8080"
    environment:
      - MCP_API_KEY=your_api_key_here
      - STORAGE_PATH=/data/uploads
      - DB_DSN=sqlite:///data/pgyer.db
    volumes:
      - ./data:/data

Start with docker-compose:

docker-compose up -d

Configuration variables (examples)

VariablePurposeExample
MCP_API_KEYShared secret for API authenticationabc123secret
STORAGE_PATHLocal path where uploaded files are kept/data/uploads
DB_DSNDatabase connection stringsqlite:///data/pgyer.db
PORTListening port for the HTTP server8080

If running without Docker, set environment variables and run the binary or script provided by the repository as documented in the project README.

Available Resources

  • GitHub repository: https://github.com/PGYER/pgyer-mcp-server
  • API endpoints: the server exposes MCP-compatible endpoints (upload, app info, list, download)
  • Example curl snippets and Postman collection in the repo (check the examples/ directory)
  • Docker image and docker-compose configuration for quick deployment
  • Basic database migration scripts and a simple web UI (if included in the repo)

Quick Usage Examples

Upload an app package (multipart/form-data):

curl -v -X POST "http://localhost:8080/mcp/upload" \
  -H "Authorization: Bearer your_api_key_here" \
  -F "file=@/path/to/app.ipa" \
  -F "appName=MyApp" \
  -F "buildVersion=1.2.3"

Sample JSON response (successful upload):

{
  "code": 0,
  "message": "Upload successful",
  "data": {
    "appKey": "abcdef123456",
    "buildId": "bld_20260409_001",
    "downloadUrl": "http://localhost:8080/download/abcdef123456"
  }
}

Query metadata for an uploaded app:

curl -s "http://localhost:8080/mcp/app/info?appKey=abcdef123456" \
  -H "Authorization: Bearer your_api_key_here"

List uploaded apps (pagination supported):

curl "http://localhost:8080/mcp/apps?page=1&per_page=20" \
  -H "Authorization: Bearer your_api_key_here"

Use Cases

  • CI/CD integration: Automatically upload artifacts after a build step and retrieve the download URL for test distribution. Example: add a curl step in Jenkins/GitHub Actions to POST the built APK/IPA to the MCP server, then parse the returned downloadUrl for sharing.
  • Internal beta distribution: Host internal builds behind your network or VPN to keep distribution private and under team control without third-party hosting.
  • QA automation: Use the app list and info endpoints to allow automated test suites to select the latest build for a given channel or tag.
  • Release orchestration: Combine the server with a release pipeline that tags builds, stores metadata (release notes, version), and provides direct download links for stakeholders.

Tips for Developers

  • Store the MCP_API_KEY securely (CI secrets manager, environment manager) and rotate regularly.
  • For production use, configure object storage (S3-compatible) if large volumes of binaries are expected.
  • Use database backups and a file retention policy to manage storage growth.
  • Review the example client snippets in the repo to adapt uploads for multipart handling and custom metadata fields.

For full API documentation and advanced configuration options, consult the project README and configuration files in the repository.