feat: mcp-connection

This commit is contained in:
Acbox
2026-01-13 23:53:25 +08:00
parent dad44a4c36
commit 83b9e4f09b
8 changed files with 542 additions and 5 deletions
+31
View File
@@ -0,0 +1,31 @@
export interface BaseMCPConnection {
type: string
name: string
active: boolean
}
export interface StdioMCPConnection extends BaseMCPConnection {
type: 'stdio'
command: string
args: string[]
env: Record<string, string>
cwd: string
}
export interface BaseHTTPMCPConnection extends BaseMCPConnection {
url: string
headers: Record<string, string>
}
export interface HTTPMCPConnection extends BaseHTTPMCPConnection {
type: 'http'
}
export interface SSEMCPConnection extends BaseHTTPMCPConnection {
type: 'sse'
}
export type MCPConnection =
| StdioMCPConnection
| HTTPMCPConnection
| SSEMCPConnection