mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-18 04:54:33 +00:00
feat(mcp): add 'codeburn mcp' stdio command with stdout guard
This commit is contained in:
parent
1e54967d97
commit
94e6b77672
1 changed files with 10 additions and 0 deletions
10
src/main.ts
10
src/main.ts
|
|
@ -958,4 +958,14 @@ program
|
|||
await runAgyStatusLineHook()
|
||||
})
|
||||
|
||||
program
|
||||
.command('mcp')
|
||||
.description('Run a Model Context Protocol server (stdio) exposing usage + savings to AI agents')
|
||||
.action(async () => {
|
||||
// stdout MUST carry only JSON-RPC; route stray logs to stderr.
|
||||
console.log = ((...args: unknown[]) => process.stderr.write(args.join(' ') + '\n')) as typeof console.log
|
||||
const { startStdioServer } = await import('./mcp/server.js')
|
||||
await startStdioServer(version)
|
||||
})
|
||||
|
||||
program.parse()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue