Skip to content

Commit 60020e0

Browse files
committed
feat(mcp): register mcp server routes
1 parent dfb67d0 commit 60020e0

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@athenna/core",
3-
"version": "5.33.0",
3+
"version": "5.34.0",
44
"description": "One foundation for multiple applications.",
55
"license": "MIT",
66
"author": "João Lenon <lenon@athenna.io>",

src/applications/Http.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export class Http {
5050
host: Config.get('http.host', '127.0.0.1'),
5151
port: Config.get('http.port', 3000),
5252
routePath: Config.get('rc.http.route', Path.routes(`http.${Path.ext()}`)),
53+
mcpRoutePath: Config.get('rc.mcp.route', Path.routes(`mcp.${Path.ext()}`)),
5354
kernelPath: Config.get(
5455
'rc.http.kernel',
5556
'@athenna/http/kernels/HttpKernel'
@@ -117,6 +118,7 @@ export class Http {
117118
await kernel.registerRTracer()
118119
await kernel.registerLoggerTerminator()
119120
await kernel.registerRoutes(options.routePath)
121+
await kernel.registerMcpRoutes(options.mcpRoutePath)
120122

121123
if (Config.is('rc.bootLogs', true)) {
122124
Log.channelOrVanilla('application').success(

src/types/HttpOptions.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ export type HttpOptions = {
5555
*/
5656
routePath?: string
5757

58+
/**
59+
* The path to the mcp server routes.
60+
*
61+
* @default Path.routes(`mcp.${Path.ext()}`)
62+
*/
63+
mcpRoutePath?: string
64+
5865
/**
5966
* The path to the HttpKernel. The http kernel is responsible to register controllers,
6067
* all kind of middlewares, plugins and the exception handler for requests. By default,

0 commit comments

Comments
 (0)