Skip to main content

MCP server that narrates your code changes, from commits to deployments.

Project description

DevNarrate

MCP server that narrates your code changes, from commits to deployments.

Features

  • Smart Commit Messages: Generate conventional commit messages from staged changes with full user control
  • PR Descriptions: Create detailed pull request descriptions with customizable templates
  • Multi-Platform: Supports GitHub and GitLab
  • Token-Aware: Handles large diffs with automatic pagination
  • Template System: Use custom PR templates or built-in defaults
  • Safety First: Only works with staged changes to prevent accidental commits

Installation

Option 1: Install from PyPI (Recommended)

  1. Install the package:
pip install devnarrate

# Or for pre-release versions:
pip install --pre devnarrate
  1. Configure with Claude Code:
# Add MCP server using your Python path
claude mcp add DevNarrate -- python -m devnarrate.server

# Verify it's connected
claude mcp list
  1. Configure with Cursor:

Edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "DevNarrate": {
      "command": "python",
      "args": ["-m", "devnarrate.server"]
    }
  }
}

Then restart Cursor.

Option 2: Install from Source (Development)

  1. Prerequisites: Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone and setup:
git clone https://github.com/krishnamandanapu/DevNarrate.git
cd DevNarrate
uv sync
  1. Configure with Claude Code:
claude mcp add DevNarrate -- uv --directory /path/to/DevNarrate run python -m devnarrate.server
  1. Configure with Cursor:
{
  "mcpServers": {
    "DevNarrate": {
      "command": "uv",
      "args": ["--directory", "/path/to/DevNarrate", "run", "python", "-m", "devnarrate.server"]
    }
  }
}

Usage

Commit Messages

Important: DevNarrate only works with staged changes to ensure you have full control over what gets committed. This prevents accidental commits of unintended files.

  1. First, stage the files you want to commit:
git add <file1> <file2>
# or for all tracked files with changes:
git add -u
  1. Ask Claude to generate the commit message:
Ask Claude: "Generate a commit message for my changes"
  1. Claude will analyze your staged changes, show you the proposed commit message, and ask for approval before committing.

If you haven't staged any changes, Claude will prompt you to stage them first.

PR Descriptions

  1. Ask Claude: "Create a PR to main from my current branch"
  2. Claude will analyze the diff and ask which template to use (if you have custom templates)
  3. Claude generates the PR description and shows it to you
  4. Review and approve, then Claude creates the PR

PR Templates (Optional)

Create custom templates in .devnarrate/pr-templates/:

mkdir -p .devnarrate/pr-templates

Example template (.devnarrate/pr-templates/feature.md):

## Summary
[What does this PR do?]

## Changes
-
-

## Testing
[How to test]

## Related Issues
[Links]

If no templates exist, a default template will be used.

Platform Support

Commits: Works everywhere (uses git)

PRs: Requires platform CLI:

  • GitHub: Install gh and run gh auth login
  • GitLab: Install glab and run glab auth login

Development

For maintainers: See RELEASING.md for instructions on publishing releases to PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devnarrate-0.1.0a1.tar.gz (62.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devnarrate-0.1.0a1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file devnarrate-0.1.0a1.tar.gz.

File metadata

  • Download URL: devnarrate-0.1.0a1.tar.gz
  • Upload date:
  • Size: 62.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for devnarrate-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 71837bcdf6306864e899d3cdead2a53b24a4f079e33a294945590cf5ae916435
MD5 e9a075b29e2efcca4f410cd57647e1da
BLAKE2b-256 5a7a34465b910da68b6facc890ec3d7303c44455558b3df05c079df21d3b3eb8

See more details on using hashes here.

File details

Details for the file devnarrate-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: devnarrate-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for devnarrate-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 521ffd6b4123d9c9b9c71404b1e01ad2efa256836c455a0399f8a1455cfa729f
MD5 1736c8483525e666f12a33fdf4d62125
BLAKE2b-256 f6e5e3d08a2fbdf0a73218e148021212a91962900acd3ef11fa0af29c15ad228

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page