@@ -36,13 +36,13 @@ pnpm add @asgardeo/mcp-express
3636
3737``` typescript
3838import express from ' express' ;
39- import {McpAuthServer , protectedRoute } from ' @asgardeo/mcp-express' ;
39+ import {AsgardeoMcpAuth , protectedRoute } from ' @asgardeo/mcp-express' ;
4040
4141const app = express ();
4242
4343// Initialize MCP authentication server with baseUrl
4444app .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
6565Initializes 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
9999import express from ' express' ;
100- import {McpAuthServer , protectedRoute } from ' @asgardeo/mcp-express' ;
100+ import {AsgardeoMcpAuth , protectedRoute } from ' @asgardeo/mcp-express' ;
101101
102102const app = express ();
103103const port = process .env .PORT || 3000 ;
104104
105105app .use (express .json ());
106106
107107// Initialize MCP authentication
108- app .use (McpAuthServer ());
108+ app .use (AsgardeoMcpAuth ());
109109
110110// Public routes
111111app .use (' /api' , publicRoutes );
0 commit comments