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

4 pointsposted 7 months ago
by rglover

Item id: 44546765

5 Comments

austin-cheney

7 months 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

7 months ago

Seems to be the only real option.

idontwantthis

7 months 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.

shubhamintech

7 months ago

Are you trying to build a general MCP endpoint that can query over your knowledge base or specific tool calling around your application?

revskill

7 months ago

MCP is a broken spec.