/**
 * MCP Module
 * 将 MCP 服务注册到 NestJS 依赖注入容器
 */

import { Module, Global } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { McpConfigService } from './mcp-config.service';
import { McpClientService } from './mcp-client.service';
import { McpServerConfigORM } from '../../database/postgres/entities/mcp-server-config.orm';
import { McpServerConfigRepository } from '../../database/postgres/repositories/mcp-server-config.repository';

@Global()
@Module({
  imports: [
    ConfigModule,
    TypeOrmModule.forFeature([McpServerConfigORM]),
  ],
  providers: [McpConfigService, McpClientService, McpServerConfigRepository],
  exports: [McpClientService, McpConfigService, McpServerConfigRepository],
})
export class McpModule {}
