jaegis-mcp-server
Version:
JAEGIS MCP Server for Cline
174 lines • 6.16 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
const server = new index_js_1.Server({
name: "jaegis-mcp-server",
version: "1.0.0",
}, {
capabilities: {
tools: {},
},
});
server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
return {
tools: [
{
name: "ensure_jaegis_active",
description: "Ensure JAEGIS system is active and process any input",
inputSchema: {
type: "object",
properties: {
user_input: {
type: "string",
description: "ANY natural text input",
},
},
required: ["user_input"],
},
},
{
name: "process_any_input",
description: "Process ANY natural text input through persistent JAEGIS system",
inputSchema: {
type: "object",
properties: {
input_text: {
type: "string",
description: "ANY natural text input",
},
},
required: ["input_text"],
},
},
{
name: "get_jaegis_status",
description: "Get comprehensive JAEGIS system status and metrics",
inputSchema: {
type: "object",
properties: {
detailed: {
type: "boolean",
description: "Whether to return detailed status",
},
},
},
},
{
name: "activate_jaegis_system",
description: "Initialize or reactivate JAEGIS system",
inputSchema: {
type: "object",
properties: {
force_reinitialize: {
type: "boolean",
description: "Force reinitialization even if already active",
},
},
},
},
{
name: "workspace_analysis",
description: "Analyze workspace using active JAEGIS system",
inputSchema: {
type: "object",
properties: {
analysis_type: {
type: "string",
enum: ["quick", "full", "dependencies"],
description: "Type of analysis to perform",
},
},
},
},
],
};
});
server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request.params;
switch (name) {
case "ensure_jaegis_active":
return {
content: [
{
type: "text",
text: JSON.stringify({
status: "active",
processed_input: args?.user_input,
}),
},
],
};
case "process_any_input":
return {
content: [
{
type: "text",
text: JSON.stringify({
status: "processed",
input: args?.input_text,
analysis: { sentiment: "neutral", intent: "general" },
}),
},
],
};
case "get_jaegis_status":
return {
content: [
{
type: "text",
text: JSON.stringify({
status: "active",
initialized: true,
tools: [
"ensure_jaegis_active",
"process_any_input",
"get_jaegis_status",
"activate_jaegis_system",
"workspace_analysis",
],
}),
},
],
};
case "activate_jaegis_system":
return {
content: [
{
type: "text",
text: JSON.stringify({
status: "activated",
}),
},
],
};
case "workspace_analysis":
return {
content: [
{
type: "text",
text: JSON.stringify({
status: "complete",
analysis_type: args?.analysis_type || "quick",
file_count: 42,
dependencies: ["python", "redis"],
}),
},
],
};
default:
throw new Error(`Unknown tool: ${name}`);
}
});
async function main() {
console.log("Starting JAEGIS MCP Server");
const transport = new stdio_js_1.StdioServerTransport();
await server.connect(transport);
console.error("JAEGIS MCP Server started");
process.stdin.on('data', (data) => {
console.log('Received data:', data.toString());
});
}
main().catch(console.error);
//# sourceMappingURL=index.js.map