Skip to main content
Glama

Dropbox MCP Server

dbx-api.js2.56 kB
// Mock dbx-api.js to avoid import.meta.url issues in tests import { config } from './config.js'; export const downloadFile = jest.fn().mockImplementation((path, options = {}) => { return Promise.resolve({ content: [{ text: 'mock file content', encoding: options.encoding || 'utf-8' }] }); }); export const uploadFile = jest.fn().mockResolvedValue({ content: [{ text: JSON.stringify({ name: 'mock-file.txt', path_display: '/mock-file.txt', id: 'mock-file-id', size: 100, server_modified: new Date().toISOString() }) }] }); export const listFiles = jest.fn().mockResolvedValue({ content: [{ text: JSON.stringify([ { '.tag': 'file', name: 'mock-file.txt', path_display: '/mock-file.txt', id: 'mock-file-id', size: 100, server_modified: new Date().toISOString() } ]) }] }); export const getFileMetadata = jest.fn().mockResolvedValue({ content: [{ text: JSON.stringify({ name: 'mock-file.txt', path_display: '/mock-file.txt', id: 'mock-file-id', size: 100, server_modified: new Date().toISOString() }) }] }); export const createFolder = jest.fn().mockResolvedValue({ content: [{ text: JSON.stringify({ name: 'mock-folder', path_display: '/mock-folder', id: 'mock-folder-id' }) }] }); export const deleteItem = jest.fn().mockResolvedValue({ content: [{ text: JSON.stringify({ status: 'success', message: 'Item deleted successfully' }) }] }); export const searchFiles = jest.fn().mockResolvedValue({ content: [{ text: JSON.stringify({ matches: [ { metadata: { name: 'mock-file.txt', path_display: '/mock-file.txt', id: 'mock-file-id' } } ], total_results: 1 }) }] }); export const getAccountInfo = jest.fn().mockResolvedValue({ content: [{ text: JSON.stringify({ account_id: 'mock-account-id', name: { display_name: 'Mock User' }, email: 'mock@example.com', account_type: 'basic' }) }] });

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