Testing SingleStore's MCP Server

Abstract Model Context Protocol (MCP) appears to be gaining traction since its release in 2024. SingleStore recently released an official MCP Server and this article will show how to install, configure and run this from the CLI using a freely available tool called MCPHost. Introduction For our SingleStore test environment, we'll follow the instructions in a previous article on how to Create a SingleStore Cloud account and Create database tables. In addition to the username and password from our SingleStore account, we'll also need an API Key. This can be generated from Configuration > API Keys from the left-nav in the SingleStore web portal. Local test environment First, we'll ensure that we have a Python virtual environment to use. We'll use venv to create it and then activate it. Next, in our virtual environment, we'll install the SingleStore MCP Server, as follows: pip install singlestore-mcp-server We'll now create a json file called ~/.mcp.json as follows: { "mcpServers": { "singlestore-mcp-server": { "command": "/path/to/singlestore-mcp-server", "env": { "SINGLESTORE_DB_USERNAME": "", "SINGLESTORE_DB_PASSWORD": "", "SINGLESTORE_API_KEY": "" } } } } We'll need to replace /path/to with the actual path to where the SingleStore MCP Server was installed. We'll replace , and , with the values that we saved earlier. Install MCPHost We'll use a freely available tool called MCPHost, a CLI application that supports communication between Large Language Models (LLMs) and external tools using MCP. To use MCPHost, we'll need to install Go. For example, on an Apple Mac with Homebrew, this is as simple as: brew install go Next, we'll install MCPHost, as follows: go install github.com/mark3labs/mcphost@latest By default on an Apple Mac, this will create the file mcphost in the directory ~/go/bin. We could add the bin directory to $PATH. Run MCPHost MCPHost can work with a number of different LLMs. Let's test it initially with OpenAI. We'll need to provide an OpenAI API Key in our environment. For example: export OPENAI_API_KEY="" Replace with your key. Now we'll run MCPHost, as follows: ~/go/bin/mcphost -m openai:gpt-4o-mini The output should be similar to the following: 2025/04/07 12:42:38 INFO Model loaded provider=openai model=gpt-4o-mini 2025/04/07 12:42:38 INFO Initializing server... name=singlestore-mcp-server 2025/04/07 12:42:39 INFO Server connected name=singlestore-mcp-server 2025/04/07 12:42:39 INFO Tools loaded server=singlestore-mcp-server count=18 ┃ Enter your prompt (Type /help for commands, Ctrl+C to quit) ┃ ┃ ┃ ┃ ┃ ┃ alt+enter / ctrl+j new line • ctrl+e open editor • enter submit From here, we can enter various commands, such as: • /help: Show this help message • /tools: List all available tools • /servers: List configured MCP servers • /history: Display conversation history • /quit: Exit the application The complete set of SingleStore MCP Server commands can be found on GitHub. With the Free Shared Tier, for example, we can use several specific commands: list_virtual_workspaces create_virtual_workspace execute_sql_on_virtual_workspace Some commands require parameters. Summary In this article, we saw how to quickly install, configure and run the SingleStore MCP Server using MCPHost. We launched MCPHost using an OpenAI model, but MCPHost also supports alternative providers and models.

Apr 7, 2025 - 21:28
 0
Testing SingleStore's MCP Server

SingleStore MCP Server

Abstract

Model Context Protocol (MCP) appears to be gaining traction since its release in 2024. SingleStore recently released an official MCP Server and this article will show how to install, configure and run this from the CLI using a freely available tool called MCPHost.

Introduction

For our SingleStore test environment, we'll follow the instructions in a previous article on how to Create a SingleStore Cloud account and Create database tables.

In addition to the username and password from our SingleStore account, we'll also need an API Key. This can be generated from Configuration > API Keys from the left-nav in the SingleStore web portal.

Local test environment

First, we'll ensure that we have a Python virtual environment to use. We'll use venv to create it and then activate it.

Next, in our virtual environment, we'll install the SingleStore MCP Server, as follows:

pip install singlestore-mcp-server

We'll now create a json file called ~/.mcp.json as follows:

{
  "mcpServers": {
    "singlestore-mcp-server": {
      "command": "/path/to/singlestore-mcp-server",
      "env": {
        "SINGLESTORE_DB_USERNAME": "",
        "SINGLESTORE_DB_PASSWORD": "",
        "SINGLESTORE_API_KEY": ""
      }
    }
  }
}

We'll need to replace /path/to with the actual path to where the SingleStore MCP Server was installed. We'll replace , and , with the values that we saved earlier.

Install MCPHost

We'll use a freely available tool called MCPHost, a CLI application that supports communication between Large Language Models (LLMs) and external tools using MCP.

To use MCPHost, we'll need to install Go. For example, on an Apple Mac with Homebrew, this is as simple as:

brew install go

Next, we'll install MCPHost, as follows:

go install github.com/mark3labs/mcphost@latest

By default on an Apple Mac, this will create the file mcphost in the directory ~/go/bin. We could add the bin directory to $PATH.

Run MCPHost

MCPHost can work with a number of different LLMs. Let's test it initially with OpenAI. We'll need to provide an OpenAI API Key in our environment. For example:

export OPENAI_API_KEY=""

Replace with your key.

Now we'll run MCPHost, as follows:

~/go/bin/mcphost -m openai:gpt-4o-mini

The output should be similar to the following:

2025/04/07 12:42:38 INFO Model loaded provider=openai model=gpt-4o-mini
2025/04/07 12:42:38 INFO Initializing server... name=singlestore-mcp-server
2025/04/07 12:42:39 INFO Server connected name=singlestore-mcp-server
2025/04/07 12:42:39 INFO Tools loaded server=singlestore-mcp-server count=18
┃ Enter your prompt (Type /help for commands, Ctrl+C to     
quit)                                                       
┃                                                           
┃                                                           
┃                                                           
┃                                                           
┃                                                           
┃                                                           
alt+enter / ctrl+j new line • ctrl+e open editor • enter submit

From here, we can enter various commands, such as:

• /help: Show this help message                             
• /tools: List all available tools                          
• /servers: List configured MCP servers                     
• /history: Display conversation history                    
• /quit: Exit the application

The complete set of SingleStore MCP Server commands can be found on GitHub. With the Free Shared Tier, for example, we can use several specific commands:

list_virtual_workspaces

create_virtual_workspace

execute_sql_on_virtual_workspace

Some commands require parameters.

Summary

In this article, we saw how to quickly install, configure and run the SingleStore MCP Server using MCPHost. We launched MCPHost using an OpenAI model, but MCPHost also supports alternative providers and models.