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

dealhub-admin-mcp

v1.0.1

Published

Model Context Protocol (MCP) server for DealHub administrators. Manage versions through Claude and AI agents.

Readme

DealHub Admin MCP Server

Model Context Protocol (MCP) server for DealHub administrators. Manage versions through Claude and other AI agents using natural language.

Features

The DealHub Admin MCP provides 5 tools for version management:

🔍 Query Tools

  • list_versions - List all versions with optional status filter (ACTIVE, DRAFT, DEACTIVATED)
  • get_version - Get details of a specific version by ID or name
  • get_active_version - Get the currently active version

⚡ Action Tools

  • activate_version - Activate a version (async operation)
  • duplicate_version - Duplicate a version with a new name (async operation)

Prerequisites

  • Node.js 18.0.0 or higher
  • DealHub admin account with API token

Setup

1. Generate API Token

  1. Log in to DealHub as an admin
  2. Navigate to SettingsIntegrationsPartner API
  3. Click Generate Token
  4. Copy the clientId and clientSecret

2. Install Dependencies

cd mcp-servers/dealhub-admin
npm install

3. Configure Environment

Create a .env file:

cp .env.example .env

Edit .env and add your credentials:

DEALHUB_API_BASE_URL=https://app.dealhub.io
DEALHUB_API_TOKEN=your-client-id:your-client-secret

Important: Replace your-client-id and your-client-secret with actual values from step 1.

4. Build the Server

npm run build

5. Configure Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "dealhub-admin": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-servers/dealhub-admin/dist/index.js"],
      "env": {
        "DEALHUB_API_BASE_URL": "https://app.dealhub.io",
        "DEALHUB_API_TOKEN": "your-client-id:your-client-secret"
      }
    }
  }
}

Replace /absolute/path/to/ with the actual path to your project.

6. Restart Claude Desktop

Quit and restart Claude Desktop for changes to take effect.

Usage

Example Natural Language Commands

Once configured, you can use natural language with Claude:

List versions:

  • "Show me all versions"
  • "List all draft versions"
  • "What active versions do we have?"

Get version details:

  • "Get details for version ABC123"
  • "Show me the version named 'Q1 2026'"

Check active version:

  • "Which version is currently active?"
  • "What's the active version?"

Activate a version:

  • "Activate version ABC123"
  • "Make version XYZ the active version"

Duplicate a version:

  • "Duplicate version ABC123 as 'Q2 2026'"
  • "Copy version ABC123 and name it 'Test Version'"

Tool Details

list_versions

Parameters:

  • status (optional): Filter by status - "ACTIVE", "DRAFT", or "DEACTIVATED"

Example:

{
  "status": "DRAFT"
}

Response:

[
  {
    "id": "abc123-def456",
    "name": "Q1 2026",
    "status": "DRAFT",
    "created": "2025-01-15T10:30:00Z"
  }
]

get_version

Parameters:

  • versionId (string): Version GUID - OR -
  • versionName (string): Version name

Note: Provide either versionId OR versionName, not both.

Example:

{
  "versionId": "abc123-def456"
}

Response:

{
  "guid": "abc123-def456",
  "name": "Q1 2026",
  "status": "DRAFT",
  "createdDate": "2025-01-15T10:30:00Z",
  "comparedToVersionGuid": "xyz789"
}

get_active_version

Parameters: None

Response:

{
  "guid": "xyz789-uvw012",
  "name": "Production 2025",
  "status": "ACTIVE",
  "createdDate": "2024-12-01T08:00:00Z"
}

Or if no active version:

No active version found

activate_version

Parameters:

  • versionId (required): Version GUID to activate
  • content (optional): Email content for activation notification
  • subject (optional): Email subject for activation notification

Example:

{
  "versionId": "abc123-def456",
  "subject": "New version activated",
  "content": "Q1 2026 version is now active"
}

Response:

Version activation started. Request ID: req-789xyz
Status: PENDING

Note: This is an async operation. The version activation happens in the background. Use the request ID to track progress if needed.

duplicate_version

Parameters:

  • versionId (required): Source version GUID to duplicate
  • newName (required): Name for the duplicated version

Example:

{
  "versionId": "abc123-def456",
  "newName": "Q2 2026"
}

Response:

Version duplication started. Request ID: req-456abc
Status: PENDING

Note: This is an async operation. The version duplication happens in the background. Use the request ID to track progress if needed.

Development

Run in Development Mode

npm run dev

Rebuild After Changes

npm run build

Clean Build Artifacts

npm run clean

Architecture

The MCP server uses DealHub's existing OpenAPI endpoints with ByApiToken authentication:

  • Authentication: webserver/app/com/valooto/api/auth/ByApiToken.java
  • Version API: webserver/app/controllers/openApi/OpenAPIVersionController.java
  • API Routes: webserver/conf/api.routes

API Endpoints Used

| Tool | HTTP Method | Endpoint | Controller Method | |------|-------------|----------|-------------------| | list_versions | GET | /v1/versions | getVersions() (line 590) | | get_version | GET | /v1/version/id/:id | getVersionById() (line 669) | | get_version | GET | /v1/version/name/:name | getVersionByName() (line 633) | | get_active_version | GET | /v1/versions?status=ACTIVE | getVersions() (line 590) | | activate_version | POST | /v1/version/activate | activateVersion() (line 766) | | duplicate_version | POST | /v1/version/duplicate | duplicateVersion() (line 703) |

Troubleshooting

