Skip to main content
Glama

Shell Command MCP Server

by kaznak
index.ts865 B
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { setTool as setSyncTool } from './execute-bash-script-sync.js'; import { setTool as setAsyncTool } from './execute-bash-script-async.js'; // Create an MCP server export const server = new McpServer({ name: 'shell-command-mcp', // TODO change to llm-workspace or something version: '1.0.0', }); setSyncTool(server); setAsyncTool(server); async function main() { try { // Start receiving messages on stdin and sending messages on stdout const transport = new StdioServerTransport(); await server.connect(transport); console.error('Shell Command MCP Server started'); } catch (error) { console.error('Fatal error starting server:', error); process.exit(1); } } main();

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/kaznak/shell-command-mcp'

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