Ask HN: Has anybody gotten a Node.js MCP server to work with HTTP?

4 pointsposted 2 days ago
by rglover

Item id: 44546765

4 Comments

austin-cheney

2 days ago

I avoid LLMs so I have not bothered with MCP, but what you need is trivial. Node provides multiple ways to connect to local services like IPC channels, network sockets, child process and more.

I recommend using the child process spawn method to create the MCP service behind your node based web server. You would write to stdin.write of your spawned process and you would read from the stdout and stderr data events.

rglover

a day ago

Seems to be the only real option.

idontwantthis

a day ago

Can you run an http server and your MCP server in separate processes and setup communication through ports? I imagine you’d want to separate them in a serious project and probably eventually communicate through a queue.