MCP servers are excellent candidates for exposing data from traditional databases as context to large language models (LLMs). Since these MCP servers reside on-premises closer to the data sources, we need a mechanism to expose them to remote LLMs and agents.
In this tutorial, we will explore how to utilize Ngrok to securely expose MCP servers to hosted LLMs. We will first build an MCP server based on streamable HTTP transport that returns data. We will then expose it through an Ngrok tunnel, and finally create an MCP client based on the