* add mcp for web * update /jan/v1 endpoint to /v1 * update mise and makefile * update yarn lock * use mcp oauth properly
21 lines
731 B
TypeScript
21 lines
731 B
TypeScript
import { MCPInterface, MCPTool, MCPToolCallResult } from '../../types'
|
|
import { BaseExtension, ExtensionTypeEnum } from '../extension'
|
|
|
|
/**
|
|
* MCP (Model Context Protocol) extension for managing tools and server communication.
|
|
* @extends BaseExtension
|
|
*/
|
|
export abstract class MCPExtension extends BaseExtension implements MCPInterface {
|
|
/**
|
|
* MCP extension type.
|
|
*/
|
|
type(): ExtensionTypeEnum | undefined {
|
|
return ExtensionTypeEnum.MCP
|
|
}
|
|
|
|
abstract getTools(): Promise<MCPTool[]>
|
|
abstract callTool(toolName: string, args: Record<string, unknown>): Promise<MCPToolCallResult>
|
|
abstract getConnectedServers(): Promise<string[]>
|
|
abstract refreshTools(): Promise<void>
|
|
abstract isHealthy(): Promise<boolean>
|
|
} |