Skip to content

Fix URL and envs #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix URL and envs #11

wants to merge 1 commit into from

Conversation

antejavor
Copy link
Contributor

@antejavor antejavor commented May 23, 2025

Introduce enviroment variables and fix URL

@antejavor antejavor self-assigned this May 23, 2025
@antejavor antejavor linked an issue May 23, 2025 that may be closed by this pull request
@antejavor antejavor marked this pull request as ready for review May 26, 2025 10:03
@antejavor antejavor requested a review from katarinasupe as a code owner May 26, 2025 10:03
@@ -21,13 +21,13 @@
# Initialize FastMCP server
mcp = FastMCP("mcp-memgraph")

MEMGRAPH_URI = "bolt://localhost:7687"
MEMGRAPH_URL = "bolt://localhost:7687"
Copy link
Contributor

@katarinasupe katarinasupe May 26, 2025

Choose a reason for hiding this comment

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

Note for future selves + I guess product feedback.
We have MEMGRAPH_BOLT_PORT env in Memgraph, but there is no MEMGRAPH_BOLT_HOST. Ideally, there would be both, and then URI would be MEMGRAPH_BOLT_HOST:MEMGRAPH_BOLT_PORT and URL bolt://MEMGRAPH_BOLT_HOST:MEMGRAPH_BOLT_PORT, I think.

Copy link
Contributor

@katarinasupe katarinasupe left a comment

Choose a reason for hiding this comment

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

Maybe one small thing to change, but I left some general comments for awareness.

@@ -15,7 +15,7 @@
@pytest.fixture(scope="module")
def memgraph_connection():
"""Setup Memgraph connection fixture."""
uri = os.getenv("MEMGRAPH_URI", "bolt://localhost:7687")
uri = os.getenv("MEMGRAPH_URL", "bolt://localhost:7687")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: update 'uri' variable name as well, to avoid confusion.

@katarinasupe katarinasupe self-requested a review May 26, 2025 10:55
@katarinasupe
Copy link
Contributor

katarinasupe commented May 26, 2025

Additional comment: @antejavor please check the related issue and if you fixed all I was referring to - example in README for memgraph toolkit.

[EDIT]
I see you added it in docstring - it might be good to update the example to use vars instead of expected envs, to make sure it works in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix URI and user, pass.
2 participants