Add DeepSeek AI MCP assistant

This commit is contained in:
meswork
2026-05-27 14:39:35 +08:00
parent 120a18a651
commit 035970880d
23 changed files with 148240 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
@echo off
powershell -ExecutionPolicy Bypass -File "%~dp0ai-status.ps1"

View File

@@ -0,0 +1,10 @@
$connections = Get-NetTCPConnection -LocalPort 3100 -State Listen -ErrorAction SilentlyContinue
if (-not $connections) {
Write-Output "AI MCP service is not running."
exit 1
}
$connections | ForEach-Object {
$process = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
Write-Output ("AI MCP service is running. PID={0}, Process={1}, URL=http://127.0.0.1:3100" -f $_.OwningProcess, $process.ProcessName)
}

View File

@@ -0,0 +1,2 @@
@echo off
powershell -ExecutionPolicy Bypass -File "%~dp0start-daily.ps1"

View File

@@ -0,0 +1,19 @@
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
$logDir = Join-Path $root "mcp-server"
$outLog = Join-Path $logDir "ai-mcp.out.log"
$errLog = Join-Path $logDir "ai-mcp.err.log"
Set-Location $root
npm run kb:build
$existing = Get-NetTCPConnection -LocalPort 3100 -State Listen -ErrorAction SilentlyContinue
if ($existing) {
Write-Output "AI MCP service already listening on port 3100."
exit 0
}
Start-Process -FilePath "node" -ArgumentList "mcp-server/server.js" -WorkingDirectory $root -RedirectStandardOutput $outLog -RedirectStandardError $errLog -WindowStyle Hidden
Start-Sleep -Seconds 2
Write-Output "AI MCP service started: http://127.0.0.1:3100"

View File

@@ -0,0 +1,2 @@
@echo off
powershell -ExecutionPolicy Bypass -File "%~dp0stop-ai.ps1"

View File

@@ -0,0 +1,13 @@
$connections = Get-NetTCPConnection -LocalPort 3100 -State Listen -ErrorAction SilentlyContinue
if (-not $connections) {
Write-Output "AI MCP service is not running on port 3100."
exit 0
}
$connections | ForEach-Object {
$pidValue = $_.OwningProcess
if ($pidValue) {
Stop-Process -Id $pidValue -Force
Write-Output "Stopped AI MCP process $pidValue."
}
}