# Patchworks MCP

## Introduction

*MCP (Model Context Protocol)* is an open protocol that enables secure, standardised connections between Al assistants (e.g. Claude, Gemini, Chatgpt) and external data sources or tools (such as Patchworks).&#x20;

The Patchworks *MCP server* acts as a bridge between an Al assistant and Patchworks. It allows the Al to interact with Patchworks, with precise control over what it can see and do. At a high level:

* MCP uses a client-server model, where an AI agent (the client) makes requests to an MCP server.&#x20;
* The MCP server defines and exposes `tools` (e.g. get flow runs, summarise failed run, triage latest run failures) and `resources` (e.g. documentation, databases).&#x20;
* AI agents use these `tools` and `resources` to perform actions, thereby expanding their abilities beyond their core language understanding.&#x20;

&#x20;You can see this in the illustration below:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FLrsLBPLRSfUj1N1NKcq8%2Fmcp%20how%20it%20works.png?alt=media&#x26;token=7ce94803-6b63-4c52-a877-4b02df3b30b9" alt=""><figcaption></figcaption></figure>

This opens the door to a range of possibilities. Your AI assistant can interact with Patchworks directly to triage issues, generate reports, and even run flows - all in natural language. Whether you’re a merchant, partner, or developer, Patchworks MCP transforms how you work with your integrations.

## Why Patchworks MCP?

* **AI-ready iPaaS**\
  Make integrations conversational and intelligent.
* **Faster troubleshooting**\
  Automate triage & identify solutions
* **Customisable**\
  Add your own tools alongside our pre-loaded set
* **Safe & secure** \
  Per-tenant isolation, role-based access, and auditable tool calls.
* **Future-proof**\
  Works with Claude, Gemini, ChatGPT, and any MCP-compatible client.

## Implementation

We provide two implementation paths for the Patchworks MCP - *local* and *hosted*:

<table><thead><tr><th width="121.12109375" valign="top">Type</th><th valign="top">Implementation</th><th valign="top">Pros</th><th valign="top">Cons</th></tr></thead><tbody><tr><td valign="top"><a href="patchworks-mcp/patchworks-mcp-local">Local</a></td><td valign="top">Clone a Patchworks MCP repository to retrieve setup files, then install dependencies before configuring your environment and MCP installation.</td><td valign="top">Complete control over the hosting environment.</td><td valign="top">Technical implementation and ongoing maintenance.<br><br>Default tools cannot be customised.</td></tr><tr><td valign="top"><a href="patchworks-mcp/patchworks-mcp-hosted">Hosted</a></td><td valign="top">Minimal setup outside of the Patchworks dashboard and your AI assistant.</td><td valign="top">Less technical implementation; automatic updates;  customise and deploy tools via the Patchworks dashboard. </td><td valign="top">No control of the hosting environment.<br> </td></tr></tbody></table>

{% hint style="info" %}
Our product documentation can also be integrated with AI assistants via an MCP server! For details, please refer to the [Patchworks product documentation MCP server](https://doc.wearepatchworks.com/product-documentation/developer-hub/patchworks-mcp/patchworks-product-documentation-mcp-server) section.
{% endhint %}

## Demo

Before looking at MCP in more detail, let's see how it can work in practice. The video below shows Claude identifying failed process flow runs from a given time period, summarising those flow failures, identifying failure patterns, recommending possible solutions, retrying failed runs, and reporting back on the outcome.&#x20;

{% embed url="<https://www.youtube.com/watch?v=XECRW0TEkUE>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/developer-hub/patchworks-mcp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
