Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ architecture-beta
The MCP server runs locally on the machine that runs the LLM frontend (eg Claude). The installation steps are simple

1. Clone or download this repository.
2. Install the [uv](https://docs.astral.sh/uv/guides/install-python/) package manager (note that the MCP server requires python 3.11 or later)
3. Do a sanity check by running the command and validating the output as shown below.
2. Install the [uv](https://docs.astral.sh/uv/getting-started/installation/) package manager (note that the MCP server requires python 3.11 or later)
- If you install this for the first time, restart your terminal at the end of the install
3. Ensure that you have python installed by running the command below. It should show python 3.11 or later (If you don't have python installed, follow the instructions [here](https://docs.astral.sh/uv/guides/install-python/) OR simply run `uv python install`)
```shell
$ uv python find
```
4. Do a sanity check by running the command and validating the output as shown below.

```shell
# cd <toplevel git dir> or add `--directory <toplevel git dir>`
Expand Down Expand Up @@ -152,7 +157,7 @@ Default config file: '/Users/..../Library/Application Support/Claude/claude_desk
$ uv run dremio-mcp-server config list --type dremioai
Default config file: /Users/..../.config/dremioai/config.yaml (exists = True)
dremio:
enable_experimental: false
enable_search: false
pat: ....
uri: ....
tools:
Expand Down Expand Up @@ -181,7 +186,7 @@ dremio:
uri: https://.... # the Dremio URI
pat: "@~/ws/tokens/idl.token" # PAT can be put in a file and used here with @ prefix
project_id: <string> Project ID required for Dremio Cloud
enable_experimental: <bool> # Optional: Enable experimental features
enable_search: <bool> # Optional: Enable semantic search
allow_dml: <bool> # Optional: Allow MCP Server to create views in Dremio
tools:
server_mode: FOR_DATA_PATTERNS # the serverm
Expand Down
4 changes: 2 additions & 2 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dremio:
uri: <string|DremioCloudUri> # Dremio instance URI
pat: <string> # Personal Access Token
project_id: <string> # Optional: Project ID for Dremio Cloud
enable_experimental: <bool> # Optional: Enable experimental features
enable_search: <bool> # Optional: Enable semantic search
allow_dml: <bool> # Optional: Allow MCP Server to create views in Dremio
```

Expand Down Expand Up @@ -145,7 +145,7 @@ dremio:
uri: "https://api.dremio.cloud"
pat: "@~/tokens/dremio.pat"
project_id: "project123" # required only for DC
enable_experimental: <bool> # Optional: Enable experimental features
enable_search: <bool> # Optional: Enable semantic search features
allow_dml: <bool> # Optional: Allow MCP Server to create views in Dremio
tools:
server_mode: "FOR_SELF,FOR_DATA_PATTERNS"
Expand Down
4 changes: 2 additions & 2 deletions src/dremioai/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ class Dremio(BaseModel):
]
raw_pat: Optional[str] = Field(default=None, alias="pat")
project_id: Optional[str] = None
enable_experimental: Optional[bool] = Field(
enable_search: Optional[bool] = Field(
default=False,
alias=AliasChoices("enable_experimental", "enable_search"),
alias=AliasChoices("enable_search", "enable_experimental"),
description="enable experimental tools",
)
oauth2: Optional[OAuth2] = None
Expand Down
6 changes: 2 additions & 4 deletions src/dremioai/servers/mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,7 @@ def create_default_config(
Optional[List[str]],
Option("-m", "--mode", help="MCP server mode", click_type=Choice(_mode())),
] = [tools.ToolType.FOR_DATA_PATTERNS.name],
enable_experimental: Annotated[
bool, Option(help="Enable experimental features")
] = False,
enable_search: Annotated[bool, Option(help="Enable semantic search")] = False,
oauth_client_id: Annotated[
Optional[str],
Option(help="The ID of OAuth application, for OAuth2 logon support"),
Expand All @@ -298,7 +296,7 @@ def create_default_config(
"uri": uri,
"pat": pat,
"project_id": project_id,
"enable_experimental": enable_experimental,
"enable_search": enable_search,
"oauth": (
settings.OAuth2.model_validate({"client_id": oauth_client_id})
if oauth_client_id
Expand Down
2 changes: 1 addition & 1 deletion src/dremioai/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def is_tool_for(
return False

if (For := get_for(tool)) is not None:
if For & ToolType.EXPERIMENTAL and not dremio.enable_experimental:
if For & ToolType.EXPERIMENTAL and not dremio.enable_search:
return False
return (For & tool_type) != 0 # == tool_type
return False
Expand Down
15 changes: 15 additions & 0 deletions tests/config/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,18 @@ def test_create_default_config(mock_config_dir):
)
tools = settings.instance().tools
assert tools.server_mode == mode


@pytest.mark.parametrize(
"name,value",
[
(name, value)
for name in ("enable_search", "enable_experimental")
for value in (True, False)
],
)
def test_experimental_rename(name: str, value: bool):
d = settings.Dremio.model_validate(
{name: value, "uri": "https://foo", "pat": "bar"}
)
assert d.enable_search == value