configure_auth
Set up Overleaf account credentials to enable Git-based project management from MCP environments, allowing synchronization between local files and Overleaf.
Instructions
Configure global Overleaf credentials
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Overleaf account email | ||
| token | Yes | Overleaf git token |
Implementation Reference
- src/auth-manager.js:13-17 (handler)Implements the core logic for the 'configure_auth' tool by saving the provided email and token to a JSON configuration file in the user's home directory, merging with existing config.async saveConfig(config) { const current = await this.getConfig(); const newConfig = { ...current, ...config }; await fs.writeJson(CONFIG_FILE, newConfig, { spaces: 2 }); }
- src/index.ts:107-120 (schema)Defines the JSON input schema for the 'configure_auth' tool, specifying email and token as required string properties.inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'Overleaf account email', }, token: { type: 'string', description: 'Overleaf git token', }, }, required: ['email', 'token'], },
- src/index.ts:104-121 (registration)Registers the 'configure_auth' tool in the ListToolsRequestHandler response, including its name, description, and input schema.{ name: 'configure_auth', description: 'Configure global Overleaf credentials', inputSchema: { type: 'object', properties: { email: { type: 'string', description: 'Overleaf account email', }, token: { type: 'string', description: 'Overleaf git token', }, }, required: ['email', 'token'], }, },