Skip to main content
Glama
visaacceptance

Visa Acceptance

README.md
# Visa Acceptance Model Context Protocol

The Visa Acceptance [Model Context Protocol](https://modelcontextprotocol.com/) server allows you to integrate with Visa Acceptance APIs through function calling. This protocol supports various tools to interact with different Visa Acceptance services, including enhanced invoice management, and payment links functionality.

## Quick Start

To run the Visa Acceptance MCP server using npx, use the following command:

```bash
# To set up all available tools
npx -y @visaacceptance/mcp --tools=all --merchant-id=YOUR_MERCHANT_ID --api-key-id=YOUR_API_KEY_ID --secret-key=YOUR_SECRET_KEY

# To set up specific tools 
npx -y @visaacceptance/mcp --tools=invoices.create,invoices.read,paymentLinks.create,paymentLinks.read --merchant-id=YOUR_MERCHANT_ID --api-key-id=YOUR_API_KEY_ID --secret-key=YOUR_SECRET_KEY

# To configure test environment (default is true)
npx -y @visaacceptance/mcp --tools=all --merchant-id=YOUR_MERCHANT_ID --api-key-id=YOUR_API_KEY_ID --secret-key=YOUR_SECRET_KEY --use-test-env=true
```

Make sure to replace the credential placeholders with your actual Visa Acceptance credentials. Alternatively, you could set these values in your environment variables.

## Usage with Claude Desktop

Add the following to your `claude_desktop_config.json`. See [here](https://modelcontextprotocol.io/quickstart/user) for more details.

```json
{
  "mcpServers": {
    "visa-acceptance": {
      "command": "npx",
      "args": [
          "-y",
          "@visaacceptance/mcp",
          "--tools=all",
          "--merchant-id=YOUR_MERCHANT_ID",
          "--api-key-id=YOUR_API_KEY_ID",
          "--secret-key=YOUR_SECRET_KEY"
      ]
    }
  }
}
```


## Available Tools

| Tool                    | Description                                                                |
| ----------------------- | -------------------------------------------------------------------------- |
| `invoices.create`       | Create a new invoice with customer info and enhanced invoice parameters    |
| `invoices.update`       | Update an existing invoice including customer and invoice information      |
| `invoices.list`         | List invoices with pagination support                                      |
| `invoices.get`          | Get detailed invoice transaction                                               |
| `paymentLinks.create`   | Create a new payment link with optional shipping info                      |
| `paymentLinks.update`   | Update an existing payment link                                            |
| `paymentLinks.list`     | List payment links with pagination                                         |
| `paymentLinks.get`      | Retrieve details of a specific payment link                                |

## Debugging the Server

To debug your server, you can use the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector).

First build the server:

```bash
npm run build
```

Run the following command in your terminal:

```bash
# Start MCP Inspector and server with all tools
npx @modelcontextprotocol/inspector node dist/index.js --tools=all --merchant-id=YOUR_MERCHANT_ID --api-key-id=YOUR_API_KEY_ID --secret-key=YOUR_SECRET_KEY
```



### Debugging Instructions

1. Replace the credential placeholders with your actual Visa Acceptance credentials.
2. Run the command to start the MCP Inspector.
3. Open the MCP Inspector UI in your browser and click Connect to start the MCP server.
4. You can see the list of tools you selected and test each tool individually.

## Configuration

You can also configure the server using environment variables:

```bash
# Visa Acceptance API Credentials
# Both new simplified names and old names are supported
# New simplified names take precedence if both are defined

VISA_ACCEPTANCE_MERCHANT_ID=your_merchant_id
VISA_ACCEPTANCE_API_KEY_ID=your_api_key_id
VISA_ACCEPTANCE_SECRET_KEY=your_secret_key

# Environment Configuration
# When true, points to apitest.visa-acceptance.com (non-production)
# When false, points to api.visa-acceptance.com (production)
VISA_ACCEPTANCE_ENVIRONMENT=SANDBOX
VISA_ACCEPTANCE_TOOLS=all

```

You can copy the `.env.template` file to get started:

```bash
cp .env.template .env
```

## Local Development

This package is designed to be used as a local npm package during development. Follow these steps to set up the package for local development:

### Installation

1. Clone the repository:
   ```bash
   git clone https://github.com/visaacceptance/agent-toolkit.git
   cd agent-toolkit/modelcontextprotocol
   ```

2. Install dependencies:
   ```bash
   npm install
   ```

3. Build the package:
   ```bash
   npm run build
   ```

### Local Package Linking

To use this package locally in another project:

1. Link the package globally:
   ```bash
   npm link
   ```

2. In your project directory, link to the package:
   ```bash
   npm link @visaacceptance/mcp
   ```

3. You can now import and use the package in your project:
   ```javascript
   import { VisaAcceptanceAgentToolkit } from '@visaacceptance/mcp';
   // or
   const { VisaAcceptanceAgentToolkit } = require('@visaacceptance/mcp');
   ```

### Development Workflow

1. Make changes to the source code
2. Rebuild the package:
   ```bash
   npm run build
   ```
3. The linked projects will automatically use the updated version

TDQS

B3.1/5.0

Scored across 10 tools

Disambiguation5/5

Each tool targets a distinct resource (invoice vs payment_link) with clear actions (create, get, list, update, cancel, send). No overlap in purpose.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern in snake_case (e.g., create_invoice, list_payment_links), making them predictable and easy to understand.

Tool Count5/5

10 tools cover two main resources with essential CRUD and lifecycle operations. The count is well-scoped without being excessive or insufficient.

Completeness4/5

Invoices have full lifecycle coverage (create, get, list, update, cancel, send). Payment links cover create, get, list, update, but missing delete or refund functionality, a minor gap.

Maintenance

ActivityInactive
ResponsivenessUnresponsive