npm package: @shashisampath/rapidcheckout-mcp-server
Description: MCP server for Rapid Checkout API documentation and developer assistance with comprehensive documentation search capabilities
Author: shashi sampath
Latest version: 1.3.1

# Rapid Checkout MCP Server

A Model Context Protocol (MCP) server that provides developer assistance for the Rapid Checkout API. This server allows developers to interact with API documentation, get code examples, search endpoints, and ask questions about the API functionality.

[![npm version](https://badge.fury.io/js/rapid-checkout-mcp-server.svg)](https://badge.fury.io/js/rapid-checkout-mcp-server)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org/)

## Features

- **List Endpoints**: Browse all available API endpoints with filtering by tags
- **Endpoint Details**: Get comprehensive information about specific endpoints including parameters, request/response schemas, and examples
- **Schema Information**: Explore data models and schema definitions
- **Search Documentation**: Search through API documentation AND comprehensive documentation files for specific terms or concepts
- **Code Examples**: Generate code examples in multiple languages (JavaScript, Python, cURL, PHP)
- **Error Code Explanations**: Understand error responses and troubleshooting
- **Authentication Guide**: Get information about API authentication and security
- **📚 Documentation Files**: Access and search through comprehensive documentation including:
  - Overview and Introduction
  - Hosted Checkout Integration
  - Embedded Checkout Implementation  
  - Gateway API Usage
  - P2PE (Point-to-Point Encryption)
  - Tokenization Services
  - Supported Functions Reference

## Installation

### Global Installation (Recommended)
```bash
npm install -g rapid-checkout-mcp-server
```

### Local Project Installation
```bash
npm install rapid-checkout-mcp-server
```

### From Source
```bash
git clone <repository-url>
cd rapid-checkout-mcp-server
npm install
npm run build
```

## Quick Start

### Using Global Installation
```bash
# Install globally
npm install -g rapidcheckout-mcp-server

# Run the server
rapid-checkout-mcp
```

### Using npx (No Installation)
```bash
# Run directly with npx
npx rapid-checkout-mcp-server
```

### Using in Node.js Project
```javascript
import { RapidCheckoutMCPServer } from 'rapid-checkout-mcp-server';

const server = new RapidCheckoutMCPServer();
await server.run('http', 3000);
```

## Usage

This MCP server uses stdio transport for communication with MCP clients:

### stdio Transport
For use with MCP clients that communicate via stdin/stdout:
```bash
npm start
# or
node dist/index.js
```

## Installation

1. Install dependencies:
```bash
npm install
```

2. Build the project:
```bash
npm run build
```

3. Start the server:
```bash
npm start
```

## Development

For development with auto-rebuild:
```bash
npm run dev
```

## Usage

This MCP server is designed to be used with MCP-compatible clients. Once running, it provides the following tools:

### Available Tools

#### API Documentation Tools
- `list_endpoints` - List all API endpoints, optionally filtered by tag
- `get_endpoint_details` - Get detailed information about a specific endpoint
- `get_schema_details` - Get information about data schemas/models
- `search_documentation` - Search through API documentation AND comprehensive documentation files
- `generate_code_example` - Generate code examples for endpoints
- `explain_error_codes` - Explain error codes and responses
- `get_authentication_info` - Get API authentication information

#### 📚 Documentation File Tools  
- `list_documents` - List all available documentation files and their sections
- `get_document_content` - Get the full content of a specific documentation file
- `get_document_section` - Get content from a specific section of a documentation file

### Example Usage

```javascript
// List all available documentation
await tools.call('list_documents', {});

// Get overview documentation
await tools.call('get_document_content', {
  filename: 'Overview'
});

// Get specific section from a document
await tools.call('get_document_section', {
  filename: 'Hosted Checkout',
  section: 'Authentication'
});

// Search across all documentation
await tools.call('search_documentation', {
  query: 'payment tokenization'
});
```

### Example Queries

- "List all payment-related endpoints"
- "Show me details for the payment creation endpoint"
- "Generate a JavaScript example for creating a customer"
- "What does error code 422 mean for the pay endpoint?"
- "How do I authenticate with the API?"

## Project Structure

```
src/
├── index.ts          # Main MCP server implementation
├── api-service.ts    # API documentation service
└── types.ts          # TypeScript type definitions

rapidcheckout-corrected.json  # Corrected OpenAPI specification
```

## API Specification

The server uses a corrected version of the Rapid Checkout OpenAPI 2.0 specification that fixes various issues found in the original specification including:

- Fixed trailing spaces in property names
- Corrected authentication parameter requirements
- Improved date format consistency
- Enhanced error response documentation

## License

MIT License - See LICENSE file for details.

## Support

For questions about the Rapid Checkout API itself, contact Transact Campus, Inc support.
For issues with this MCP server, please check the documentation or contact the development team.