Skip to content

Make custom connection scopes configurable#136

Merged
saleem-aasim-xero merged 4 commits intoXeroAPI:update/support-granular-scopesfrom
amanda-ducrou:main
Apr 16, 2026
Merged

Make custom connection scopes configurable#136
saleem-aasim-xero merged 4 commits intoXeroAPI:update/support-granular-scopesfrom
amanda-ducrou:main

Conversation

@amanda-ducrou
Copy link
Copy Markdown
Contributor

Problem:

Currently, scopes for custom connection integrations using this mcp server have to have all of the hardcoded scopes, or "invalid token" is returned.

I want to lock down the functionality to read-only at the scope level, rather than relying on higher level checks.

Proposed solution:

The current scopes are set as the default but can be overridden with environment variable "XERO_SCOPES".

@saleem-aasim-xero
Copy link
Copy Markdown
Contributor

saleem-aasim-xero commented Mar 29, 2026

Hi @amanda-ducrou , thanks for the PR!

I'm currently in the middle of some major changes to the custom connections scopes in the update/support-granular-scopes branch. To keep the changes together and released at same time, I’d like to get this merged into that branch instead of main.

Which would you prefer?

You update the PR: You can change the 'base branch' of this PR from main to [update/support-granular-scopes]. If there are conflicts, you might need to rebase.

I handle it: I can 'cherry-pick' your commits into my branch. I’ll make sure you are credited as the author in the commit history, and then I'll close this PR once it's integrated.

Let me know what works best for you

@amanda-ducrou amanda-ducrou changed the base branch from main to update/support-granular-scopes March 30, 2026 23:40
@amanda-ducrou
Copy link
Copy Markdown
Contributor Author

amanda-ducrou commented Mar 31, 2026

Thanks @saleem-aasim-xero - I have updated this PR

This looks like it is a more complete solution - #143

@saleem-aasim-xero saleem-aasim-xero merged commit bc1667c into XeroAPI:update/support-granular-scopes Apr 16, 2026
saleem-aasim-xero added a commit that referenced this pull request Apr 29, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants