Skip to main content
Glama
server.ts1.22 kB
/** * Teamserver-related MCP tools */ import { Tool } from '@modelcontextprotocol/sdk/types.js'; import { CobaltStrikeClient } from '../api/client.js'; export function createServerTools(client: CobaltStrikeClient): Tool[] { return [ { name: 'get_teamserver_info', description: 'Get information about the Cobalt Strike teamserver (version, license, stats)', inputSchema: { type: 'object', properties: {}, }, }, { name: 'test_connection', description: 'Test the connection to the Cobalt Strike REST API server', inputSchema: { type: 'object', properties: {}, }, }, ]; } export async function handleServerTool( name: string, args: any, client: CobaltStrikeClient ): Promise<string> { switch (name) { case 'get_teamserver_info': const info = await client.getTeamServerInfo(); return JSON.stringify(info, null, 2); case 'test_connection': const connected = await client.testConnection(); return JSON.stringify({ connected, message: connected ? 'Connection successful' : 'Connection failed' }, null, 2); default: throw new Error(`Unknown server tool: ${name}`); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MickeyDB/Cobalt-Strike-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server