🧠 Model Context Protocol (MCP) Guide for Refund Protect Integration

by abelpenton

141 downloads
Not rated
GitHub

About

The Refund Protect MCP Server is an AI agent that lets you interact with the Protect Group API using natural language. It can create quotes, transactions, cancellations, and generate installable code for Refund Protect integrations. This server is designed for developers and…

Details

Author
abelpenton
Downloads
141
Categories
Other

- Create Refund Protect quotes via refundProtectQuoteTool
- Look up existing quotes with refundProtectQuoteLookupTool
- Create transactions using a quote via refundProtectSalesTool
- Look up transaction details with refundProtectSalesLookupTool
- Cancel transactions using refundProtectCancelTool
- Auto‑generate widget, React component, and C# service code

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name 🧠 Model Context Protocol (MCP) Guide for Refund Protect Integration
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Configure the MCP server by adding the JSON {"mcpServers":{"rp-mcp-server":{"command":"npx","args":["-y","@abelpenton_dev/rp-mcp-server"]}}} to your agent's MCP settings. In Claude Desktop, go to Settings > Developer > Edit Config and paste the JSON. In Cursor, go to MCP Settings, add a new global MCP server, and paste the same JSON. Then start prompting with natural language commands like "Give me a Refund Protect quote for my flight" or "Generate the code to install the Refund Protect JavaScript widget."

refund-protect-quote

Create, obtain or generate a Quote for Refund Protect product

refund-protect-quote-lookup

Lookup for an existing Quote for Refund Protect product using QuoteId

refund-protect-sales

Create or Generate a transaction for Refund Protect using a QuoteId

refund-protect-sales-lookup

Lookup for an existing transaction for Refund Protect using a Booking Reference or Sales Id

refund-protect-cancel

Cancel a transaction for Refund Protect using a Booking Reference

rp-widget-installation

Install Refund Protect javascript widget, this should be created once in the source code. Insert the code returned as an script

rp-widget-render

This is the code to render the Refund Protect javascript widget once its installed. Add the div with pgr-payment-container and call updateQuoteData action.

rp-react-component-installation

Generate React code to install the widget, this is a provider and should be inserted in the root level of the project

rp-react-component-render

Render the widget content in the specified component of the source code

api-quote-implementation

Return API contract for Refund Protect Quote request to be use in a service

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83e\udde0 model context protocol (mcp) guide for refund protect integration": {
            "rp-mcp-server": {
                "command": "npx",
                "args": [
                    "-y",
                    "@abelpenton_dev/rp-mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "rp-mcp-server": {
        "command": "npx",
        "args": [
            "-y",
            "@abelpenton_dev/rp-mcp-server"
        ]
    }
}

🧠 Model Context Protocol (MCP) Guide for Refund Protect Integration

1. MCP Summary

The Model Context Protocol (MCP) is a protocol that allows LLM agents (such as ChatGPT or Claude) to dynamically interact with APIs and tools through a shared context. MCP bridges the gap between natural language interfaces and programmable systems, enabling context-aware execution of code, API calls, and plugin usage—all through structured prompts.

Official Doc

2. Official MCP Server examples

2.1 These official reference servers demonstrate core MCP features and SDK usage:

- Slack: Channel management and messaging capabilities
- Google Drive: File access and search capabilities for Google Drive
- GitHub: Repository management, file operations, and GitHub API integration

More Examples

3. Configuration in Agents

3.1 What is a Client Agent?

A Client Agent is an AI model or chatbot (ChatGPT, Claude, DeepSeek) configured to interact with external tools or services using the MCP specification. These agents can interpret prompts and execute actions through MCP-enabled tools.

3.2 Agents that Support MCP Integration

- Cursor
- Claude (via Cursor)
- Windsurf by Codeium
- ChatGPT (coming soon)

3.3 ChatGPT Support

Support for ChatGPT with MCP is coming soon. Once integrated, you will be able to use the same MCP commands within ChatGPT Pro environments, with persistent tool context and streamlined API interaction.

---

4. Refund Protect MCP Server

Refund Protect MCP Server is an AI server agent will allows you to interact with Protect Group API using natural language. Creating Quotes, Transaction, do cancellation and many other features supported by the Official API.

Using prompt engineer you will be able to vibe coding Protect Group integrations method, from installing and render Refund Protect content in your source code to creating services in any programing language or frameworks that will connect with Protect Group API in behind.

---

5. MCP Server Setup

Each AI agent have different way to configure MCP servers, use the JSON below to add Refund Protect Server:

{
  "mcpServers": {
    "rp-mcp-server": {
      "command": "npx",
      "args": ["-y", "@abelpenton_dev/rp-mcp-server"]
    }
  }
}

5.1 Setup in Claude

1. Download Claude Destokp.
2. From Claude Desktop, click on Settings.
3. Go to Developer Section.
4. Clicking in Edit Config.
5. Add RP Server settings in claude_desktop_config.json file.
6. Restart the app and start prompting Claude using natural language.

5.2 Setup in Cursor (For Developers)

1. Download Cursor IDE
2. Open Cursor and go to MCP Setting .
3. Click on Add new global MCP Server.
4. Add RP Server setting on mcp.json file.
5. Open the chat in agent mode with Ctrl + I.
6. Start interacting with tools by writing prompts in the MCP-aware interface.

---

6. Interactive Prompts with Refund Protect API

Use these prompts to interact with the Refund Protect API via MCP tools:

Sample Prompt:

> These are my API credential for Refund Protect API.
> Vendor Code: vendorCode
> Secret: secret

> Give me a Refund Protect quote for my flight July 15 which I paid 540 EUR.

> Give me the details for the Quote: quoteID.

> Create a transaction for Refund Protect using the generated quote.

> Give me the details for the transaction with Booking Reference: bookingReference

> Cancel the transaction with Booking Reference: bookingReference

---

7. Vibe Coding Refund Protect Integrations

Use these tool prompts to auto-generate installable or embeddable code:

Sample Prompt:

> Generate the code to install Refund Protect javascript widget and Generate the code to render the widget

> Generate the code to install and render Refund Protect react component

> Create a service in Dotnet that implements Refund Protect Quote request

---

8. Chat Example

Here’s a real-world conversational example using MCP-enabled prompts:

User: I need a Refund Protect quote for my hotel booking on May 22. It cost 320 EUR.
Agent: Sure, fetching the quote for 320 EUR on May 22…
→ Executes refundProtectQuoteTool

User: Can you show me the details of that quote?
→ Executes refundProtectQuoteLookupTool

User: Book it using that quote.
→ Executes refundProtectSalesTool

User: Actually, cancel the booking. Use the reference code I gave earlier.
→ Executes refundProtectCancelTool

---

9. Tools Available in Refund Protect MCP Server

Here are the available tools in the Refund Protect MCP Server:

refundProtectQuoteTool – Fetches a Refund Protect quote.

refundProtectQuoteLookupTool – Retrieves details of an existing Refund Protect quote.

refundProtectSalesTool – Creates a transaction using a Refund Protect quote.

refundProtectSalesLookupTool – Retrieves details for a transaction using a booking reference.

refundProtectCancelTool – Cancels a transaction using a booking reference.

rpWidgetInstallation – Generates code for installing the Refund Protect JavaScript widget.

rpWidgetRender – Generates code to render the Refund Protect JavaScript widget.

rpReactComponentInstallationTool – Generates code for installing the Refund Protect React component.

rpReactComponentRenderTool – Generates code to render the Refund Protect React component.

apiQuoteImplementation – Creates a service in C# that implements Refund Protect Quote request.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.