Skip to content

Run the chat gateway

The gateway is the human face of the platform: a web chat where the AI is steered to answer from MCP tool data rather than its own memory.

You need the MCP server running in HTTP mode first.

git clone https://github.com/okfn/mcp-chat-gateway
cd mcp-chat-gateway
uv sync

Configure the AI provider, either by editing local_settings.py or with environment variables:

Variable Example Meaning
AI_API_KEY sk-... Key for your LLM provider
AI_BASE_URL https://api.deepseek.com Any OpenAI-compatible endpoint
AI_MODEL deepseek-chat Model name
MCP_URL http://127.0.0.1:8063 Where the MCP server lives

Then run it:

uv run python app.py     # serves on http://127.0.0.1:8064

Open http://127.0.0.1:8064, pick a suggested question or type your own, and watch the answer arrive with its tables, charts and source links.

No datasets yet? Ask about the example tools

A freshly cloned server already serves its bundled example tools, so you can test the full loop before installing any real catalog: ask the chat what it can answer, call an example tool through it, and check that the answer comes back with its sources.

Disposable by design

The gateway is intentionally simple: plain HTML/JS/CSS, a minimal Flask backend, no frontend framework. It exists to test and demonstrate the platform; expect it to change quickly.