Skip to content

Conversation

@raisiqueira
Copy link
Collaborator

@raisiqueira raisiqueira commented Nov 18, 2025

Update the run_server to support the port and host parameters.

Closes #3

Summary by Sourcery

Add host and port parameters to the CLI and server for SSE transport, update documentation and bump version to 0.4.0

New Features:

  • Allow specifying host and port for the MCP server via --host and --port when using SSE transport

Enhancements:

  • Bump project version from 0.3.1 to 0.4.0

Documentation:

  • Update README with examples, notes, and troubleshooting for custom host and port options

Signed-off-by: Rai Siqueira <rai93siqueira@gmail.com>
@raisiqueira raisiqueira self-assigned this Nov 18, 2025
@raisiqueira raisiqueira added the enhancement New feature or request label Nov 18, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Nov 18, 2025

Reviewer's Guide

Introduces configurable host and port options for SSE transport by extending the CLI parser, propagating the new arguments into the run_server logic, updating documentation, and bumping the package version.

Class diagram for updated run_server function and CLI argument parsing

classDiagram
    class Main {
        +main()
    }
    class ArgParser {
        +add_argument('--host')
        +add_argument('--port')
        +add_argument('--transport')
        +add_argument('--settings')
        +parse_args()
    }
    class RunServer {
        +run_server(settings_module, transport, host, port)
    }
    Main --> ArgParser : uses
    Main --> RunServer : calls
    ArgParser --> RunServer : passes host, port, transport, settings_module
    class MCP {
        +run(transport, host, port)
    }
    RunServer --> MCP : calls run() with host/port if transport=="sse"
Loading

File-Level Changes

Change Details Files
Add host and port arguments to the CLI
  • Define --host argument with default 127.0.0.1
  • Define --port argument with default 8000
src/django_ai_boost/__init__.py
Propagate host and port to run_server and adjust startup logic
  • Extend run_server signature to accept host and port
  • Invoke mcp.run with host and port only when transport is SSE
src/django_ai_boost/server_fastmcp.py
Update documentation with host/port examples and notes
  • Add examples for custom port and host usage
  • Include notes on stdio transport and port conflict errors
README.md
Bump project version to 0.4.0
  • Update version number in pyproject.toml
pyproject.toml

Assessment against linked issues

Issue Objective Addressed Explanation
#3 Update the run_server function to accept a port parameter for SSE transport.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@raisiqueira raisiqueira requested a review from fjsj November 18, 2025 20:15
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@raisiqueira raisiqueira merged commit 18a17a7 into main Nov 19, 2025
1 check passed
@raisiqueira raisiqueira deleted the feat/support-port-and-host branch November 19, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support to --port flag when using the sse transport type

3 participants