🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

pinelabs-mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pinelabs-mcp-server

A Model Context Protocol (MCP) server for Pine Labs payment APIs

pipPyPI
Version
0.1.4
Weekly downloads
48
Maintainers
1

Pine Labs MCP Server

A Model Context Protocol (MCP) server for Pine Labs payment APIs. Connect your AI assistant — Claude Desktop, Cursor, VS Code, Windsurf, or any MCP-compatible client — to Pine Labs and manage payments, refunds, orders, payouts, settlements, and more through natural language.

Full Documentation · Available Tools · Use Cases · FAQs

Prerequisites

  • Python 3.10+Download
  • Pine Labs Client Credentials — Get your Client ID and Client Secret from the Pine Labs developer portal

Installation

pip install pinelabs-mcp-server

To verify the installation:

pinelabs-mcp-server --help

Quick Start

1. Set your credentials

Create a .env file in your working directory or export the variables directly:

export PINELABS_CLIENT_ID="your_client_id"
export PINELABS_CLIENT_SECRET="your_client_secret"
export PINELABS_ENV="uat"   # use "prod" for production

2. Start the server

pinelabs-mcp-server

The server starts on http://0.0.0.0:8000/mcp using Streamable HTTP transport by default.

3. Connect your AI client

Point your MCP-compatible AI client to the running server endpoint — see AI Client Configuration below.

AI Client Configuration

Add the following to your AI client's MCP configuration file:

Claude Desktop

File: claude_desktop_config.json

{
  "mcpServers": {
    "pinelabs": {
      "url": "http://localhost:8000/mcp",
      "headers": {
        "X-Client-Id": "your_client_id",
        "X-Client-Secret": "your_client_secret"
      }
    }
  }
}

Cursor

File: ~/.cursor/mcp.json

{
  "mcpServers": {
    "pinelabs": {
      "url": "http://localhost:8000/mcp",
      "headers": {
        "X-Client-Id": "your_client_id",
        "X-Client-Secret": "your_client_secret"
      }
    }
  }
}

VS Code

File: .vscode/mcp.json (in your project root)

{
  "servers": {
    "pinelabs": {
      "url": "http://localhost:8000/mcp",
      "headers": {
        "X-Client-Id": "your_client_id",
        "X-Client-Secret": "your_client_secret"
      }
    }
  }
}

Note: VS Code uses "servers" instead of "mcpServers" as the top-level key.

Environment Variables

VariableRequiredDefaultDescription
PINELABS_CLIENT_IDYesYour Pine Labs client ID
PINELABS_CLIENT_SECRETYesYour Pine Labs client secret
PINELABS_ENVNouatEnvironment: uat or prod
URL
PINELABS_TOKEN_URLNoAuto from envOverride the token endpoint URL
HOSTNo0.0.0.0Server bind address
PORTNo8000Server port
LOG_LEVELNoINFOLogging level (DEBUG, INFO, WARNING, ERROR)
LOG_FORMATNotextLog format: text or json
TOOLSNoComma-separated tool filter (see below)
REDIS_HOSTNolocalhostRedis host for token caching
REDIS_PORTNo6379Redis port
REDIS_DBNo0Redis database index

Available Tools

The server exposes 56 tools across these categories:

CategoryExamples
Payment LinksCreate, retrieve, cancel, and resend payment links
OrdersCreate, track, and manage checkout orders
RefundsCreate and retrieve refund details
PayoutsInitiate and track payouts
SettlementsQuery settlement details and cancel settlements
SubscriptionsCreate and manage recurring subscriptions
Card PaymentsServer-to-server card payment flows with OTP
UPI / QRGenerate QR codes for UPI intent payments
API DocsSearch Pine Labs API documentation
Code GenerationGenerate integration code snippets

See the complete tools reference for details.

Tool Filtering

You can control which tools the server exposes using the TOOLS environment variable. Tools are classified by operation (read / write / destructive) and category (e.g., payment_links, orders, refunds). Use a comma-separated mix of operation types and domain categories:

# Only read tools
TOOLS=read pinelabs-mcp-server

# Only payment link tools
TOOLS=payment_links pinelabs-mcp-server

# Read + write tools (excludes destructive)
TOOLS="read,write" pinelabs-mcp-server

# Read tools for orders and payment_links only
TOOLS="read,orders,payment_links" pinelabs-mcp-server

Short aliases are supported:

AliasExpands To
paymentpayment_links
orderorders
refundrefunds
payoutpayouts
settlementsettlements
subscriptionsubscriptions

Running with Docker

docker build -t pinelabs-mcp-server .

docker run -p 8000:8000 \
  -e PINELABS_CLIENT_ID="your_client_id" \
  -e PINELABS_CLIENT_SECRET="your_client_secret" \
  -e PINELABS_ENV="uat" \
  pinelabs-mcp-server

Development

# Clone the repository
git clone https://github.com/Plural-Pvt/pinelabs-mcp-server.git
cd pinelabs-mcp-server

# Install dependencies
pip install -r requirements.txt
pip install -r requirements-test.txt  # for running tests

# Run the server locally
python main.py

# Run tests
pytest

Troubleshooting

IssueFix
pinelabs-mcp-server command not foundEnsure pip install pinelabs-mcp-server completed successfully and the install directory is in your PATH
Authentication errorsVerify your PINELABS_CLIENT_ID and PINELABS_CLIENT_SECRET are correct
Tools not appearing in AI clientRestart your AI assistant after configuring the MCP endpoint; check server logs for errors
Connection refusedEnsure the server is running (pinelabs-mcp-server) and the port matches your client config
Redis connection errorsRedis is optional for local dev — the server falls back to in-memory token caching

Also Available on npm

If you prefer a Node.js-based setup with automatic AI client configuration, use the npm package instead:

npx pinelabs-mcp configure --client-id=YOUR_ID --client-secret=YOUR_SECRET
npx pinelabs-mcp setup cursor   # or: claude-desktop, vscode, windsurf

See pinelabs-mcp on npm for details.

License

MIT — see LICENSE for details.

Keywords

mcp

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts