feat: add OAuth dynamic client registration endpoint#20
Open
diarworld wants to merge 4 commits intoaikts:mainfrom
Open
feat: add OAuth dynamic client registration endpoint#20diarworld wants to merge 4 commits intoaikts:mainfrom
diarworld wants to merge 4 commits intoaikts:mainfrom
Conversation
added 4 commits
February 17, 2026 01:57
Add POST /register endpoint for OAuth dynamic client registration. The endpoint accepts client information in JSON format and registers new OAuth clients via the auth_server_provider.
…ut pre-registration.
… empty redirect_uris
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Проблема
При настройке MCP сервера yandex-tracker-mcp с OAuth аутентификацией для opencode, процесс аутентификации завершался ошибкой:
Причина: MCP SDK в opencode не вызывал endpoint
/registerдля динамической регистрации клиента, а сразу пытался использовать/authorizeс сгенерированным client_id, который не был зарегистрирован на сервере.Внесённые изменения
1. Добавлен endpoint
/register( server.py )Добавлен endpoint для динамической регистрации OAuth клиентов в соответствии с RFC 7591:
2. Добавлена авто-регистрация клиентов ( provider.py )
Реализована функция
get_client()с автоматической регистрацией неизвестных клиентов:3. Исправлен hardcoded URL в refresh token ( provider.py:309 )
Исправлена ошибка с hardcoded URL
https://oauth.yandex.ru/tokenпри обновлении токена - теперь используетсяself._yandex_oauth_issuer.Результат
Теперь MCP сервер автоматически регистрирует неизвестные клиенты при первом обращении, что позволяет opencode успешно проходить OAuth аутентификацию без необходимости предварительной ручной регистрации client_id.