We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors
// SPDX-License-Identifier: Apache-2.0
import Client from 'ssh2-sftp-client';
/**
* This Bot demonstrates Medplum's SFTP capabilities.
* It uses the ssh2-sftp-client library to list all the files on a demo SFTP server.
* @returns The data returned by the `list` command
*/
export async function handler(): Promise<Client.FileInfo[] | boolean> {
console.log('SFTP test');
let data: Client.FileInfo[] | undefined = undefined;
try {
const sftp = new Client();
await sftp.connect({
host: 'test.rebex.net',
username: 'demo',
password: 'password',
});
data = await sftp.list('.');
console.log('data', data);
} catch (err) {
console.log('error', err);
return false;
}
return data;
}