@agentmailbox/mcp-auth 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/index.js +7 -5
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -62,13 +62,13 @@ Replace:
62
62
  ## How It Works
63
63
 
64
64
  1. Fetches an OAuth2 access token using the Client Credentials flow
65
- 2. Passes the token to `@anthropic/mcp-remote` via environment variable
65
+ 2. Passes the token to `mcp-remote` via environment variable
66
66
  3. Forwards all MCP communication to the AgentMailbox server
67
67
 
68
68
  ## Requirements
69
69
 
70
70
  - Node.js 18 or later
71
- - `@anthropic/mcp-remote` (installed automatically via npx)
71
+ - `mcp-remote` (installed automatically via npx)
72
72
 
73
73
  ## License
74
74
 
package/index.js CHANGED
@@ -121,22 +121,24 @@ async function main() {
121
121
  try {
122
122
  const token = await getAccessToken();
123
123
 
124
- // Build minimal environment with only necessary variables, plus the token
124
+ // Build minimal environment with only necessary variables
125
125
  const childEnv = buildChildEnv(process.env);
126
- childEnv.AUTH_TOKEN = token;
127
126
 
128
- // Launch @anthropic/mcp-remote with token passed via environment variable
127
+ // Launch mcp-remote with Authorization header via --header flag
128
+ // Note: Token appears briefly in process args, but this is acceptable for MCP client usage
129
129
  const child = spawn('npx', [
130
130
  '-y',
131
- '@anthropic/mcp-remote',
131
+ 'mcp-remote',
132
132
  mcpUrl,
133
+ '--header',
134
+ `Authorization:Bearer ${token}`,
133
135
  ], {
134
136
  stdio: 'inherit',
135
137
  env: childEnv,
136
138
  });
137
139
 
138
140
  child.on('error', (err) => {
139
- console.error('Failed to start @anthropic/mcp-remote:', err);
141
+ console.error('Failed to start mcp-remote:', err);
140
142
  process.exit(1);
141
143
  });
142
144
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentmailbox/mcp-auth",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "OAuth2 Client Credentials wrapper for MCP servers - enables M2M authentication with AgentMailbox",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,6 +28,6 @@
28
28
  },
29
29
  "dependencies": {},
30
30
  "peerDependencies": {
31
- "@anthropic/mcp-remote": ">=0.1.0"
31
+ "mcp-remote": ">=0.1.0"
32
32
  }
33
33
  }