Skip to main content

Wren MCP Server

The Wren MCP Server is a Model Context Protocol (MCP) server that provides tools for interacting with Wren Engine to facilitate AI agent integration.

Requirements

Before setting up the Wren MCP Server, ensure you have the following dependency installed:

  • uv - A fast and efficient Python package manager.

Environment Variables

The server requires the following environment variables to be set:

Variable Description
WREN_URL The URL of the Wren Ibis server.
CONNECTION_INFO_FILE The path to the required connection info file.
MDL_PATH The path to the MDL file.

Connection Info

The following JSON is a connection info of a Postgres. You can find the requried fields for each data source in the source code.

{
    "host": "localhost",
    "port": "5432",
    "user": "test",
    "password": "test",
    "database": "test"
}

The dataSource field is requried.

In the MDL, the dataSource field is required to indicate which data source should be connected.

.env File Support

Wren MCP Server supports an .env file for easier environment configuration. You can define all the required environment variables in this file.


Installation & Usage

1. Set the Python Envrionment

Use the uv command to create a virtual envrionment and activate it:

> uv venv
Using CPython 3.11.11
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
> source .venv/bin/activate   
> uv run app/wren.py
Loaded MDL etc/mdl.json
Loaded connection info etc/pg_conneciton.json

You would see that the MDL and connection info are loaded. Then, you can use Ctrl + C terminate the process.

2. Start Wren Engine and Ibis Server

  • If you already have a running Wren Engine, ensure that WREN_URL is correctly set to point to your server.

  • If you don't have a running engine, you can start one using Docker:

    cd docker
    docker compose up
    

3. Set Environment Variables

There are two ways to set the required environment variables:

  • Set up .env file in the root directory of the MCP server. Make sure all required environment variables are properly configured, either in your system or within a .env file.
  • Set up system environment variables in MCP configuration. See the next step.

4. Configure the MCP Server

Create a configuration file with the following structure:

{
    "mcpServers": {
        "wren": {
            "command": "uv",
            "args": [
                "--directory",
                "/ABSOLUTE/PATH/TO/PARENT/FOLDER/wren-engine/mcp-server",
                "run",
                "app/wren.py"
            ],
            "env": {
                "WREN_URL": "localhost:8000",
                "CONNECTION_INFO_FILE": "/path-to-connection-info/connection.json",
                "MDL_PATH": "/path-to-mdl/mdl.json"
            },
            "autoApprove": [],
            "disabled": false
        }
    }
}

Notes:

  • You may need to provide the full path to the uv executable in the "command" field. You can find it using:
    • MacOS/Linux: which uv
    • Windows: where uv
  • Ensure that the absolute path to the MCP server directory is used in the configuration.
  • For more details, refer to the MCP Server Guide.

5. Choose an AI Agent That Supports MCP Server

The following AI agents are compatible with Wren MCP Server and deploy the MCP config:

6. Check the Wren Engine is Connected

You can ask the AI agent to perform a health check for Wren Engine.

7. Start the Conversation

Now, you can start asking questions through your AI agent and interact with Wren Engine. Tip: prime your agent with a short instruction so it knows how to use the Wren MCP tools.

Recommended prompt:

Use the get_wren_guide() tool to learn how to use Wren Engine and discover available tools and examples.

Optional follow-ups:

  • "Open the Wren guide."
  • "What Wren MCP tools are available?"
  • "Show me the available tables in Wren Engine."
  • "Query Wren Engine to get ... (your question here)."

Additional Resources

Metadata

Release files for iflow-mcp_canner_mcp-server 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_canner_mcp-server 0.1.0
File Size Uploaded
iflow_mcp_canner_mcp_server-0.1.0.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_canner_mcp-server 0.1.0
File Interpreter ABI Platform
iflow_mcp_canner_mcp_server-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.0 kB

Release files / iflow_mcp_canner_mcp_server-0.1.0.tar.gz

Download URL iflow_mcp_canner_mcp_server-0.1.0.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
43eac49efacb5de3e9168c0d6d62282a262cf1e64f352dc1b342254e346f5601
BLAKE2b-256 checksum
How to use checksums
09edd2cf6280af344b33db0d188e57be9cfe7de45891b8623dd0f527c913faa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_canner_mcp_server-0.1.0-py3-none-any.whl

Download URL iflow_mcp_canner_mcp_server-0.1.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2773f8b5e0e7988f635e31a9cf6da23f0e55decbcc51a650e5fc421b2e8d0d0
BLAKE2b-256 checksum
How to use checksums
df8bfdc17503f6872da3d89f6562c88588a01df34ca56736bf844bd434df66d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page