"Authentication failed"

  • Verify your token is correct in .env
  • Ensure token format is clientId:clientSecret
  • Check that your admin user has API access enabled

"No response from DealHub API"

  • Verify DEALHUB_API_BASE_URL is correct
  • Check your internet connection
  • Ensure DealHub is accessible

MCP server not appearing in Claude

  • Verify the path in claude_desktop_config.json is absolute (not relative)
  • Check that dist/index.js exists (run npm run build)
  • Restart Claude Desktop completely
  • Check Claude Desktop logs: ~/Library/Logs/Claude/

TypeScript compilation errors

npm run clean
npm install
npm run build

Security

  • Never commit .env files - They contain your API credentials
  • Token permissions - Tokens have the same permissions as the admin user who generated them
  • Rotate tokens - Regularly regenerate API tokens for security

Privacy Policy

Data Collection

The DealHub Admin MCP Server does not collect, store, or transmit any user data except as necessary to communicate with your DealHub instance.

Data Accessed

This MCP server accesses the following data from your DealHub instance:

  • Version metadata (names, IDs, statuses, creation dates)
  • Active version information
  • Version activation and duplication results

Data Storage

  • API Credentials: Your DealHub API token (clientId and clientSecret) is stored locally in a .env file on your machine. This file never leaves your computer.
  • No Remote Storage: This MCP server does not store any data on remote servers. All operations are performed locally on your machine.
  • No Analytics: No usage analytics, telemetry, or tracking data is collected.

Data Transmission

  • DealHub API Only: API calls are made exclusively to your configured DealHub instance (DEALHUB_API_BASE_URL).
  • HTTPS Encryption: All API communications use HTTPS for encryption in transit.
  • No Third Parties: No data is shared with or transmitted to any third-party services.

User Controls

  • You have complete control over your API credentials stored in the .env file
  • You can revoke API tokens at any time through the DealHub admin interface
  • Deleting the .env file removes all stored credentials

Data Retention

  • The MCP server retains no data between sessions
  • API credentials persist only in your local .env file until you delete them
  • No logs or historical data are stored

Data Handling Practices

How Your Data is Used

  1. Authentication: Your API token is used to authenticate requests to the DealHub API
  2. Version Management: Version data retrieved from DealHub is displayed to you through Claude
  3. Temporary Processing: Data is processed in memory during tool execution and discarded immediately after

What We Don't Do

  • ❌ Store conversation history
  • ❌ Log API requests or responses
  • ❌ Share data with third parties
  • ❌ Use data for training or analytics
  • ❌ Retain data after tool execution completes

API Token Security

  • API tokens are stored only in your local .env file
  • Tokens are never transmitted except as Bearer tokens in HTTPS requests to DealHub
  • The .env file is excluded from version control via .gitignore
  • You should use file system permissions to restrict access to .env (e.g., chmod 600 .env)

Compliance

This MCP server:

  • Does not handle or store personally identifiable information (PII) beyond what's necessary for API authentication
  • Does not access or process health data
  • Operates entirely within your local environment and your DealHub instance
  • Does not require GDPR, CCPA, or HIPAA compliance as it stores no user data

Security Considerations

Authentication Security

API Token Protection

  • Store tokens in .env files, never in code
  • Add .env to .gitignore to prevent accidental commits
  • Use restrictive file permissions: chmod 600 .env
  • Never share tokens in chat, screenshots, or documentation

Token Rotation

  • Regularly regenerate API tokens (recommended: every 90 days)
  • Immediately revoke tokens if compromised
  • Use separate tokens for different environments (dev, staging, prod)

Principle of Least Privilege

  • Only admin users should generate API tokens
  • Tokens inherit the permissions of the user who generated them
  • Do not use super-admin tokens if regular admin access is sufficient

Network Security

  • HTTPS Required: The MCP server only communicates with DealHub over HTTPS
  • IP Whitelisting: Consider configuring IP restrictions in DealHub's API settings
  • Firewall: Ensure your firewall allows outbound HTTPS to your DealHub instance

Local Execution Security

  • The MCP server runs locally as a subprocess of Claude Desktop
  • No network ports are opened or listening
  • Communication with Claude uses stdin/stdout (local IPC only)
  • The server cannot be accessed remotely

Dependency Security

  • All npm dependencies are from trusted sources (@modelcontextprotocol, axios, dotenv)
  • Run npm audit regularly to check for vulnerabilities
  • Keep dependencies updated: npm update

Secure Configuration

Claude Desktop Config

  • Store API tokens in environment variables in claude_desktop_config.json
  • Restrict access to ~/Library/Application Support/Claude/
  • On shared machines, ensure other users cannot read your Claude config

Environment Variables

  • Never hardcode credentials in package.json or source code
  • Use .env files for local development
  • Use secure environment variable management for production deployments

Operational Security

  • Logging: The MCP server logs minimal information to stderr
  • Error Messages: Error messages do not expose sensitive data
  • Input Validation: All tool inputs are validated before making API calls

Incident Response

If you suspect a token has been compromised:

  1. Immediately revoke the token in DealHub (Settings → Integrations → Partner API)
  2. Generate a new token
  3. Update your .env file with the new token
  4. Restart Claude Desktop
  5. Review DealHub API access logs for suspicious activity

Support

For issues or questions:

  • DealHub Documentation: https://developers.dealhub.io
  • MCP Documentation: https://modelcontextprotocol.io

License

MIT License - See LICENSE file for details.

Copyright (c) 2026 DealHub

This software is provided "as is", without warranty of any kind. See the LICENSE file for full terms.