Skip to content

Commit 8fa6a22

Browse files
committed
refactor: rename McpAuthServer to AsgardeoMcpAuth
1 parent 1d36efe commit 8fa6a22

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

examples/express-mcp-server/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import express from 'express';
22
import {config} from 'dotenv';
3-
import {McpAuthServer, protectedRoute} from '@asgardeo/mcp-express';
3+
import {AsgardeoMcpAuth, protectedRoute} from '@asgardeo/mcp-express';
44
import {protectedRoutes} from './routes/protected';
55
import {publicRoutes} from './routes/public';
66

@@ -12,7 +12,7 @@ const port = process.env.PORT || 3000;
1212
app.use(express.json());
1313

1414
app.use(
15-
McpAuthServer({
15+
AsgardeoMcpAuth({
1616
baseUrl: process.env.BASE_URL as string,
1717
}),
1818
);

examples/express-mcp-vet-ai-assist-app/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*/
1818

1919
import {randomUUID} from 'node:crypto';
20-
import {McpAuthServer, protectedRoute} from '@asgardeo/mcp-express';
20+
import {AsgardeoMcpAuth, protectedRoute} from '@asgardeo/mcp-express';
2121
import {McpServer} from '@modelcontextprotocol/sdk/server/mcp';
2222
import {StreamableHTTPServerTransport} from '@modelcontextprotocol/sdk/server/streamableHttp';
2323
import {isInitializeRequest} from '@modelcontextprotocol/sdk/types';
@@ -30,7 +30,7 @@ config();
3030
const app: Express = express();
3131
app.use(express.json());
3232
app.use(
33-
McpAuthServer({
33+
AsgardeoMcpAuth({
3434
baseUrl: process.env.BASE_URL as string,
3535
}),
3636
);

packages/mcp-express/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ pnpm add @asgardeo/mcp-express
3636

3737
```typescript
3838
import express from 'express';
39-
import {McpAuthServer, protectedRoute} from '@asgardeo/mcp-express';
39+
import {AsgardeoMcpAuth, protectedRoute} from '@asgardeo/mcp-express';
4040

4141
const app = express();
4242

4343
// Initialize MCP authentication server with baseUrl
4444
app.use(
45-
McpAuthServer({
45+
AsgardeoMcpAuth({
4646
baseUrl: process.env.BASE_URL as string,
4747
}),
4848
);
@@ -60,14 +60,14 @@ app.use('/api/protected', protectedRoute, (req, res) => {
6060

6161
### API Reference
6262

63-
#### McpAuthServer(options)
63+
#### AsgardeoMcpAuth(options)
6464

6565
Initializes the MCP authentication server middleware with the given configuration.
6666

6767
```typescript
68-
import {McpAuthServer} from '@asgardeo/mcp-express';
68+
import {AsgardeoMcpAuth} from '@asgardeo/mcp-express';
6969

70-
app.use(McpAuthServer({baseUrl: 'https://auth.example.com'}));
70+
app.use(AsgardeoMcpAuth({baseUrl: 'https://auth.example.com'}));
7171
```
7272

7373
#### protectedRoute
@@ -97,15 +97,15 @@ Here's a complete example of setting up an Express server with MCP authenticatio
9797

9898
```typescript
9999
import express from 'express';
100-
import {McpAuthServer, protectedRoute} from '@asgardeo/mcp-express';
100+
import {AsgardeoMcpAuth, protectedRoute} from '@asgardeo/mcp-express';
101101

102102
const app = express();
103103
const port = process.env.PORT || 3000;
104104

105105
app.use(express.json());
106106

107107
// Initialize MCP authentication
108-
app.use(McpAuthServer());
108+
app.use(AsgardeoMcpAuth());
109109

110110
// Public routes
111111
app.use('/api', publicRoutes);

packages/mcp-express/src/public-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
* under the License.
1717
*/
1818

19-
export {default as McpAuthServer} from './routes/auth';
19+
export {default as AsgardeoMcpAuth} from './routes/auth';
2020
export {default as protectedRoute} from './middlewares/protected-route';

0 commit comments

Comments
 (0)