Theia API Documentation v1.65.0
Eclipse Theia Website
GitHub
Preparing search index...
@theia/ai-mcp
node/mcp-server-manager-impl
MCPServerManagerImpl
Class MCPServerManagerImpl
Implements
MCPServerManager
Index
Constructors
constructor
Properties
clients
server
Listeners
servers
Methods
add
Or
Update
Server
call
Tool
disconnect
Client
get
Resources
get
Running
Servers
get
Server
Description
get
Server
Names
get
Tools
read
Resource
remove
Server
set
Client
start
Server
stop
Server
Constructors
constructor
new
MCPServerManagerImpl
()
:
MCPServerManagerImpl
Returns
MCPServerManagerImpl
Properties
Protected
clients
clients
:
MCPFrontendNotificationService
[]
= []
Protected
server
Listeners
serverListeners
:
Map
<
string
,
Disposable
>
= ...
Protected
servers
servers
:
Map
<
string
,
MCPServer
>
= ...
Methods
add
Or
Update
Server
addOrUpdateServer
(
description
:
MCPServerDescription
)
:
void
Parameters
description
:
MCPServerDescription
Returns
void
call
Tool
callTool
(
serverName
:
string
,
toolName
:
string
,
arg_string
:
string
,
)
:
Promise
<
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
content
:
(
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
text
:
string
;
type
:
"text"
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
data
:
string
;
mimeType
:
string
;
type
:
"image"
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
data
:
string
;
mimeType
:
string
;
type
:
"audio"
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
description
?:
string
;
icons
?:
{
mimeType
?:
string
;
sizes
?:
string
;
src
:
string
;
[
key
:
string
]:
unknown
;
}
[]
;
mimeType
?:
string
;
name
:
string
;
title
?:
string
;
type
:
"resource_link"
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
resource
:
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
mimeType
?:
string
;
text
:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
blob
:
string
;
mimeType
?:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
;
type
:
"resource"
;
[
key
:
string
]:
unknown
;
}
)
[]
;
isError
?:
boolean
;
structuredContent
?:
{
[
key
:
string
]:
unknown
}
;
[
key
:
string
]:
unknown
;
}
,
>
Parameters
serverName
:
string
toolName
:
string
arg_string
:
string
Returns
Promise
<
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
content
:
(
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
text
:
string
;
type
:
"text"
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
data
:
string
;
mimeType
:
string
;
type
:
"image"
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
data
:
string
;
mimeType
:
string
;
type
:
"audio"
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
description
?:
string
;
icons
?:
{
mimeType
?:
string
;
sizes
?:
string
;
src
:
string
;
[
key
:
string
]:
unknown
;
}
[]
;
mimeType
?:
string
;
name
:
string
;
title
?:
string
;
type
:
"resource_link"
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
resource
:
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
mimeType
?:
string
;
text
:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
blob
:
string
;
mimeType
?:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
;
type
:
"resource"
;
[
key
:
string
]:
unknown
;
}
)
[]
;
isError
?:
boolean
;
structuredContent
?:
{
[
key
:
string
]:
unknown
}
;
[
key
:
string
]:
unknown
;
}
,
>
disconnect
Client
disconnectClient
(
client
:
MCPFrontendNotificationService
)
:
void
Parameters
client
:
MCPFrontendNotificationService
Returns
void
get
Resources
getResources
(
serverName
:
string
,
)
:
Promise
<
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
nextCursor
?:
string
;
resources
:
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
description
?:
string
;
icons
?:
{
mimeType
?:
string
;
sizes
?:
string
;
src
:
string
;
[
key
:
string
]:
unknown
;
}
[]
;
mimeType
?:
string
;
name
:
string
;
title
?:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
[]
;
[
key
:
string
]:
unknown
;
}
,
>
Parameters
serverName
:
string
Returns
Promise
<
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
nextCursor
?:
string
;
resources
:
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
description
?:
string
;
icons
?:
{
mimeType
?:
string
;
sizes
?:
string
;
src
:
string
;
[
key
:
string
]:
unknown
;
}
[]
;
mimeType
?:
string
;
name
:
string
;
title
?:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
[]
;
[
key
:
string
]:
unknown
;
}
,
>
get
Running
Servers
getRunningServers
()
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
get
Server
Description
getServerDescription
(
name
:
string
)
:
Promise
<
undefined
|
MCPServerDescription
>
Parameters
name
:
string
Returns
Promise
<
undefined
|
MCPServerDescription
>
get
Server
Names
getServerNames
()
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
get
Tools
getTools
(
serverName
:
string
,
)
:
Promise
<
objectOutputType
<
{
_meta
:
ZodOptional
<
ZodObject
<
{}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
{}
,
ZodTypeAny
,
"passthrough"
>
,
objectInputType
<
{}
,
ZodTypeAny
,
"passthrough"
>
,
>
,
>
;
}
&
{
nextCursor
:
ZodOptional
<
ZodString
>
}
&
{
tools
:
ZodArray
<
ZodObject
<
{
name
:
ZodString
;
title
:
ZodOptional
<
ZodString
>
}
&
{
_meta
:
ZodOptional
<
ZodObject
<
{}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
,
>
;
annotations
:
ZodOptional
<
ZodObject
<
{
destructiveHint
:
...
;
idempotentHint
:
...
;
openWorldHint
:
...
;
readOnlyHint
:
...
;
title
:
...
;
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
,
>
;
description
:
ZodOptional
<
ZodString
>
;
icons
:
ZodOptional
<
ZodArray
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
"many"
>
,
>
;
inputSchema
:
ZodObject
<
{
properties
:
ZodOptional
<
(...)
>
;
required
:
ZodOptional
<
(...)
>
;
type
:
ZodLiteral
<
(...)
>
;
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
ZodTypeAny
,
"passthrough"
,
>
,
objectInputType
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
ZodTypeAny
,
"passthrough"
,
>
,
>
;
outputSchema
:
ZodOptional
<
ZodObject
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
,
>
;
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
{
name
:
ZodString
;
title
:
ZodOptional
<
ZodString
>
}
&
{
_meta
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
>
;
annotations
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
>
;
description
:
ZodOptional
<
ZodString
>
;
icons
:
ZodOptional
<
ZodArray
<
(...)
,
(...)
>
>
;
inputSchema
:
ZodObject
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
;
outputSchema
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
>
;
}
,
ZodTypeAny
,
"passthrough"
,
>
,
objectInputType
<
{
name
:
ZodString
;
title
:
ZodOptional
<
ZodString
>
}
&
{
_meta
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
>
;
annotations
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
>
;
description
:
ZodOptional
<
ZodString
>
;
icons
:
ZodOptional
<
ZodArray
<
(...)
,
(...)
>
>
;
inputSchema
:
ZodObject
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
;
outputSchema
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
>
;
}
,
ZodTypeAny
,
"passthrough"
,
>
,
>
,
"many"
,
>
;
}
,
ZodTypeAny
,
"passthrough"
,
>
,
>
Parameters
serverName
:
string
Returns
Promise
<
objectOutputType
<
{
_meta
:
ZodOptional
<
ZodObject
<
{}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
{}
,
ZodTypeAny
,
"passthrough"
>
,
objectInputType
<
{}
,
ZodTypeAny
,
"passthrough"
>
,
>
,
>
;
}
&
{
nextCursor
:
ZodOptional
<
ZodString
>
}
&
{
tools
:
ZodArray
<
ZodObject
<
{
name
:
ZodString
;
title
:
ZodOptional
<
ZodString
>
}
&
{
_meta
:
ZodOptional
<
ZodObject
<
{}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
,
>
;
annotations
:
ZodOptional
<
ZodObject
<
{
destructiveHint
:
...
;
idempotentHint
:
...
;
openWorldHint
:
...
;
readOnlyHint
:
...
;
title
:
...
;
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
,
>
;
description
:
ZodOptional
<
ZodString
>
;
icons
:
ZodOptional
<
ZodArray
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
"many"
>
,
>
;
inputSchema
:
ZodObject
<
{
properties
:
ZodOptional
<
(...)
>
;
required
:
ZodOptional
<
(...)
>
;
type
:
ZodLiteral
<
(...)
>
;
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
ZodTypeAny
,
"passthrough"
,
>
,
objectInputType
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
ZodTypeAny
,
"passthrough"
,
>
,
>
;
outputSchema
:
ZodOptional
<
ZodObject
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
,
>
;
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
{
name
:
ZodString
;
title
:
ZodOptional
<
ZodString
>
}
&
{
_meta
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
>
;
annotations
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
>
;
description
:
ZodOptional
<
ZodString
>
;
icons
:
ZodOptional
<
ZodArray
<
(...)
,
(...)
>
>
;
inputSchema
:
ZodObject
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
;
outputSchema
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
>
;
}
,
ZodTypeAny
,
"passthrough"
,
>
,
objectInputType
<
{
name
:
ZodString
;
title
:
ZodOptional
<
ZodString
>
}
&
{
_meta
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
>
;
annotations
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
>
;
description
:
ZodOptional
<
ZodString
>
;
icons
:
ZodOptional
<
ZodArray
<
(...)
,
(...)
>
>
;
inputSchema
:
ZodObject
<
{
properties
:
...
;
required
:
...
;
type
:
...
}
,
"passthrough"
,
ZodTypeAny
,
objectOutputType
<
(...)
,
(...)
,
(...)
>
,
objectInputType
<
(...)
,
(...)
,
(...)
>
,
>
;
outputSchema
:
ZodOptional
<
ZodObject
<
(...)
,
(...)
,
(...)
,
(...)
,
(...)
>
,
>
;
}
,
ZodTypeAny
,
"passthrough"
,
>
,
>
,
"many"
,
>
;
}
,
ZodTypeAny
,
"passthrough"
,
>
,
>
read
Resource
readResource
(
serverName
:
string
,
resourceId
:
string
,
)
:
Promise
<
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
contents
:
(
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
mimeType
?:
string
;
text
:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
blob
:
string
;
mimeType
?:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
)
[]
;
[
key
:
string
]:
unknown
;
}
,
>
Parameters
serverName
:
string
resourceId
:
string
Returns
Promise
<
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
contents
:
(
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
mimeType
?:
string
;
text
:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
|
{
_meta
?:
{
[
key
:
string
]:
unknown
}
;
blob
:
string
;
mimeType
?:
string
;
uri
:
string
;
[
key
:
string
]:
unknown
;
}
)
[]
;
[
key
:
string
]:
unknown
;
}
,
>
remove
Server
removeServer
(
name
:
string
)
:
void
Parameters
name
:
string
Returns
void
set
Client
setClient
(
client
:
MCPFrontendNotificationService
)
:
void
Parameters
client
:
MCPFrontendNotificationService
Returns
void
start
Server
startServer
(
serverName
:
string
)
:
Promise
<
void
>
Parameters
serverName
:
string
Returns
Promise
<
void
>
stop
Server
stopServer
(
serverName
:
string
)
:
Promise
<
void
>
Parameters
serverName
:
string
Returns
Promise
<
void
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
clients
server
Listeners
servers
Methods
add
Or
Update
Server
call
Tool
disconnect
Client
get
Resources
get
Running
Servers
get
Server
Description
get
Server
Names
get
Tools
read
Resource
remove
Server
set
Client
start
Server
stop
Server
Eclipse Theia Website
GitHub
Theia API Documentation v1.65.0
Loading...