feat(mcp): add MCP Server Integration — Property Search, Analytics, Valuation
Implement 3 MCP servers in libs/mcp-servers/ using @modelcontextprotocol/sdk: - Property Search: NL search via Typesense, property comparison, detail lookup - Market Analytics: market reports, price trends, district comparison - Valuation: AVM integration with Python AI service, feature extraction, batch valuation Includes NestJS integration module with SSE transport for in-process hosting. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
28
libs/mcp-servers/src/nestjs/mcp.module.ts
Normal file
28
libs/mcp-servers/src/nestjs/mcp.module.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Module, type DynamicModule, type Provider } from '@nestjs/common';
|
||||
import { McpRegistryService } from './mcp-registry.service';
|
||||
import { McpTransportController } from './mcp-transport.controller';
|
||||
|
||||
export interface McpModuleOptions {
|
||||
aiServiceBaseUrl: string;
|
||||
typesenseCollectionName?: string;
|
||||
}
|
||||
|
||||
export const MCP_MODULE_OPTIONS = Symbol('MCP_MODULE_OPTIONS');
|
||||
|
||||
@Module({})
|
||||
export class McpModule {
|
||||
static forRoot(options: McpModuleOptions): DynamicModule {
|
||||
const optionsProvider: Provider = {
|
||||
provide: MCP_MODULE_OPTIONS,
|
||||
useValue: options,
|
||||
};
|
||||
|
||||
return {
|
||||
module: McpModule,
|
||||
controllers: [McpTransportController],
|
||||
providers: [optionsProvider, McpRegistryService],
|
||||
exports: [McpRegistryService],
|
||||
global: false,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user