Skip to main content
Glama

Dropbox MCP Server

reset-tokens.js1.58 kB
"use strict"; import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; import { encryptData } from './security-utils.js'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); // This script creates a fresh tokens file with minimal scope // It's useful when you need to reset tokens after changing encryption keys (async function() { console.log('Creating fresh tokens file with current encryption key...'); const tokenStorePath = process.env.TOKEN_STORE_PATH || path.join(process.cwd(), '.tokens.json'); // First, backup existing tokens file if it exists if (fs.existsSync(tokenStorePath)) { const backupPath = `${tokenStorePath}.bak.${Date.now()}`; fs.copyFileSync(tokenStorePath, backupPath); console.log(`Backed up existing tokens file to: ${backupPath}`); } const minimalTokenData = { accessToken: '', // Will be obtained during first use refreshToken: '', // Will be obtained during first use expiresAt: 0, scope: [], codeVerifier: '' }; const encryptedData = encryptData(minimalTokenData); // Write the encrypted data to the tokens file fs.writeFileSync(tokenStorePath, JSON.stringify(encryptedData, null, 2)); console.log(`✅ Created fresh tokens file at: ${tokenStorePath}`); console.log('The next time you run the server, it will prompt for re-authorization'); })().catch(error => { console.error('Failed to create tokens file:', error); process.exit(1); });

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/Albiemark/dbx-mcp-server'

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