Skip to content

Commit fc861d8

Browse files
authored
Merge pull request #270 from AthennaIO/develop
feat(mcp): register mcp server routes
2 parents 36d07b4 + fc18bb5 commit fc861d8

4 files changed

Lines changed: 15 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.35.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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ 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(
54+
'rc.mcp.route',
55+
Path.routes(`mcp.${Path.ext()}`)
56+
),
5357
kernelPath: Config.get(
5458
'rc.http.kernel',
5559
'@athenna/http/kernels/HttpKernel'
@@ -117,6 +121,7 @@ export class Http {
117121
await kernel.registerRTracer()
118122
await kernel.registerLoggerTerminator()
119123
await kernel.registerRoutes(options.routePath)
124+
await kernel.registerRoutes(options.mcpRoutePath)
120125

121126
if (Config.is('rc.bootLogs', true)) {
122127
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)