@codesoul-co/hypha-mcp / index
- Package index:
@codesoul-co/hypha-mcp - Source:
packages/mcp/src/index.ts - Exports: 32
Using this module
Aggregates the public entrypoint exports for @codesoul-co/hypha-mcp; applications import these symbols from the package entrypoint instead of internal file paths.
Import from the package entrypoint
import {
MockMCPGateway,
classicMCPCapabilityDescriptors,
classicMCPIntegrationSpec,
mcpCapabilityDescriptorSchema,
mcpIntegrationSpecDefinition,
mcpIntegrationSpecExample,
mcpIntegrationSpecJsonSchema,
mcpIntegrationSpecSchema,
} from '@codesoul-co/hypha-mcp';
import type {
ClassicMCPFetchResponse,
ClassicMCPMockGatewayOptions,
ClassicMCPSearchResult,
MCPCapabilityDescriptor,
MCPGateway,
MCPGatewayToolRegistrationContext,
MCPGatewayToolRegistrationOptions,
MCPGatewayToolRegistrationResult,
} from '@codesoul-co/hypha-mcp';
// The complete export list is documented below.Usage patterns
- Use the 17 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
- The module exposes 4 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
- The 10 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.
Runtime validation example
import { mcpCapabilityDescriptorSchema } from '@codesoul-co/hypha-mcp';
declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = mcpCapabilityDescriptorSchema.parse(input);Parse untrusted configuration, network, or persisted input with the runtime schema before passing it to functions or classes that expect a validated contract.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
MockMCPGateway | class | new MockMCPGateway(capabilities?: MCPCapabilityDescriptor[]): MockMCPGateway | Mock MCP Gateway class with 11 public constructor or member entries; its exact declarations are listed below. |
classicMCPCapabilityDescriptors | constant | const classicMCPCapabilityDescriptors: MCPCapabilityDescriptor[] | Classic MCP Capability Descriptors constant exported by the index module. |
classicMCPIntegrationSpec | constant | const classicMCPIntegrationSpec: MCPIntegrationSpec | Classic MCP Integration Spec constant exported by the index module. |
mcpCapabilityDescriptorSchema | constant | const mcpCapabilityDescriptorSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { serverId: z.ZodString; capabilityId: z.ZodString; type: z.ZodEnum<["tool"... | Runtime schema for MCP Capability Descriptor. |
mcpIntegrationSpecDefinition | constant | const mcpIntegrationSpecDefinition: SpecSchemaDefinition<MCPIntegrationSpec> | Runtime validation entrypoint for the MCP Integration spec, combining its parser, example and JSON Schema. |
mcpIntegrationSpecExample | constant | const mcpIntegrationSpecExample: MCPIntegrationSpec | Valid example value for MCP Integration Spec. |
mcpIntegrationSpecJsonSchema | constant | const mcpIntegrationSpecJsonSchema: JsonSchema | JSON Schema for MCP Integration Spec. |
mcpIntegrationSpecSchema | constant | const mcpIntegrationSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; servers: z.ZodArray<z.ZodObject<{ id: z.ZodString; mode: z.ZodEnum<["local", "remote"]>; version: z.ZodOptional<z.ZodString>; endpoint: z.ZodOptional<z.ZodString>; command: z.ZodOptional<z.ZodString>; args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { id: string; mode: "local" | "remote"; version?: s... | Runtime schema for MCP Integration Spec. |
mcpServerSpecSchema | constant | const mcpServerSpecSchema: z.ZodObject<{ id: z.ZodString; mode: z.ZodEnum<["local", "remote"]>; version: z.ZodOptional<z.ZodString>; endpoint: z.ZodOptional<z.ZodString>; command: z.ZodOptional<z.ZodString>; args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { id: string; mode: "local" | "remote"; version?: string | undefined; endpoint?: string | undefined; command?: string | undefined... | Runtime schema for MCP Server Spec. |
mcpSpecDefinitions | constant | const mcpSpecDefinitions: readonly [SpecSchemaDefinition<MCPIntegrationSpec>] | MCP Spec Definitions constant exported by the index module. |
mcpSpecJsonSchemas | constant | const mcpSpecJsonSchemas: Record<string, JsonSchema> | MCP Spec JSON Schemas constant exported by the index module. |
createClassicMCPMockGateway | function | createClassicMCPMockGateway(options?: ClassicMCPMockGatewayOptions): MockMCPGateway | Create Classic MCP Mock Gateway function with 1 public call signature; parameters and return types are listed below. |
normalizeMCPToolSpec | function | normalizeMCPToolSpec(capability: MCPCapabilityDescriptor): ToolSpec | Normalize MCP Tool Spec function with 1 public call signature; parameters and return types are listed below. |
registerMCPGatewayTools | function | registerMCPGatewayTools(options: MCPGatewayToolRegistrationOptions): Promise<MCPGatewayToolRegistrationResult> | Register MCP Gateway Tools function with 1 public call signature; parameters and return types are listed below. |
validateMCPIntegrationSpec | function | validateMCPIntegrationSpec(input: unknown): MCPIntegrationSpec | Validate MCP Integration Spec function with 1 public call signature; parameters and return types are listed below. |
ClassicMCPFetchResponse | interface | interface ClassicMCPFetchResponse | Classic MCP Fetch Response interface with 4 public fields or methods. |
ClassicMCPMockGatewayOptions | interface | interface ClassicMCPMockGatewayOptions | Classic MCP Mock Gateway Options interface with 4 public fields or methods. |
ClassicMCPSearchResult | interface | interface ClassicMCPSearchResult | Classic MCP Search Result interface with 3 public fields or methods. |
MCPCapabilityDescriptor | interface | interface MCPCapabilityDescriptor extends VersionedSpec, SpecMetadata | MCP Capability Descriptor interface with 21 public fields or methods. |
MCPGateway | interface | interface MCPGateway | MCP Gateway interface with 7 public fields or methods. |
MCPGatewayToolRegistrationContext | interface | interface MCPGatewayToolRegistrationContext | MCP Gateway Tool Registration Context interface with 4 public fields or methods. |
MCPGatewayToolRegistrationOptions | interface | interface MCPGatewayToolRegistrationOptions | MCP Gateway Tool Registration Options interface with 6 public fields or methods. |
MCPGatewayToolRegistrationResult | interface | interface MCPGatewayToolRegistrationResult | MCP Gateway Tool Registration Result interface with 5 public fields or methods. |
MCPIntegrationSpec | interface | interface MCPIntegrationSpec | MCP Integration Spec interface with 13 public fields or methods. |
MCPPromptRequest | interface | interface MCPPromptRequest | MCP Prompt Request interface with 4 public fields or methods. |
MCPPromptResult | interface | interface MCPPromptResult | MCP Prompt Result interface with 3 public fields or methods. |
MCPResourceReadRequest | interface | interface MCPResourceReadRequest | MCP Resource Read Request interface with 3 public fields or methods. |
MCPResourceResult | interface | interface MCPResourceResult | MCP Resource Result interface with 2 public fields or methods. |
MCPServerSpec | interface | interface MCPServerSpec | MCP Server Spec interface with 6 public fields or methods. |
MCPToolCallRequest | interface | interface MCPToolCallRequest | MCP Tool Call Request interface with 4 public fields or methods. |
NormalizedMCPCapability | interface | interface NormalizedMCPCapability | Normalized MCP Capability interface with 6 public fields or methods. |
MCPToolHandler | type | type MCPToolHandler = (request: MCPToolCallRequest<TInput>) => Promise<TOutput> | TOutput | Public type alias for MCP Tool Handler; the declaration contains its complete type expression. |
MockMCPGateway
Mock MCP Gateway class with 11 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { MockMCPGateway } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare class MockMCPGateway implements MCPGateway {
constructor(capabilities?: MCPCapabilityDescriptor[]);
registerToolHandler(serverId: string, capabilityId: string, handler: MCPToolHandler): void;
registerResource(serverId: string, uri: string, result: MCPResourceResult): void;
registerPrompt(serverId: string, name: string, result: MCPPromptResult): void;
discover(integration: MCPIntegrationSpec): Promise<MCPCapabilityDescriptor[]>;
normalize(capability: MCPCapabilityDescriptor): Promise<NormalizedMCPCapability>;
call(request: MCPToolCallRequest): Promise<unknown>;
callTool(request: MCPToolCallRequest): Promise<unknown>;
readResource(request: MCPResourceReadRequest): Promise<MCPResourceResult>;
getPrompt(request: MCPPromptRequest): Promise<MCPPromptResult>;
health(serverId?: string): Promise<Record<string, import('@codesoul-co/hypha-tools').ProviderHealth>>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
call | method | call(request: MCPToolCallRequest): Promise<unknown> | Public method; parameters and return type are shown in the signature. |
callTool | method | callTool(request: MCPToolCallRequest): Promise<unknown> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (capabilities?: MCPCapabilityDescriptor[]): MockMCPGateway | Creates an instance of this class. |
discover | method | discover(integration: MCPIntegrationSpec): Promise<MCPCapabilityDescriptor[]> | Public method; parameters and return type are shown in the signature. |
getPrompt | method | getPrompt(request: MCPPromptRequest): Promise<MCPPromptResult> | Public method; parameters and return type are shown in the signature. |
health | method | health(serverId?: string): Promise<Record<string, import("@codesoul-co/hypha-tools").ProviderHealth>> | Public method; parameters and return type are shown in the signature. |
normalize | method | normalize(capability: MCPCapabilityDescriptor): Promise<NormalizedMCPCapability> | Public method; parameters and return type are shown in the signature. |
readResource | method | readResource(request: MCPResourceReadRequest): Promise<MCPResourceResult> | Public method; parameters and return type are shown in the signature. |
registerPrompt | method | registerPrompt(serverId: string, name: string, result: MCPPromptResult): void | Public method; parameters and return type are shown in the signature. |
registerResource | method | registerResource(serverId: string, uri: string, result: MCPResourceResult): void | Public method; parameters and return type are shown in the signature. |
registerToolHandler | method | registerToolHandler(serverId: string, capabilityId: string, handler: MCPToolHandler): void | Public method; parameters and return type are shown in the signature. |
classicMCPCapabilityDescriptors
Classic MCP Capability Descriptors constant exported by the index module.
- Kind: constant
- Import:
import { classicMCPCapabilityDescriptors } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const classicMCPCapabilityDescriptors: MCPCapabilityDescriptor[];classicMCPIntegrationSpec
Classic MCP Integration Spec constant exported by the index module.
- Kind: constant
- Import:
import { classicMCPIntegrationSpec } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const classicMCPIntegrationSpec: MCPIntegrationSpec;mcpCapabilityDescriptorSchema
Runtime schema for MCP Capability Descriptor.
- Kind: constant
- Import:
import { mcpCapabilityDescriptorSchema } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const mcpCapabilityDescriptorSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; } & { name: z.ZodOptional<z.ZodString>; description: z.ZodOptional<z.ZodString>; owner: z.ZodOptional<z.ZodString>; tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; createdAt: z.ZodOptional<z.ZodString>; updatedAt: z.ZodOptional<z.ZodString>; } & { serverId: z.ZodString; capabilityId: z.ZodString; type: z.ZodEnum<["tool", "resource", "prompt"]>; inputSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; outputSchema: z.ZodOptional<z.ZodType<JsonSchema, z.ZodTypeDef, JsonSchema>>; sideEffectLevel: z.ZodOptional<z.ZodEnum<["none", "read", "write", "external_effect", "irreversible"]>>; permissionScope: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; capabilityHash: z.ZodOptional<z.ZodString>; trustLevel: z.ZodOptional<z.ZodEnum<["trusted", "reviewed", "untrusted"]>>; declarationSource: z.ZodOptional<z.ZodEnum<["framework", "user", "server", "unknown"]>>; }, "strip", z.ZodTypeAny, { id: string; type: "tool" | "resource" | "prompt"; version: string; serverId: string; capabilityId: string; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; inputSchema?: JsonSchema | undefined; outputSchema?: JsonSchema | undefined; sideEffectLevel?: "none" | "read" | "write" | "external_effect" | "irreversible" | undefined; permissionScope?: string[] | undefined; capabilityHash?: string | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; declarationSource?: "unknown" | "framework" | "user" | "server" | undefined; }, { id: string; type: "tool" | "resource" | "prompt"; version: string; serverId: string; capabilityId: string; name?: string | undefined; description?: string | undefined; owner?: string | undefined; tags?: string[] | undefined; createdAt?: string | undefined; updatedAt?: string | undefined; inputSchema?: JsonSchema | undefined; outputSchema?: JsonSchema | undefined; sideEffectLevel?: "none" | "read" | "write" | "external_effect" | "irreversible" | undefined; permissionScope?: string[] | undefined; capabilityHash?: string | undefined; trustLevel?: "trusted" | "reviewed" | "untrusted" | undefined; declarationSource?: "unknown" | "framework" | "user" | "server" | undefined; }>;mcpIntegrationSpecDefinition
Runtime validation entrypoint for the MCP Integration spec, combining its parser, example and JSON Schema.
- Kind: constant
- Import:
import { mcpIntegrationSpecDefinition } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const mcpIntegrationSpecDefinition: SpecSchemaDefinition<MCPIntegrationSpec>;mcpIntegrationSpecExample
Valid example value for MCP Integration Spec.
- Kind: constant
- Import:
import { mcpIntegrationSpecExample } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const mcpIntegrationSpecExample: MCPIntegrationSpec;mcpIntegrationSpecJsonSchema
JSON Schema for MCP Integration Spec.
- Kind: constant
- Import:
import { mcpIntegrationSpecJsonSchema } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const mcpIntegrationSpecJsonSchema: JsonSchema;mcpIntegrationSpecSchema
Runtime schema for MCP Integration Spec.
- Kind: constant
- Import:
import { mcpIntegrationSpecSchema } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const mcpIntegrationSpecSchema: z.ZodObject<{ id: z.ZodString; version: z.ZodString; servers: z.ZodArray<z.ZodObject<{ id: z.ZodString; mode: z.ZodEnum<["local", "remote"]>; version: z.ZodOptional<z.ZodString>; endpoint: z.ZodOptional<z.ZodString>; command: z.ZodOptional<z.ZodString>; args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { id: string; mode: "local" | "remote"; version?: string | undefined; endpoint?: string | undefined; command?: string | undefined; args?: string[] | undefined; }, { id: string; mode: "local" | "remote"; version?: string | undefined; endpoint?: string | undefined; command?: string | undefined; args?: string[] | undefined; }>, "many">; allowedCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; deniedCapabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; trustPolicy: z.ZodOptional<z.ZodString>; importPolicy: z.ZodOptional<z.ZodString>; resourcePolicy: z.ZodOptional<z.ZodString>; toolPolicy: z.ZodOptional<z.ZodString>; promptPolicy: z.ZodOptional<z.ZodString>; versionPinning: z.ZodOptional<z.ZodBoolean>; capabilityHashing: z.ZodOptional<z.ZodBoolean>; driftPolicy: z.ZodOptional<z.ZodEnum<["quarantine", "accept"]>>; }, "strip", z.ZodTypeAny, { id: string; version: string; servers: { id: string; mode: "local" | "remote"; version?: string | undefined; endpoint?: string | undefined; command?: string | undefined; args?: string[] | undefined; }[]; allowedCapabilities?: string[] | undefined; deniedCapabilities?: string[] | undefined; trustPolicy?: string | undefined; importPolicy?: string | undefined; resourcePolicy?: string | undefined; toolPolicy?: string | undefined; promptPolicy?: string | undefined; versionPinning?: boolean | undefined; capabilityHashing?: boolean | undefined; driftPolicy?: "quarantine" | "accept" | undefined; }, { id: string; version: string; servers: { id: string; mode: "local" | "remote"; version?: string | undefined; endpoint?: string | undefined; command?: string | undefined; args?: string[] | undefined; }[]; allowedCapabilities?: string[] | undefined; deniedCapabilities?: string[] | undefined; trustPolicy?: string | undefined; importPolicy?: string | undefined; resourcePolicy?: string | undefined; toolPolicy?: string | undefined; promptPolicy?: string | undefined; versionPinning?: boolean | undefined; capabilityHashing?: boolean | undefined; driftPolicy?: "quarantine" | "accept" | undefined; }>;mcpServerSpecSchema
Runtime schema for MCP Server Spec.
- Kind: constant
- Import:
import { mcpServerSpecSchema } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const mcpServerSpecSchema: z.ZodObject<{ id: z.ZodString; mode: z.ZodEnum<["local", "remote"]>; version: z.ZodOptional<z.ZodString>; endpoint: z.ZodOptional<z.ZodString>; command: z.ZodOptional<z.ZodString>; args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { id: string; mode: "local" | "remote"; version?: string | undefined; endpoint?: string | undefined; command?: string | undefined; args?: string[] | undefined; }, { id: string; mode: "local" | "remote"; version?: string | undefined; endpoint?: string | undefined; command?: string | undefined; args?: string[] | undefined; }>;mcpSpecDefinitions
MCP Spec Definitions constant exported by the index module.
- Kind: constant
- Import:
import { mcpSpecDefinitions } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const mcpSpecDefinitions: readonly [SpecSchemaDefinition<MCPIntegrationSpec>];mcpSpecJsonSchemas
MCP Spec JSON Schemas constant exported by the index module.
- Kind: constant
- Import:
import { mcpSpecJsonSchemas } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare const mcpSpecJsonSchemas: Record<string, JsonSchema>;createClassicMCPMockGateway
Create Classic MCP Mock Gateway function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { createClassicMCPMockGateway } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare function createClassicMCPMockGateway(options?: ClassicMCPMockGatewayOptions): MockMCPGateway;Call signature
createClassicMCPMockGateway(options?: ClassicMCPMockGatewayOptions): MockMCPGatewayParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | ClassicMCPMockGatewayOptions | No | Optional parameter; accepted values are defined by the type column. |
Returns
- Type:
MockMCPGateway - Description: The return contract is defined by the type shown above.
normalizeMCPToolSpec
Normalize MCP Tool Spec function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { normalizeMCPToolSpec } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare function normalizeMCPToolSpec(capability: MCPCapabilityDescriptor): ToolSpec;Call signature
normalizeMCPToolSpec(capability: MCPCapabilityDescriptor): ToolSpecParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
capability | MCPCapabilityDescriptor | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
ToolSpec - Description: The return contract is defined by the type shown above.
registerMCPGatewayTools
Register MCP Gateway Tools function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { registerMCPGatewayTools } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare function registerMCPGatewayTools(options: MCPGatewayToolRegistrationOptions): Promise<MCPGatewayToolRegistrationResult>;Call signature
registerMCPGatewayTools(options: MCPGatewayToolRegistrationOptions): Promise<MCPGatewayToolRegistrationResult>Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | MCPGatewayToolRegistrationOptions | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
Promise<MCPGatewayToolRegistrationResult> - Description: The return contract is defined by the type shown above.
validateMCPIntegrationSpec
Validate MCP Integration Spec function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { validateMCPIntegrationSpec } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export declare function validateMCPIntegrationSpec(input: unknown): MCPIntegrationSpec;Call signature
validateMCPIntegrationSpec(input: unknown): MCPIntegrationSpecParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
MCPIntegrationSpec - Description: The return contract is defined by the type shown above.
ClassicMCPFetchResponse
Classic MCP Fetch Response interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ClassicMCPFetchResponse } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface ClassicMCPFetchResponse {
status?: number;
headers?: Record<string, string>;
body?: string;
json?: unknown;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
body | property | body?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
headers | property | headers?: Record<string, string> | Public property; its type, readonly modifier and optionality are shown in the signature. |
json | property | json?: unknown | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
ClassicMCPMockGatewayOptions
Classic MCP Mock Gateway Options interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { ClassicMCPMockGatewayOptions } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface ClassicMCPMockGatewayOptions {
files?: Record<string, string>;
fetchResponses?: Record<string, ClassicMCPFetchResponse>;
now?: string;
searchResults?: Record<string, ClassicMCPSearchResult[]>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
fetchResponses | property | fetchResponses?: Record<string, ClassicMCPFetchResponse> | Public property; its type, readonly modifier and optionality are shown in the signature. |
files | property | files?: Record<string, string> | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | property | now?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
searchResults | property | searchResults?: Record<string, ClassicMCPSearchResult[]> | Public property; its type, readonly modifier and optionality are shown in the signature. |
ClassicMCPSearchResult
Classic MCP Search Result interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { ClassicMCPSearchResult } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface ClassicMCPSearchResult {
title: string;
url: string;
snippet: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
snippet | property | snippet: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
title | property | title: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
url | property | url: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPCapabilityDescriptor
MCP Capability Descriptor interface with 21 public fields or methods.
- Kind: interface
- Import:
import type { MCPCapabilityDescriptor } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPCapabilityDescriptor extends VersionedSpec, SpecMetadata {
serverId: string;
capabilityId: string;
type: 'tool' | 'resource' | 'prompt';
inputSchema?: JsonSchema;
outputSchema?: JsonSchema;
sideEffectLevel?: SideEffectLevel;
permissionScope?: string[];
capabilityHash?: string;
trustLevel?: 'trusted' | 'reviewed' | 'untrusted';
declarationSource?: 'framework' | 'user' | 'server' | 'unknown';
annotations?: Record<string, unknown>;
protocolVersion?: string;
serverIdentity?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
annotations | property | annotations?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilityHash | property | capabilityHash?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilityId | property | capabilityId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
createdAt | property | createdAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
declarationSource | property | declarationSource?: "unknown" | "user" | "framework" | "server" | Public property; its type, readonly modifier and optionality are shown in the signature. |
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
inputSchema | property | inputSchema?: JsonSchema | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
outputSchema | property | outputSchema?: JsonSchema | Public property; its type, readonly modifier and optionality are shown in the signature. |
owner | property | owner?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
permissionScope | property | permissionScope?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
protocolVersion | property | protocolVersion?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
serverId | property | serverId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
serverIdentity | property | serverIdentity?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
sideEffectLevel | property | sideEffectLevel?: SideEffectLevel | Public property; its type, readonly modifier and optionality are shown in the signature. |
tags | property | tags?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
trustLevel | property | trustLevel?: "trusted" | "reviewed" | "untrusted" | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "tool" | "prompt" | "resource" | Public property; its type, readonly modifier and optionality are shown in the signature. |
updatedAt | property | updatedAt?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPGateway
MCP Gateway interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { MCPGateway } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPGateway {
discover(integration: MCPIntegrationSpec): Promise<MCPCapabilityDescriptor[]>;
normalize(capability: MCPCapabilityDescriptor): Promise<NormalizedMCPCapability>;
call(request: MCPToolCallRequest): Promise<unknown>;
/** @deprecated Use call(). Kept for adapters migrating from the classic gateway contract. */
callTool?(request: MCPToolCallRequest): Promise<unknown>;
readResource?(request: MCPResourceReadRequest): Promise<MCPResourceResult>;
getPrompt?(request: MCPPromptRequest): Promise<MCPPromptResult>;
health(serverId?: string): Promise<Record<string, import('@codesoul-co/hypha-tools').ProviderHealth>>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
call | method | call(request: MCPToolCallRequest): Promise<unknown> | Public method; parameters and return type are shown in the signature. |
callTool | method | callTool?(request: MCPToolCallRequest): Promise<unknown> | Public method; parameters and return type are shown in the signature. |
discover | method | discover(integration: MCPIntegrationSpec): Promise<MCPCapabilityDescriptor[]> | Public method; parameters and return type are shown in the signature. |
getPrompt | method | getPrompt?(request: MCPPromptRequest): Promise<MCPPromptResult> | Public method; parameters and return type are shown in the signature. |
health | method | health(serverId?: string): Promise<Record<string, import("@codesoul-co/hypha-tools").ProviderHealth>> | Public method; parameters and return type are shown in the signature. |
normalize | method | normalize(capability: MCPCapabilityDescriptor): Promise<NormalizedMCPCapability> | Public method; parameters and return type are shown in the signature. |
readResource | method | readResource?(request: MCPResourceReadRequest): Promise<MCPResourceResult> | Public method; parameters and return type are shown in the signature. |
MCPGatewayToolRegistrationContext
MCP Gateway Tool Registration Context interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MCPGatewayToolRegistrationContext } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPGatewayToolRegistrationContext {
runId: string;
stepId?: string;
sessionId?: string;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
runId | property | runId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sessionId | property | sessionId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stepId | property | stepId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPGatewayToolRegistrationOptions
MCP Gateway Tool Registration Options interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { MCPGatewayToolRegistrationOptions } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPGatewayToolRegistrationOptions {
integration: MCPIntegrationSpec;
gateway: MCPGateway;
registry: ToolRegistry;
trace?: TraceRecorder;
traceContext?: MCPGatewayToolRegistrationContext;
baselineStore?: MCPCapabilityBaselineStore;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
baselineStore | property | baselineStore?: MCPCapabilityBaselineStore | Public property; its type, readonly modifier and optionality are shown in the signature. |
gateway | property | gateway: MCPGateway | Public property; its type, readonly modifier and optionality are shown in the signature. |
integration | property | integration: MCPIntegrationSpec | Public property; its type, readonly modifier and optionality are shown in the signature. |
registry | property | registry: ToolRegistry | Public property; its type, readonly modifier and optionality are shown in the signature. |
trace | property | trace?: TraceRecorder | Public property; its type, readonly modifier and optionality are shown in the signature. |
traceContext | property | traceContext?: MCPGatewayToolRegistrationContext | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPGatewayToolRegistrationResult
MCP Gateway Tool Registration Result interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { MCPGatewayToolRegistrationResult } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPGatewayToolRegistrationResult {
discoveredCapabilities: MCPCapabilityDescriptor[];
normalizedCapabilities: NormalizedMCPCapability[];
registeredTools: ToolSpec[];
quarantinedCapabilities: MCPCapabilityDescriptor[];
driftRecords: MCPDriftRecord[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
discoveredCapabilities | property | discoveredCapabilities: MCPCapabilityDescriptor[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
driftRecords | property | driftRecords: MCPDriftRecord[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
normalizedCapabilities | property | normalizedCapabilities: NormalizedMCPCapability[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
quarantinedCapabilities | property | quarantinedCapabilities: MCPCapabilityDescriptor[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
registeredTools | property | registeredTools: ToolSpec[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPIntegrationSpec
MCP Integration Spec interface with 13 public fields or methods.
- Kind: interface
- Import:
import type { MCPIntegrationSpec } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPIntegrationSpec {
id: string;
version: string;
servers: MCPServerSpec[];
allowedCapabilities?: string[];
deniedCapabilities?: string[];
trustPolicy?: string;
importPolicy?: string;
resourcePolicy?: string;
toolPolicy?: string;
promptPolicy?: string;
versionPinning?: boolean;
capabilityHashing?: boolean;
driftPolicy?: MCPDriftPolicy;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
allowedCapabilities | property | allowedCapabilities?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilityHashing | property | capabilityHashing?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
deniedCapabilities | property | deniedCapabilities?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
driftPolicy | property | driftPolicy?: MCPDriftPolicy | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
importPolicy | property | importPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
promptPolicy | property | promptPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
resourcePolicy | property | resourcePolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
servers | property | servers: MCPServerSpec[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
toolPolicy | property | toolPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
trustPolicy | property | trustPolicy?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
versionPinning | property | versionPinning?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPPromptRequest
MCP Prompt Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MCPPromptRequest } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPPromptRequest {
serverId: string;
name: string;
arguments?: Record<string, string>;
context?: Partial<ToolCallContext>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
arguments | property | arguments?: Record<string, string> | Public property; its type, readonly modifier and optionality are shown in the signature. |
context | property | context?: Partial<ToolCallContext> | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
serverId | property | serverId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPPromptResult
MCP Prompt Result interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MCPPromptResult } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPPromptResult {
description?: string;
messages: unknown[];
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
description | property | description?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
messages | property | messages: unknown[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPResourceReadRequest
MCP Resource Read Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MCPResourceReadRequest } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPResourceReadRequest {
serverId: string;
uri: string;
context?: Partial<ToolCallContext>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
context | property | context?: Partial<ToolCallContext> | Public property; its type, readonly modifier and optionality are shown in the signature. |
serverId | property | serverId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
uri | property | uri: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPResourceResult
MCP Resource Result interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MCPResourceResult } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPResourceResult {
contents: Array<{
uri: string;
mimeType?: string;
text?: string;
blob?: string;
metadata?: Record<string, unknown>;
}>;
metadata?: Record<string, unknown>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
contents | property | contents: { uri: string; mimeType?: string; text?: string; blob?: string; metadata?: Record<string, unknown>; }[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
metadata | property | metadata?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPServerSpec
MCP Server Spec interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { MCPServerSpec } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPServerSpec {
id: string;
mode: 'local' | 'remote';
version?: string;
endpoint?: string;
command?: string;
args?: string[];
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
args | property | args?: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
command | property | command?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
endpoint | property | endpoint?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
id | property | id: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
mode | property | mode: "local" | "remote" | Public property; its type, readonly modifier and optionality are shown in the signature. |
version | property | version?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPToolCallRequest
MCP Tool Call Request interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MCPToolCallRequest } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface MCPToolCallRequest<TInput = unknown> {
serverId: string;
capabilityId: string;
input: TInput;
context: ToolCallContext;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
capabilityId | property | capabilityId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
context | property | context: ToolCallContext | Public property; its type, readonly modifier and optionality are shown in the signature. |
input | property | input: TInput | Public property; its type, readonly modifier and optionality are shown in the signature. |
serverId | property | serverId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
NormalizedMCPCapability
Normalized MCP Capability interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { NormalizedMCPCapability } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export interface NormalizedMCPCapability {
serverId: string;
capabilityId: string;
type: 'tool' | 'resource' | 'prompt';
normalizedSpecId: string;
capabilityHash?: string;
sideEffectLevel?: SideEffectLevel;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
capabilityHash | property | capabilityHash?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
capabilityId | property | capabilityId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
normalizedSpecId | property | normalizedSpecId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
serverId | property | serverId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
sideEffectLevel | property | sideEffectLevel?: SideEffectLevel | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "tool" | "prompt" | "resource" | Public property; its type, readonly modifier and optionality are shown in the signature. |
MCPToolHandler
Public type alias for MCP Tool Handler; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { MCPToolHandler } from '@codesoul-co/hypha-mcp'; - Source module:
index
Declaration
export type MCPToolHandler<TInput = unknown, TOutput = unknown> = (request: MCPToolCallRequest<TInput>) => Promise<TOutput> | TOutput;