UNPKG

@auth0/auth0-mcp-server

Version:

Auth0 Model Context Protocol (MCP) Server (Beta) — A secure and extendable implementation of an MCP server that provides AI assistants with controlled access to the Auth0 Management API through natural language. This project is in beta and not intended fo

77 lines (76 loc) • 2.57 kB
import { BaseClientManager } from './base.js'; import type { ClientOptions } from '../utils/types.js'; /** * VS Code configuration scope options */ export type VSCodeScope = 'workspace' | 'global'; /** * Extended client options for VS Code that includes scope selection */ export interface VSCodeClientOptions extends ClientOptions { scope?: VSCodeScope; workspaceFolder?: string; } /** * Client manager implementation for VS Code. * * Responsible for configuring and managing the MCP server integration * for the VS Code editor application with support for both workspace-specific * and global configurations. * * @see {@link https://code.visualstudio.com/ | VS Code Official Website} */ export declare class VSCodeClientManager extends BaseClientManager { private selectedScope; private selectedWorkspaceFolder?; constructor(); /** * Returns the path to the VS Code configuration file. * Uses the currently selected scope and workspace folder. * * @returns The absolute path to the configuration file. */ getConfigPath(): string; /** * Returns the path to the global VS Code configuration file. * * @returns The absolute path to the global configuration file. */ private getGlobalConfigPath; /** * Prompts user to select between workspace and global scope. * * @returns Promise resolving to the selected scope */ private promptForScope; /** * Prompts user for workspace folder path. * * @returns Promise resolving to the validated workspace folder path */ private promptForWorkspaceFolder; /** * Enhanced configure method that handles VS Code-specific scope selection. * * First prompts for configuration scope (workspace vs global), then if workspace * is selected, prompts for the project folder path. * * @param options - Client configuration options */ configure(options: VSCodeClientOptions): Promise<void>; /** * Loads VS Code-specific configuration from disk. * VS Code uses settings.json format, not the mcpServers format used by other clients. * * @param configPath - Path to the VS Code settings file * @returns Parsed configuration object */ private readVSCodeConfig; /** * Writes VS Code configuration to disk with proper formatting. * * @param configPath - Path where the configuration should be saved * @param config - Configuration object to serialize and write */ private writeVSCodeConfig; }