Stage 3: Configure your environment & run the server
Introduction
In this stage, you will copy and rename the .env.example file (added during Stage 1), and then update it with your own Patchworks credentials
Pre-requisites
To complete this task, you will need an API key for your Patchworks account. Please refer to our API keys product documentation for information about obtaining API keys.
The steps
Prepare credentials
Ensure that your Patchworks API key is to hand, ready to copy/paste later in this task.
Change into the required folder
In a terminal window, run the following command:
cd ~/patchworks-mcpCopy and rename the .env.example file
Run the following command:
cp .env.example .envThe copied file is now named .env.
Open the .env file in edit mode
Run the following command:
nano .envThe .env opens and will look similar to the example below:

Apply your Patchworks API key
Use your arrow keys to move down to the end of the PATCHWORKS_TOKEN= XXXXXXXXXXXXXX line:

Then use your backspace key to delete the XXXXXXXXXXXXXX element:

Now paste your Patchworks API key - for example:

Press CTRL+X to exit. When prompted, enter Y to save changes, then press Enter to confirm the .env filename.
Run the server
In the same terminal window (at the patchworks-mcp directory), run the following command:
uv run python server.pyYou should see confirmation that a virtual environment is created and packages are installed - for example:

At this point, you can terminate the session.
Configure your MCP client
Last updated
Was this helpful?