Kest

Search

Search the documentation

MCP

Transports

How an assistant reaches your server.

A transport is how the assistant's messages reach your application. Kest serves MCP over HTTP: the assistant POSTs JSON-RPC messages to one URL.

app.http(NettyHttpAdapter(8080)) { useMiddleware(mcp.middleware("/mcp")) }       // https://your-host/mcp

The server speaks JSON-RPC 2.0 (MCP revisions 2025-06-18, 2025-03-26 and 2024-11-05) over HTTP POST to one endpoint, the "Streamable HTTP" transport without server-sent streaming.

  • Single messages and batches are accepted; notifications get 202 with no body.
  • Supported methods: initialize, ping, tools/list, tools/call, resources/list, resources/read, prompts/list, prompts/get.

Security

An MCP endpoint can run actions in your system, so protect it:

Setting
bearerToken = "..."requires Authorization: Bearer ... (a wrong or missing token is 401)
authorize = { request -> ... }your own check, run after the token check (a team header, an IP allow-list)
allowedOriginsrejects browser requests from other origins (protects a local server from other websites; empty allows any)

Serve it over HTTPS, give each client its own token if you can, and offer only the tools you want exposed.

Loading diagram…

Not supported

The stdio transport (an assistant starting your program and talking over standard input), server-sent streaming, resource templates and subscriptions, and OAuth for the MCP endpoint. A client that needs stdio can run a small bridge that forwards to the HTTP endpoint.

Read more