> As in, how MCP client can access `git` command without stdio?
MCP clients don't access any commands. MCP clients access tools that MCP servers expose.
MCP clients don't access any commands. MCP clients access tools that MCP servers expose.
try {
const execPromise = promisify(exec);
const { stdout, stderr } = await execPromise(command);
if (stderr) {
return {
content: [{
type: "text",
text: `Error: ${stderr}`
}],
isError: true
};
}
return {
content: [{
type: "text",
text: stdout
}],
isError: false
};
} catch (error: any) {
return {
content: [{
type: "text",
text: `Error executing command: ${error.message}`
}],
isError: true
};
}
Yeah, if you want to be super technical, it's Node that does the actual command running, but in my opinion, that's as good as saying the MCP client is...