fix(api): remove MCP server
MCP server is overkill for this use case — all 5 MCP tools are thin wrappers over the REST API. Paperclip agents should use the REST API directly with bearer token auth instead. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
+2
-10
@@ -7,7 +7,6 @@ import { serve } from '@hono/node-server';
|
|||||||
import * as k8s from '@kubernetes/client-node';
|
import * as k8s from '@kubernetes/client-node';
|
||||||
import { createApp } from './app.js';
|
import { createApp } from './app.js';
|
||||||
import { loadConfig } from './config.js';
|
import { loadConfig } from './config.js';
|
||||||
import { startMcpServer } from './mcp/server.js';
|
|
||||||
import { connectTemporal, disconnectTemporal } from './services/temporal-client.js';
|
import { connectTemporal, disconnectTemporal } from './services/temporal-client.js';
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
async function main(): Promise<void> {
|
||||||
@@ -35,21 +34,14 @@ async function main(): Promise<void> {
|
|||||||
coreApi,
|
coreApi,
|
||||||
});
|
});
|
||||||
|
|
||||||
// 5. Start MCP server (runs alongside the Hono API on a separate port)
|
// 5. Start Hono server
|
||||||
const mcpServer = await startMcpServer(
|
|
||||||
{ config, temporalClient: temporal.client, batchApi, coreApi },
|
|
||||||
config.mcpPort,
|
|
||||||
);
|
|
||||||
|
|
||||||
// 6. Start Hono server
|
|
||||||
const server = serve({ fetch: app.fetch, port: config.port }, (info) => {
|
const server = serve({ fetch: app.fetch, port: config.port }, (info) => {
|
||||||
console.log(`Shannon API server listening on port ${info.port}`);
|
console.log(`Shannon API server listening on port ${info.port}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 7. Graceful shutdown
|
// 6. Graceful shutdown
|
||||||
const shutdown = async (): Promise<void> => {
|
const shutdown = async (): Promise<void> => {
|
||||||
console.log('Shutting down...');
|
console.log('Shutting down...');
|
||||||
mcpServer.close();
|
|
||||||
server.close();
|
server.close();
|
||||||
await disconnectTemporal(temporal);
|
await disconnectTemporal(temporal);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user