Skip to main content
Glama
auth.ts918 B
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import type { GraphService } from "../services/graph.js"; export function registerAuthTools(server: McpServer, graphService: GraphService) { // Authentication status tool server.tool( "auth_status", "Check the authentication status of the Microsoft Graph connection. Returns whether the user is authenticated and shows their basic profile information.", {}, async () => { const status = await graphService.getAuthStatus(); return { content: [ { type: "text", text: status.isAuthenticated ? `✅ Authenticated as ${status.displayName || "Unknown User"} (${status.userPrincipalName || "No email available"})` : "❌ Not authenticated. Please run: npx @floriscornel/teams-mcp@latest authenticate", }, ], }; } ); }

Implementation Reference

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/floriscornel/teams-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server