A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/yugabyte/yugabytedb-mcp-server below:

yugabyte/yugabytedb-mcp-server: MCP Server to interact with data in YugabyteDB

An MCP server implementation for YugabyteDB that allows LLMs to directly interact with your database.

Clone this repository and install dependencies:

git clone git@github.com:yugabyte/yugabytedb-mcp-server.git
cd yugabytedb-mcp-server
uv sync

The server is configured using the following environment variable:

Example .env file:

YUGABYTEDB_URL=postgresql://user:password@localhost:5433/yugabyte

You can run the server with STDIO transport using uv:

or with Streamable-HTTP transport:

uv run src/server.py --transport http
Running the Server with Docker

Build the Docker image:

docker build -t mcp/yugabytedb .

Run the container with STDIO transport:

docker run -p 8080:8080 -e YUGABYTEDB_URL="your-db-url" mcp/yugabytedb

or with Streamable-HTTP transport:

docker run -p 8080:8080 -e YUGABYTEDB_URL="your-db-url" mcp/yugabytedb --transport=http

To use this server with an MCP client (e.g., Claude Desktop, Cursor), add it to your MCP client configuration.

Example configuration for Cursor:

{
  "mcpServers": {
    "yugabytedb-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/cloned/yugabytedb-mcp-server/",
        "run",
        "src/server.py"
      ],
      "env": {
        "YUGABYTEDB_URL": "dbname=database_name host=hostname port=5433 user=username password=password load_balance=true topology_keys=cloud.region.zone1,cloud.region.zone2"
      }
    }
  }
}
Running via Docker (e.g., in Claude)

After building the docker container, add the following to claude_config.json entry or equivalent json files for other editors:

{
  "mcpServers": {
    "yugabytedb-mcp-docker": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "YUGABYTEDB_URL=dbname=yugabyte host=host.docker.internal port=5433 user=yugabyte password=yugabyte load_balance=false",
        "mcp/yugabytedb"
      ]
    }
  }
}
  1. Edit the configuration file. Go to Claude -> Settings -> Developer -> Edit Config
  2. Add the above configuration under mcpServers.
  3. Restart Claude Desktop.

The logs for Claude Desktop can be found in the following locations:

The logs can be used to diagnose connection issues or other problems with your MCP server configuration. For more details, refer to the official documentation.

  1. Install Cursor on your machine.
  2. Go to Cursor > Settings > Cursor Settings > MCP > Add a new global MCP server.
  3. Add the configuration as above.
  4. Save the configuration.
  5. You will see yugabytedb-mcp-server as an added server in MCP servers list. Refresh to see if server is enabled.

In the bottom panel of Cursor, click on "Output" and select "Cursor MCP" from the dropdown menu to view server logs. This can help diagnose connection issues or other problems with your MCP server configuration.

  1. Install Windsurf Editor on your machine.
  2. Go to Windsurf > Settings > Windsurf Settings > Cascade > Model Context Protocol (MCP) Servers > Add server > Add custom server.
  3. Add the configuration as above.
  4. Save and refresh.
Streamable-HTTP with MCP Inspector
  1. Start the server using Streamable-HTTP:

    uv run src/server.py --transport http

    Or with Docker:

    docker run -p 8080:8080 -e YUGABYTEDB_URL="..." mcp/yugabytedb --transport=http
  2. Launch the inspector:

    npx @modelcontextprotocol/inspector
  3. In the GUI, use the URL:

    http://localhost:8080/invocations/mcp
    

Once connected via an MCP client, you can:

sudo ln -s "$(which uv)" /usr/local/bin/uv

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4