---
title: CLI
slug: ai/mcp-server/setup-guide-cli
excerpt: >-
  Install the pinelabs-mcp CLI to run an MCP server locally with
  auto-configuration for Claude Desktop, Cursor, VS Code, and more.
hidden: false
sidebar_order: 2
metadata:
  title: Pine Labs MCP CLI — Local Setup for AI Assistants | Pine Labs Online
  description: >-
    Install and configure the pinelabs-mcp CLI to connect AI assistants like
    Claude Desktop, Cursor, VS Code, Windsurf, and GitHub Copilot to Pine Labs
    payment APIs. Auto-configuration, credential management, and connection
    testing built in.
  keywords: >-
    Pine Labs CLI, pinelabs-mcp, MCP CLI, local MCP server, Claude Desktop MCP,
    Cursor MCP CLI, mcp configure
  robots: 'index,follow'
---

The **`pinelabs-mcp` CLI** is an MCP client for the Pine Labs payment gateway. Use it to connect Claude Desktop, Cursor, VS Code, Windsurf, OpenCode, GitHub Copilot, and OpenAI Codex to Pine Labs payment APIs using your client credentials — all from one command-line tool.

## Prerequisites

<Steps>
  <Step number={1} title="Node.js 18+">
    [Download Node.js](https://nodejs.org/en) and verify with `node --version`.
  </Step>
  <Step number={2} title="Pine Labs merchant account">
    A Pine Labs Online merchant account with API access enabled.
  </Step>
  <Step number={3} title="API credentials">
    Your `X-Client-Id` and `X-Client-Secret` from the [Pine Labs Dashboard](https://dashboardv2.pluralonline.com/login).
  </Step>
</Steps>

## Step 1 — Get your API credentials

<Steps>
  <Step number={1} title="Log in">
    Visit the [Pine Labs Dashboard](https://dashboardv2.pluralonline.com/signup).
  </Step>
  <Step number={2} title="Open merchant settings">
    Navigate to your merchant account settings.
  </Step>
  <Step number={3} title="Copy credentials">
    Copy your `X-Client-Id` and `X-Client-Secret`.
  </Step>
</Steps>

## Step 2 — Install the Pine Labs MCP CLI

```bash
npm i pinelabs-mcp
```

## Step 3 — Configure your credentials

Save your Pine Labs MCP credentials locally using the Client ID and Client Secret from Step 1.

```bash
pinelabs-mcp configure --client-id=X --client-secret=Y [--env=uat | prod]
```

### Environment variables

| Variable | Required | Default | Description |
| :--- | :--- | :--- | :--- |
| `PINELABS_CLIENT_ID` | Yes | — | Your Pine Labs client ID |
| `PINELABS_CLIENT_SECRET` | Yes | — | Your Pine Labs client secret |
| `PINELABS_ENV` | No | `uat` | Environment: `uat` or `prod` |
| `PINELABS_MCP_ENDPOINT` | No | — | Custom endpoint URL (overrides `PINELABS_ENV`) |
| `DEBUG` | No | `false` | Enable debug logging (`true` or `1`) |

## Step 4 — Test your connection

After saving the configuration, **restart your AI client**. Then try this in your assistant:

```bash
npx pinelabs-mcp test
```

<Callout type="success" title="Connection live">
If everything is configured correctly, the assistant responds and confirms your MCP connection is live.
</Callout>

## CLI command reference

| Command | Description |
| :--- | :--- |
| `pinelabs-mcp start` | Start MCP server (stdio mode) |
| `pinelabs-mcp configure` | Interactive credential setup |
| `pinelabs-mcp configure --client-id=X --client-secret=Y [--env=uat \| prod]` | Configure CLI with client and secret |
| `pinelabs-mcp test` | Test connectivity and credentials |
| `pinelabs-mcp setup <client>` | Auto-configure an AI client |
| `pinelabs-mcp setup <client> --local` | Use local path (dev mode) |
| `pinelabs-mcp setup <client> --print` | Preview config without writing |
| `pinelabs-mcp status` | Show current configuration |
| `pinelabs-mcp help` | Show help message |
| `pinelabs-mcp --version` | Show version |

## Supported AI clients

| Client | Setup command | Config path |
| :--- | :--- | :--- |
| **Claude Desktop** | `setup claude-desktop` | Platform-specific Claude config |
| **Cursor** | `setup cursor` | `~/.cursor/mcp.json` |
| **VS Code** | `setup vscode` | `.vscode/mcp.json` (project) |
| **Windsurf** | `setup windsurf` | `~/.codeium/windsurf/mcp_config.json` |
| **OpenCode** | `setup opencode` | `.opencode/config.json` (project) |
| **GitHub Copilot** | `setup copilot` | `~/.copilot/mcp-config.json` |
| **OpenAI Codex** | `setup codex` | `.codex/config.toml` |

## Available tools

The MCP server exposes 20+ tools across these categories:

- **Payment Links** — Create, retrieve, cancel, and resend payment links.
- **Orders** — Create, track, and cancel checkout orders.
- **Payments** — QR code generation for UPI payments.
- **Refunds** — Create and retrieve refund details.
- **Settlements** — Settlements APIs.

See the [Available Tools](/ai/mcp-server/available-tools) reference for full details.

## Manual configuration

If you prefer to configure manually, add the following to your AI client's MCP config:

```json
{
  "mcpServers": {
    "pinelabs": {
      "command": "npx",
      "args": ["-y", "pinelabs-mcp"],
      "env": {
        "PINELABS_CLIENT_ID": "your_client_id",
        "PINELABS_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}
```

<Callout type="info" title="Notes">
- **VS Code** uses `"servers"` instead of `"mcpServers"` as the top-level key.
- **Production:** add `"PINELABS_ENV": "prod"` to the `env` block.
</Callout>

## Troubleshooting

| Issue | Fix |
| :--- | :--- |
| Missing credentials | Run `npx pinelabs-mcp configure` or set `PINELABS_CLIENT_ID` / `PINELABS_CLIENT_SECRET` in your MCP client's `env` block. |
| Tools not appearing | Restart your AI assistant; verify Node.js 18+ (`node --version`); set `"DEBUG": "true"` in `env`. |
| Connection issues | Verify credentials; check network access to `mcp.pinelabs.com`; allow HTTPS if behind a proxy. |

## Next steps

- Try the [Use Cases](/ai/mcp-server/use-cases) — real prompts and what happens behind the scenes.
- Browse the [Available Tools](/ai/mcp-server/available-tools) reference.
- Read the [FAQs](/ai/mcp-server/faqs) for limits and authentication details.
