Skip to main content
Glama

swit-oauth-status

Check OAuth authentication status for the Swit MCP Server to verify access to Swit collaboration tools before performing workspace operations.

Instructions

Check OAuth authentication status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handleOAuthStatus function that executes the core logic of the 'swit-oauth-status' tool by checking OAuth authentication status and returning relevant details.
    export const handleOAuthStatus = async (oauthWebServer: OAuthWebServer | null) => { const isAuthenticated = oauthWebServer?.isAuthenticated() || false; const port = process.env.OAUTH_PORT || '3000'; return { authenticated: isAuthenticated, status: isAuthenticated ? 'Authenticated' : 'Authentication required', webServerUrl: oauthWebServer ? `http://localhost:${port}` : null, message: isAuthenticated ? 'OAuth authentication completed. Swit API is ready to use.' : 'OAuth authentication required. Use swit-oauth-start tool to begin authentication.', }; };
  • Input schema definition for the 'swit-oauth-status' tool (empty schema since no parameters required).
    name: 'swit-oauth-status', description: 'Check OAuth authentication status', inputSchema: zodToJsonSchema(EmptySchema), },
  • Registration of the 'swit-oauth-status' handler within the oauthHandlers factory function, which is later used in the main index.ts.
    export const oauthHandlers = (oauthWebServer: OAuthWebServer | null) => ({ 'swit-oauth-status': () => handleOAuthStatus(oauthWebServer), 'swit-oauth-start': () => handleOAuthStart(oauthWebServer), 'swit-oauth-logout': () => handleOAuthLogout(oauthWebServer), });
  • src/index.ts:62-63 (registration)
    Registration of tool schemas (including 'swit-oauth-status' from oauthTools) in the MCP server's listTools handler.
    return { tools: [...oauthTools, ...coreTools] }; });
  • src/index.ts:109-109 (registration)
    Final dynamic registration of the oauthHandlers (including 'swit-oauth-status') into the MCP toolHandlers object after OAuth initialization.
    toolHandlers = { ...oauthHandlers(oauthWebServer), ...coreHandlers(switClient) };

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/TykanN/swit-mcp'

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