# Patchworks MCP (local)

## Introduction

This guide shows how to set up Patchworks MCP locally, on your own machine.&#x20;

## Pre-loaded tools

Having [installed Patchworks MCP locally](https://doc.wearepatchworks.com/product-documentation/developer-hub/patchworks-mcp/patchworks-mcp-local), you can utilise ten pre-loaded tools:

* Track data through the platform
* Automate *“Where is my order?*” customer queries
* Generate reports from logs in seconds
* Identify errors that require intervention
* Instantly access all logs and payloads
* Run advanced root cause analysis
* Trigger flows directly
* Other system-level tools include *“List all flows*”, *“Summarise failed run*”, and *“Download payloads”.*

## Prerequisites

* Patchworks API key. Please refer to our [API keys](https://doc.wearepatchworks.com/product-documentation/developer-hub/patchworks-api/core-api-authentication/api-keys) product documentation for information about obtaining API keys.&#x20;
* An MCP client account. You will need an account for a client that connects to local servers. Our examples are designed for Claude, as Claude Desktop is a straightforward starting point. However, other clients (e.g. Gemini and ChatGPT with MCP support) work in the same way.

## Pages in this section

* [Stage 1: Retrieve Patchworks setup files](https://doc.wearepatchworks.com/product-documentation/developer-hub/patchworks-mcp/patchworks-mcp-local/installation-and-setup-patchworks-mcp-local/stage-1-retrieve-patchworks-setup-files)
* [Stage 2: Install dependencies](https://doc.wearepatchworks.com/product-documentation/developer-hub/patchworks-mcp/patchworks-mcp-local/installation-and-setup-patchworks-mcp-local/stage-2-install-dependencies)
* [Stage 3: Configure your environment & run the server](https://doc.wearepatchworks.com/product-documentation/developer-hub/patchworks-mcp/patchworks-mcp-local/installation-and-setup-patchworks-mcp-local/stage-3-configure-your-environment-and-run-the-server)
* [Stage 4: Configure your MCP client](https://doc.wearepatchworks.com/product-documentation/developer-hub/patchworks-mcp/patchworks-mcp-local/installation-and-setup-patchworks-mcp-local/stage-4-configure-your-mcp-client)


---

# 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/patchworks-mcp-local.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.
