feat(mcp): add Model Context Protocol integration
Add MCP integration including: - New MCP settings tab with server configuration - Tool invocation UI components - API endpoints for MCP management - Integration with chat system for tool execution - Example configurations
This commit is contained in:
16
app/routes/api.mcp-check.ts
Normal file
16
app/routes/api.mcp-check.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { createScopedLogger } from '~/utils/logger';
|
||||
import { MCPService } from '~/lib/services/mcpService';
|
||||
|
||||
const logger = createScopedLogger('api.mcp-check');
|
||||
|
||||
export async function loader() {
|
||||
try {
|
||||
const mcpService = MCPService.getInstance();
|
||||
const serverTools = await mcpService.checkServersAvailabilities();
|
||||
|
||||
return Response.json(serverTools);
|
||||
} catch (error) {
|
||||
logger.error('Error checking MCP servers:', error);
|
||||
return Response.json({ error: 'Failed to check MCP servers' }, { status: 500 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user