Package dev.tachyonmcp.core.server
Interface TachyonServer
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
ServerEngine
The one public type users hold — an MCP server that is
AutoCloseable.
Created via builder() (Java) or TachyonServer(port) { } (Kotlin).
Call close() to shut down the transport and release all resources.
Kotlin users get .use { } from the stdlib via AutoCloseable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ServerBuilderbuilder()voidclose()Shuts down the server and releases its resources.Returns the completion registry.config()Returns the server configuration.Returns the registered extensions.host()Returns the host the server is bound to, or the configured host if not yet started.intport()Returns the port the server is bound to.prompts()Returns the prompt registry.Returns the resource registry.voidstart()Starts the configured transport.tasks()Returns the task registry.tools()Returns the tool registry.
-
Method Details
-
tools
Tools tools()Returns the tool registry. -
resources
Resources resources()Returns the resource registry. -
prompts
Prompts prompts()Returns the prompt registry. -
tasks
Tasks tasks()Returns the task registry. -
completions
Completions completions()Returns the completion registry. -
notifications
Notifications notifications() -
start
void start()Starts the configured transport. Feature registries may be populated before this call. -
port
int port()Returns the port the server is bound to.- Throws:
IllegalStateException- if the server has not been started
-
host
String host()Returns the host the server is bound to, or the configured host if not yet started. Only meaningful afterstart()or equivalent. -
config
ServerConfig config()Returns the server configuration. -
extensions
List<ServerExtension> extensions()Returns the registered extensions. -
close
void close()Shuts down the server and releases its resources.- Specified by:
closein interfaceAutoCloseable
-
builder
-