Skip to content

feat : load config from local context instead of global variables #97

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
Jul 16, 2025

Conversation

ruturaj-browserstack
Copy link
Contributor

This pull request introduces significant refactoring and improvements to the BrowserStack MCP server, focusing on modularization, improved authentication handling, and the introduction of a new API client. The changes streamline the codebase, enhance maintainability, and improve runtime configuration flexibility. Key updates include the removal of hardcoded credentials, the addition of a factory function for MCP server creation, and the replacement of direct fetch calls with a reusable apiClient.

Re-opened PR with New Branch

- Replaced direct usage of credentials from config with a new utility function `getBrowserStackAuth` to retrieve authentication details.
- Updated multiple functions across various modules to accept `server` parameter for improved flexibility and maintainability.
- Ensured all API calls to BrowserStack now utilize the new authentication method, enhancing security and code clarity.
- Adjusted related function signatures and calls to accommodate the new parameter structure.
…rver parameter

- Updated createTestRun, listTestCases, listTestRuns, updateTestRun, and uploadFile functions to include a server parameter.
- Modified related test cases to pass mock server instances for better test isolation and accuracy.
- Enhanced error handling and logging in test management tools.
- Improved test coverage for various scenarios in test management utilities.
…of server parameter

- Updated listTestCases, listTestRuns, pollLCAStatus, createTestCasesFromFile, updateTestRun, uploadFile, and other related functions to accept BrowserStackConfig.
- Modified the corresponding test cases to reflect the changes in function signatures and ensure proper configuration handling.
- Enhanced error handling and logging for better debugging and traceability.
…ith improved error handling and environment variable checks
@tech-sushant
Copy link
Contributor

Tested using testbed
image

@Vishalan Vishalan merged commit 7253d65 into browserstack:main Jul 16, 2025
2 checks passed
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.

4 participants