Repository navigation
馃摌 docs: Document MCP OAuth Sign-In on First Tool Use #852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import { test, expect } from '@playwright/test' | ||
|
|
||
| const PAGE = '/docs/configuration/librechat_yaml/object_structure/mcp_servers' | ||
|
|
||
| test.describe('MCP OAuth sign-in timing docs', () => { | ||
| test('@scenario:mcp-oauth-prompt-keys-documented both keys have sections that state when each mode prompts', async ({ | ||
| page, | ||
| }) => { | ||
| await page.goto(PAGE) | ||
| const main = page.locator('main') | ||
| await expect(main.locator('[id="oauthprompt"]')).toHaveCount(1) | ||
| await expect(main.locator('[id="oauthtoolcatalog"]')).toHaveCount(1) | ||
| await expect(main).toContainText('the sign-in prompt appears when the conversation turn starts') | ||
| await expect(main).toContainText('The prompt appears when the agent first calls one of the') | ||
| await expect(main).toContainText('Without one, the server keeps the turn-start prompt') | ||
| await expect(main).toContainText('fails config validation instead of being ignored') | ||
| const admin = main.getByRole('link', { name: 'admin configuration overrides', exact: true }) | ||
| await expect(admin).toHaveAttribute( | ||
| 'href', | ||
| /\/docs\/features\/admin_panel#configuration-management$/, | ||
| ) | ||
| }) | ||
|
|
||
| test('@scenario:mcp-oauth-prompt-links-resolve the deferred tools, capability and catalog links reach their targets', async ({ | ||
| page, | ||
| }) => { | ||
| await page.goto(PAGE) | ||
| const section = page.locator('main') | ||
| const catalogLink = section.getByRole('link', { name: 'oauthToolCatalog', exact: true }).first() | ||
| await expect(catalogLink).toHaveAttribute('href', /#oauthtoolcatalog$/) | ||
|
|
||
| const deferred = section.getByRole('link', { name: 'deferred', exact: true }).first() | ||
| await expect(deferred).toHaveAttribute('href', /\/docs\/features\/agents#deferred-tools$/) | ||
| await deferred.click() | ||
| await expect(page.locator('[id="deferred-tools"]')).toHaveCount(1) | ||
|
|
||
| await page.goto(PAGE) | ||
| const capability = page | ||
| .locator('main') | ||
| .getByRole('link', { name: 'agent capability', exact: true }) | ||
| .first() | ||
| await expect(capability).toHaveAttribute('href', /object_structure\/agents#capabilities$/) | ||
| await capability.click() | ||
| await expect(page.locator('[id="capabilities"]')).toHaveCount(1) | ||
| }) | ||
|
|
||
| test('@scenario:mcp-oauth-prompt-example-shown the on_use example with a declared catalog is on the page', async ({ | ||
| page, | ||
| }) => { | ||
| await page.goto(PAGE) | ||
| const main = page.locator('main') | ||
| await expect( | ||
| main.getByRole('heading', { name: 'MCP Server with OAuth Sign-In on First Tool Use' }), | ||
| ).toBeVisible() | ||
| const example = main.locator('figure, pre').filter({ hasText: 'oauthPrompt: on_use' }).last() | ||
| await expect(example).toContainText('oauthToolCatalog:') | ||
| await expect(example).toContainText('required: [range]') | ||
| }) | ||
| }) |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.