Skip to content

Commit fb36cd1

Browse files
authored
MCP user guide (#9)
* Initial MCP enabling and server config guide * MCP guide improvements * Fix MCP page link * Rename MCP section
1 parent fb09da1 commit fb36cd1

File tree

2 files changed

+45
-6
lines changed

2 files changed

+45
-6
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# MCP Connectivity Overview
2+
3+
This directory provides examples and configuration files to help you connect MCP servers with Datu.
4+
Datu uses the [mcp-use](https://github.com/mcp-use/mcp-use) package to implement MCP clients and manage connectivity.
5+
6+
7+
## Purpose
8+
9+
With Datu, you can connect to your MCP servers and use their tools through the Datu AI Analyst.
10+
11+
## Enabling MCP Servers
12+
13+
To enable MCP connectivity, set the following environment variable (see also [configurations.md](../configurations.md)):
14+
15+
```sh
16+
export DATU_ENABLE_MCP=true
17+
```
18+
19+
Alternatively, add it to your .env file:
20+
21+
```sh
22+
DATU_ENABLE_MCP=true
23+
```
24+
25+
26+
### Connecting MCP Servers
27+
28+
MCP servers are defined in a JSON configuration file (e.g. mcp_config.json).
29+
Each server entry specifies the command, arguments, and environment needed to start it.
30+
31+
**Structure of mcp_config.json**
32+
33+
```sh
34+
{
35+
"mcpServers": {
36+
"sql_generator": {
37+
"command": "python",
38+
"args": ["-m", "datu.mcp.tools.sql_generator"],
39+
"env": { "PYTHONPATH": "." }
40+
}
41+
}
42+
}
43+
```

mkdocs.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,8 @@ nav:
5656
- user-guide/configurations.md
5757
- Deploy:
5858
- Container service: user-guide/deploy/deploy_as_container_service.md
59-
- MCP Connectivity:
60-
- user-guide/MCP Connectivity/mcp_connectivity.md
61-
- Contribute ❤️: https://github.com/Datuanalytics/datu-core/blob/main/CONTRIBUTING.md
62-
63-
64-
59+
- MCP:
60+
- user-guide/MCP/mcp_connectivity.md
6561
- Architecture:
6662
- Overview: architecture/README.md
6763
- Contribute ❤️: https://github.com/Datuanalytics/datu-core/blob/main/CONTRIBUTING.md

0 commit comments

Comments
 (0)