diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed1009b..90b5ac5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -162,9 +162,48 @@ jobs: - name: ⚙️ Set up Python run: uv python install 3.12 - - name: ⚙️ Build package + - name: ⚙️ Override version in pyproject.toml + if: (github.event_name == 'workflow_dispatch' && github.event.inputs.version) || github.event_name == 'release' run: | - uv build --sdist --wheel + # Determine the target version + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + TARGET_VERSION="${{ github.event.inputs.version }}" + echo "Overriding version from manual trigger: $TARGET_VERSION" + elif [[ "${{ github.event_name }}" == "release" ]]; then + RELEASE_TAG="${{ github.event.release.tag_name }}" + TARGET_VERSION=$(echo "$RELEASE_TAG" | sed 's/^v//') + echo "Overriding version from release tag: $TARGET_VERSION (tag: $RELEASE_TAG)" + fi + + # Get current version for comparison + CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') + echo "Current version in pyproject.toml: $CURRENT_VERSION" + + # Check if override is needed + if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then + echo "Version already matches target: $TARGET_VERSION" + else + echo "Version override needed: $CURRENT_VERSION → $TARGET_VERSION" + + # Update version in pyproject.toml + sed -i "s/^version = \".*\"/version = \"$TARGET_VERSION\"/" pyproject.toml + + # Verify the change + NEW_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/') + echo "Updated version in pyproject.toml: $NEW_VERSION" + + # Validate the change was successful + if [[ "$NEW_VERSION" != "$TARGET_VERSION" ]]; then + echo "Version override failed! Expected: $TARGET_VERSION, Got: $NEW_VERSION" + exit 1 + fi + + echo "Version successfully changed: $CURRENT_VERSION → $NEW_VERSION" + fi + + - name: ⚙️ Build package + run: | + uv build --sdist --wheel - name: ⚙️ Check package run: | diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml new file mode 100644 index 0000000..79e5ca1 --- /dev/null +++ b/.github/workflows/stale-issues.yml @@ -0,0 +1,76 @@ +name: "Stale Issue Management" +on: + schedule: + # Run daily at midnight UTC + - cron: "0 0 * * *" + workflow_dispatch: # Allow manual triggering +env: + # Default stale policy timeframes + DAYS_BEFORE_STALE: 365 + DAYS_BEFORE_CLOSE: 30 + # Accelerated timeline for needs-information issues + NEEDS_INFO_DAYS_BEFORE_STALE: 30 + NEEDS_INFO_DAYS_BEFORE_CLOSE: 7 +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + dry-run: true + # Default stale policy + days-before-stale: ${{ env.DAYS_BEFORE_STALE }} + days-before-close: ${{ env.DAYS_BEFORE_CLOSE }} + # Explicit stale label configuration + stale-issue-label: "stale" + stale-pr-label: "stale" + stale-issue-message: | + This issue has been automatically marked as stale due to inactivity. + It will be closed in 30 days if no further activity occurs. + If you believe this issue is still relevant, please add a comment to keep it open. + close-issue-message: | + This issue has been automatically closed due to inactivity. + If you believe this issue is still relevant, please reopen it or create a new issue with updated information. + # Exclude needs-information issues from this job + exempt-issue-labels: 'no-stale,needs-information' + # Remove stale label when issue/PR becomes active again + remove-stale-when-updated: true + # Apply to pull requests with same timeline + days-before-pr-stale: ${{ env.DAYS_BEFORE_STALE }} + days-before-pr-close: ${{ env.DAYS_BEFORE_CLOSE }} + stale-pr-message: | + This pull request has been automatically marked as stale due to inactivity. + It will be closed in 30 days if no further activity occurs. + close-pr-message: | + This pull request has been automatically closed due to inactivity. + If you would like to continue this work, please reopen the PR or create a new one. + # Only exclude no-stale PRs (needs-information PRs follow standard timeline) + exempt-pr-labels: 'no-stale' + # Separate job for needs-information issues ONLY with accelerated timeline + stale-needs-info: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + dry-run: true + # Accelerated timeline for needs-information + days-before-stale: ${{ env.NEEDS_INFO_DAYS_BEFORE_STALE }} + days-before-close: ${{ env.NEEDS_INFO_DAYS_BEFORE_CLOSE }} + # Explicit stale label configuration + stale-issue-label: "stale" + # Only target ISSUES with needs-information label (not PRs) + only-issue-labels: 'needs-information' + stale-issue-message: | + This issue has been marked as stale because it requires additional information + that has not been provided for 30 days. It will be closed in 7 days if the + requested information is not provided. + close-issue-message: | + This issue has been closed because the requested information was not provided within the specified timeframe. + If you can provide the missing information, please reopen this issue or create a new one. + # Disable PR processing for this job + days-before-pr-stale: -1 + days-before-pr-close: -1 + # Remove stale label when issue becomes active again + remove-stale-when-updated: true \ No newline at end of file diff --git a/README.md b/README.md index e269f41..19d6cae 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Redis MCP Server [![Integration](https://github.com/redis/mcp-redis/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/redis/mcp-redis/actions/workflows/ci.yml) -[![Python Version](https://img.shields.io/badge/python-3.13%2B-blue)](https://www.python.org/downloads/) +[![PyPI - Version](https://img.shields.io/pypi/v/redis-mcp-server)](https://pypi.org/project/redis-mcp-server/) +[![Python Version](https://img.shields.io/badge/python-3.13%2B-blue&logo=redis)](https://www.python.org/downloads/) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt) [![smithery badge](https://smithery.ai/badge/@redis/mcp-redis)](https://smithery.ai/server/@redis/mcp-redis) [![Verified on MseeP](https://mseep.ai/badge.svg)](https://mseep.ai/app/70102150-efe0-4705-9f7d-87980109a279) -![Docker Image Version](https://img.shields.io/docker/v/mcp/redis?sort=semver&logo=docker&label=Docker) +[![Docker Image Version](https://img.shields.io/docker/v/mcp/redis?sort=semver&logo=docker&label=Docker)](https://hub.docker.com/r/mcp/redis) +[![codecov](https://codecov.io/gh/redis/mcp-redis/branch/master/graph/badge.svg?token=yenl5fzxxr)](https://codecov.io/gh/redis/mcp-redis) [![Discord](https://img.shields.io/discord/697882427875393627.svg?style=social&logo=discord)](https://discord.gg/redis) @@ -52,6 +54,7 @@ The Redis MCP Server is a **natural language interface** designed for agentic ap - **Full Redis Support**: Handles **hashes, lists, sets, sorted sets, streams**, and more. - **Search & Filtering**: Supports efficient data retrieval and searching in Redis. - **Scalable & Lightweight**: Designed for **high-performance** data operations. +- The Redis MCP Server supports the `stdio` [transport](https://modelcontextprotocol.io/docs/concepts/transports#standard-input%2Foutput-stdio). Support to the `stremable-http` transport will be added in the future. ## Tools @@ -73,11 +76,21 @@ Additional tools. ## Installation -The Redis MCP Server supports the `stdio` [transport](https://modelcontextprotocol.io/docs/concepts/transports#standard-input%2Foutput-stdio). Support to the `stremable-http` transport will be added in the future. +The Redis MCP Server is available as a Python package, and can be installed from PyPI. -> No PyPi package is available at the moment. +```sh +pip install redis-mcp-server +``` + +Alternatively you can use `uv` to install the package and its dependencies. + +```sh +uv python install 3.13 +uv sync +uv run redis-mcp-server --url redis://localhost:6379/0 +``` -### Quick Start with uvx +### Running the latest bits The easiest way to use the Redis MCP Server is with `uvx`, which allows you to run it directly from GitHub (from a branch, or use a tagged release). It is recommended to use a tagged release, the `main` branch is under active development and may contain breaking changes. As an example, you can execute the following command to run the `0.2.0` release: