-
Notifications
You must be signed in to change notification settings - Fork 1
Fixes to NodeJS Samples #56
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR applies critical fixes to three Node.js sample agents (OpenAI, LangChain, and Claude) to enable anonymous Agents Playground connections and ensure proper parameter passing to tool servers.
Key changes:
- Disabled authentication configuration for development/testing with Agents Playground
- Fixed missing
Authorizationparameter in tool server registration calls - Standardized environment variable naming from
MCP_AUTH_TOKENtoBEARER_TOKEN
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| nodejs/openai/sample-agent/src/index.ts | Removed authentication config loader and replaced with empty config for anonymous connections; removed unused import |
| nodejs/openai/sample-agent/src/client.ts | Added proper Authorization type for parameter; updated environment variable from MCP_AUTH_TOKEN to BEARER_TOKEN |
| nodejs/langchain/sample-agent/src/index.ts | Removed authentication config loader and replaced with empty config for anonymous connections; removed unused import |
| nodejs/langchain/sample-agent/src/client.ts | Added missing authorization parameter to addToolServersToAgent call; updated environment variable to BEARER_TOKEN |
| nodejs/langchain/quickstart-before/src/client.ts | Removed spaces from agent name for consistency with identifier naming patterns |
| nodejs/claude/sample-agent/src/index.ts | Removed authentication config loader and replaced with empty config for anonymous connections; removed unused import |
| nodejs/claude/sample-agent/src/client.ts | Added missing authorization parameter to addToolServersToAgent; updated result message parsing logic to handle new SDK response format; updated environment variable to BEARER_TOKEN |
Authorizationback to add tool servers call