INNER CODE UNIT · TypeScript
CcxtMcpServer
lazy-dinosaur/ccxt-mcp · src/server.ts:65
export class CcxtMcpServer {
private server: McpServer;
// Key: account name from config, Value: Authenticated CCXT Exchange instance
private exchangeInstances: Record<string, Exchange> = {};
// Key: `${exchangeId}-${marketType}`, Value: Public (unauthenticated) CCXT Exchange instance
private publicExchangeInstances: Record<string, Exchange> = {};
// 설정 파일 경로
private configPath: string;
// 서버 초기화(계정 로드) 완료를 추적
private initPromise: Promise<void>;
/**
* @param configPath 사용자 지정 설정 파일 경로 (선택 사항)
*/
constructor(configPath?: string) {
// MCP 서버 초기화
this.server = new McpServer({
name: "CCXT MCP",