Skip to main content

McpServiceParameters

@webda/mcp


Class: McpServiceParameters

Defined in: packages/mcp/src/mcpservice.service.ts:31

Parameters for the MCP transport

Extends​

  • OperationsTransportParameters

Constructors​

Constructor​

new McpServiceParameters(): McpServiceParameters

Returns​

McpServiceParameters

Inherited from​

OperationsTransportParameters.constructor

Properties​

allowedHosts?​

optional allowedHosts?: string[]

Defined in: packages/mcp/src/mcpservice.service.ts:57

Hostnames (any port) accepted in the request Host, against DNS rebinding; "*" disables the check

Default​

["localhost","127.0.0.1","::1"]

allowedOrigins?​

optional allowedOrigins?: string[]

Defined in: packages/mcp/src/mcpservice.service.ts:51

Extra Origin values accepted besides the request's own origin

Default​

[]

authenticator?​

optional authenticator?: string

Defined in: packages/mcp/src/mcpservice.service.ts:89

Name of a service implementing McpAuthenticator; default uses the Webda session


maxOutputBytes?​

optional maxOutputBytes?: number

Defined in: packages/mcp/src/mcpservice.service.ts:68

Larger tool/resource outputs are truncated

Default​

1048576

maxSessions?​

optional maxSessions?: number

Defined in: packages/mcp/src/mcpservice.service.ts:63

Maximum number of concurrent MCP HTTP sessions; at the limit the least recently used session is closed to make room for a new one

Default​

1000

operations?​

optional operations?: string[]

Defined in: packages/core/lib/services/operationstransport.d.ts:13

List of operations to include/exclude Supports wildcards and negation: ["*", "!User.Delete"]

Default​

["*"]

Inherited from​

OperationsTransportParameters.operations


resources?​

optional resources?: false | { models?: string[]; }

Defined in: packages/mcp/src/mcpservice.service.ts:41

Models exposed as resources (short ids or "*"); false disables resources

Default​

{"models":["*"]}

serverName?​

optional serverName?: string

Defined in: packages/mcp/src/mcpservice.service.ts:72

Server name announced to clients (defaults to the application package name)


serverVersion?​

optional serverVersion?: string

Defined in: packages/mcp/src/mcpservice.service.ts:76

Server version announced to clients (defaults to the application package version)


sessionTimeout?​

optional sessionTimeout?: number

Defined in: packages/mcp/src/mcpservice.service.ts:46

Seconds of inactivity before an MCP session is evicted

Default​

1800

stdio?​

optional stdio?: object

Defined in: packages/mcp/src/mcpservice.service.ts:80

stdio defaults

user?​

optional user?: string

Default user for webda mcp


type​

type: string

Defined in: packages/core/lib/services/serviceparameters.d.ts:8

Type of the service

Inherited from​

OperationsTransportParameters.type


url?​

optional url?: string | false

Defined in: packages/mcp/src/mcpservice.service.ts:36

HTTP endpoint; false disables HTTP (stdio only)

Default​

"/mcp"

Methods​

isIncluded()​

isIncluded(operationId): boolean

Defined in: packages/core/lib/services/operationstransport.d.ts:37

Check if an operation is included by this transport

Parameters​

operationId​

string

the operation identifier

Returns​

boolean

true if the operation is included

Inherited from​

OperationsTransportParameters.isIncluded


load()​

load(params?): this

Defined in: packages/mcp/src/mcpservice.service.ts:95

Parameters​

params?​

any = {}

raw parameters

Returns​

this

this with defaults applied

Overrides​

OperationsTransportParameters.load


update()​

update(params, delta): this

Defined in: packages/core/lib/services/serviceparameters.d.ts:25

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

OperationsTransportParameters.update


with()​

with(callback): this

Defined in: packages/core/lib/services/serviceparameters.d.ts:31

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

OperationsTransportParameters.with