You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support granular OAuth scopes for new Custom Connections (#139)
* add support for granular scopes
* Update README and xero-client to support granular scopes for custom connections
* Rename scope constants for clarity
* Improve error handling for token retrieval in CustomConnectionsXeroClient
* remove redundant scopes
* Make custom connection scopes configurable (#136)
* Make custom connections scopes configurable
* update README
* Update README.md with new release date
---------
Co-authored-by: Amanda Ducrou <amanda@scopego.co>
Copy file name to clipboardExpand all lines: README.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,18 @@ It is also the recommended approach if you are integrating this into 3rd party M
47
47
48
48
Set up a Custom Connection following these instructions: https://developer.xero.com/documentation/guides/oauth2/custom-connections/
49
49
50
-
Currently the following scopes are required for all sessions: [scopes](src/clients/xero-client.ts#L91-L92)
50
+
##### Required Scopes
51
+
52
+
Custom connections require different scopes depending on when they were created. **All scopes in the relevant list must be added to your custom connection:**
53
+
54
+
| Custom Connection Created | Required Scopes |
55
+
|---------------------------|-----------------|
56
+
| Before Apr 29, 2026 |[SCOPES_V1](src/clients/xero-client.ts#L82-L90) (bundled permissions) |
57
+
| From Apr 29, 2026 |[SCOPES_V2](src/clients/xero-client.ts#L93-L112) (granular permissions) |
58
+
59
+
> **Note:** The MCP server automatically tries V1 scopes first and falls back to V2 if needed.
60
+
>
61
+
> You can override these by setting the `XERO_SCOPES` environment variable to a space-separated list of scopes.
51
62
52
63
##### Integrating the MCP server with Claude Desktop
53
64
@@ -61,13 +72,16 @@ To add the MCP server to Claude go to Settings > Developer > Edit config and add
The `XERO_SCOPES` variable is optional. If omitted, the default scopes listed above will be used.
84
+
71
85
NOTE: If you are using [Node Version Manager](https://github.com/nvm-sh/nvm)`"command": "npx"` section change it to be the full path to the executable, ie: `your_home_directory/.nvm/versions/node/v22.14.0/bin/npx` on Mac / Linux or `"your_home_directory\\.nvm\\versions\\node\\v22.14.0\\bin\\npx"` on Windows
0 commit comments