# How to use internal AI endpoints?

**URL:** https://meta.discourse.org/t/how-to-use-internal-ai-endpoints/405831
**Category:** Support
**Tags:** ai
**Created:** [June 22, 2026, 6:47pm UTC](https://meta.discourse.org/t/how-to-use-internal-ai-endpoints/405831 "2026-06-22T18:47:05Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [July 6, 2026, 12:56am UTC](https://meta.discourse.org/t/how-to-use-internal-ai-endpoints/405831/9 "2026-07-06T00:56:53Z")

</div>

I solved it adding the Docker Internal Gateway IP to `DISCOURSE_ALLOWED_INTERNAL_HOSTS` and exposing the port on LiteLLM `docker-compose.yml` file:

```plaintext
    ports:
      - "4444:4000"

```

> Nginx points to `LITELLM_IP:4000` and Discourse to `GATEWAY_IP:4444` to avoid port conflicts.

* * *

Then I solved the errors on MCP admin UI removing previous non-working MCP added tools:

```plaintext
# List all configured MCP servers
AiMcpServer.all

# If you see a bad one, delete it by ID (e.g., id: 1)
AiMcpServer.find(1).destroy

```

Hope it helps to someone with similar setup.

---

_[View the full topic](https://meta.discourse.org/t/how-to-use-internal-ai-endpoints/405831)._
