Skip to content

Simplify connection config and client IP resolution - #12

Open
dgarcia360 wants to merge 1 commit into
mainfrom
fix/connection-config-handling
Open

Simplify connection config and client IP resolution#12
dgarcia360 wants to merge 1 commit into
mainfrom
fix/connection-config-handling

Conversation

@dgarcia360

@dgarcia360 dgarcia360 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Motivation

Per-request settings were resolved from several overlapping places, and client IP extraction reimplemented proxy-header parsing by hand.

Solution

  • base_url is resolved once from connection-level configuration (query params / session), with https://app.biel.ai as the default, instead of being merged through per-call tool arguments.
  • The client IP now comes from the socket peer; forwarded headers are handled by uvicorn's built-in proxy-headers support, configured through the standard FORWARDED_ALLOW_IPS env var (exposed in docker-compose.yml).

How to test

  1. docker compose up (or python biel_mcp_server.py).
  2. Connect an MCP client, e.g. npx mcp-remote "http://localhost:7832/sse?project_slug=YOUR_SLUG", and ask a question — responses are unchanged.
  3. Self-hosted instances keep working by passing base_url as a connection query param.

@dgarcia360 dgarcia360 changed the title Simplify connection config and client IP resolution Simplify connection config and forward MCP client identity Aug 10, 2026
@dgarcia360
dgarcia360 force-pushed the fix/connection-config-handling branch from e0b186c to 4817c2e Compare August 10, 2026 13:12
@dgarcia360 dgarcia360 changed the title Simplify connection config and forward MCP client identity Simplify connection config and client IP resolution Aug 10, 2026
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.

1 participant