feat(gateway): MCP client — connect to external MCP servers as agent tools (#127) (#141)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #141.
This commit is contained in:
33
apps/gateway/src/mcp-client/mcp-client.dto.ts
Normal file
33
apps/gateway/src/mcp-client/mcp-client.dto.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* DTOs for MCP client configuration and tool discovery.
|
||||
*/
|
||||
|
||||
export interface McpServerConfigDto {
|
||||
/** Unique name identifying this MCP server */
|
||||
name: string;
|
||||
/** URL of the MCP server (streamable HTTP or SSE endpoint) */
|
||||
url: string;
|
||||
/** Optional HTTP headers to send with requests (e.g., Authorization) */
|
||||
headers?: Record<string, string>;
|
||||
}
|
||||
|
||||
export interface McpToolDto {
|
||||
/** Namespaced tool name: "<serverName>__<toolName>" */
|
||||
name: string;
|
||||
/** Human-readable description of the tool */
|
||||
description: string;
|
||||
/** JSON Schema for tool input parameters */
|
||||
inputSchema: Record<string, unknown>;
|
||||
/** MCP server this tool belongs to */
|
||||
serverName: string;
|
||||
/** Original tool name on the remote server */
|
||||
remoteName: string;
|
||||
}
|
||||
|
||||
export interface McpServerStatusDto {
|
||||
name: string;
|
||||
url: string;
|
||||
connected: boolean;
|
||||
toolCount: number;
|
||||
error?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user