> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paysum.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Paysum Store MCP

> Connect an assistant to your store and edit theme drafts with a scoped API key.

The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) lets an assistant read catalog or order data, manage products and coupons, or edit theme files. A Paysum API key grants access to one store. The server lists only the [tools](https://docs.paysum.io/mcp/tools.md) that the key can call.

## Connect

```text theme={null}
https://paysum.io/api/mcp
```

Use Streamable HTTP with an `Authorization: Bearer sk_…` header. This is the **Store MCP** endpoint. The [docs search MCP](https://docs.paysum.io/mcp) is a separate, public endpoint that cannot read or change your store. Never send your store API key to the docs search endpoint.

> [card] [Connect a client](https://docs.paysum.io/mcp/clients.md)
>
> Set up Cursor, Claude Code, or another Streamable HTTP client.

> [card] [Tools and scopes](https://docs.paysum.io/mcp/tools.md)
>
> See which tools each key permission enables.

## Edit a theme draft

1. Create a store API key with `themes:write`. This scope includes `themes:read`. Review [Security](https://docs.paysum.io/mcp/security.md) before you grant write access.
2. Call `list_theme_files` with `{"content": false}` to see the file paths. Call `get_theme_file` with the path you want to edit.
3. Send the complete updated file to `write_theme_files` in `files: [{ "path": "...", "content": "..." }]`. Files you do not include stay unchanged.
4. Call `preview_theme` to get a temporary preview link. Review the result before you approve `publish_theme`, which changes your live storefront.

> [!WARNING]
>
> Use this flow for Liquid theme files, such as `sections/hero.liquid`. Do not use the legacy `src/styles.css` or `src/hosted-overrides.css` paths for a draft-only edit. Those paths can update live store styles directly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.