en:ask_directo
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:ask_directo [2026/10/01 12:25] – [Directo MCP Server Setup - Claude Desktop and Gemini CLI] andrus | en:ask_directo [2026/11/12 15:58] (current) – toomas | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| Read more about what Ask Directo can do: [[https:// | Read more about what Ask Directo can do: [[https:// | ||
| + | |||
| ===== Directo MCP Server Setup - Claude Desktop and Gemini CLI ===== | ===== Directo MCP Server Setup - Claude Desktop and Gemini CLI ===== | ||
| Line 47: | Line 48: | ||
| </ | </ | ||
| - | The MCP server runs **on your computer**. The Directo API key never leaves your machine. The data retrieved from Directo does, however, travel onward to the AI provider' | + | The MCP server runs **on your computer**. The Directo API key never leaves your machine. The data retrieved from Directo does, however, travel onward to the AI provider' |
| <note important> | <note important> | ||
| Line 56: | Line 57: | ||
| * The MCP server only works while **your computer is on** and the AI client is running | * The MCP server only works while **your computer is on** and the AI client is running | ||
| * If you want to share an MCP server across multiple users, you need a separate hosted-server solution (out of scope for this guide) | * If you want to share an MCP server across multiple users, you need a separate hosted-server solution (out of scope for this guide) | ||
| + | * One API key belongs to **one Directo database**. This MCP server is tied to exactly the database the key was created in and cannot query another database (for example between a production and a test database). The AI itself does not know which database the server is connected to: if it claims to be querying another database, that is not true. The Directo address bar shows the database name ('' | ||
| </ | </ | ||
| Line 83: | Line 85: | ||
| <note important> | <note important> | ||
| - | ⚠️ **The Gemini CLI free tier still exists, but has changed.** Depending on your authentication method: | + | ⚠️ **Gemini CLI no longer serves users signed in with a free Google account.** On June 18, 2026, Gemini CLI stopped serving |
| - | * **Google | + | * **a paid Gemini API key** |
| - | * **Free Gemini API key (unpaid):** narrower — ~10 requests/min, ~250 requests/ | + | * **a Gemini Code Assist Standard |
| - | On June 18, 2026, the Gemini CLI will be replaced by **Antigravity CLI** for the unpaid | + | According to Google' |
| </ | </ | ||
| Line 175: | Line 177: | ||
| {{ : | {{ : | ||
| - | < | + | < |
| The files are attached to the wiki as a **ZIP archive**, not as individual links — DokuWiki blocks '' | The files are attached to the wiki as a **ZIP archive**, not as individual links — DokuWiki blocks '' | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | The scripts print all messages in English: '' | ||
| </ | </ | ||
| <note important> | <note important> | ||
| - | ⚠️ | + | The scripts are updated from time to time. If you already downloaded the ZIP earlier (for example an older copy sits in your Downloads folder), |
| </ | </ | ||
| Line 216: | Line 222: | ||
| **Step A2 — Running the scripts** | **Step A2 — Running the scripts** | ||
| - | In the same PowerShell window (not as administrator), | + | In the same PowerShell window (not as administrator), |
| + | A2.1 API key (shared by both clients, do this first) | ||
| <code powershell> | <code powershell> | ||
| - | # API key (shared by both clients, do this first) | ||
| .\set-directo-apikey.ps1 | .\set-directo-apikey.ps1 | ||
| + | </ | ||
| - | # Pick your AI client (or both): | + | A2.2 Pick your AI client (or both): |
| + | Claude | ||
| + | |||
| + | <code powershell> | ||
| .\install-claude-mcp.ps1 | .\install-claude-mcp.ps1 | ||
| + | </ | ||
| + | |||
| + | Gemini | ||
| + | |||
| + | <code powershell> | ||
| .\install-gemini-mcp.ps1 | .\install-gemini-mcp.ps1 | ||
| </ | </ | ||
| - | Each script prints a summary at the end — what's done (✅) and what still needs manual | + | Each script prints a summary at the end: '' |
| <note important> | <note important> | ||
| Line 298: | Line 313: | ||
| <note important> | <note important> | ||
| - | This file contains all 32 Directo API tools and has been **fully schema-verified** — every parameter has been checked against Directo' | + | This file contains all 41 tools (40 Directo API interfaces |
| </ | </ | ||
| Line 413: | Line 428: | ||
| ==== Step 4.1 — Configuration file location ==== | ==== Step 4.1 — Configuration file location ==== | ||
| - | Claude Desktop | + | Claude Desktop' |
| - | ^ Install type ^ Location ^ | + | ^ Variant |
| - | | Direct '' | + | | MSIX (claude.ai/ |
| - | | Microsoft Store / MSIX | '' | + | | The same MSIX before the data move | '' |
| + | | Microsoft Store build (not verified) | '' | ||
| + | | Earlier '' | ||
| <note important> | <note important> | ||
| - | This is a documented, currently active | + | Newer Claude Desktop |
| </ | </ | ||
| - | Check which one applies | + | Show which of these files exist on your machine |
| - | < | + | < |
| - | %APPDATA%\Claude | + | " |
| + | " | ||
| + | " | ||
| + | "$env:APPDATA\Claude\claude_desktop_config.json" | ||
| </ | </ | ||
| - | If a '' | + | Use the **first** |
| - | < | + | * If the list contains a '' |
| - | %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude | + | * If the folder '' |
| - | </ | + | |
| - | + | ||
| - | < | + | |
| - | If neither folder exists, | + | |
| - | </ | + | |
| ==== Step 4.2 — Configuration file ==== | ==== Step 4.2 — Configuration file ==== | ||
| Line 489: | Line 505: | ||
| ==== Step 4.4 — Testing ==== | ==== Step 4.4 — Testing ==== | ||
| - | In a Claude Desktop conversation, | + | In a Claude Desktop conversation, |
| - | > Show me all stock levels | + | > Which Directo interfaces are enabled on my API key? |
| - | Claude | + | Claude |
| + | |||
| + | > Which warehouses do I have in Directo? | ||
| + | |||
| + | Claude uses a suitable tool (here '' | ||
| + | |||
| + | <note important> | ||
| + | **Claude Desktop asks for permission the first time.** The first time a new tool is used, a confirmation question appears in the Claude Desktop window (for example Allow once / Allow always). Choose '' | ||
| + | </ | ||
| + | |||
| + | Make sure the answer is data from **your database**: ask for something you know from your own Directo | ||
| **Checking the logs if something doesn' | **Checking the logs if something doesn' | ||
| - | The log location follows | + | In current Claude Desktop versions |
| <code powershell> | <code powershell> | ||
| - | # Direct .exe installer: | + | # Current Claude Desktop versions: |
| - | Get-Content "$env:APPDATA\Claude\logs\mcp-server-directo.log" | + | Get-Content "$env:LOCALAPPDATA\Claude\logs\mcp-server-directo.log" |
| - | # Microsoft Store / MSIX: | + | # Earlier .exe installer: |
| - | Get-Content "$env:LOCALAPPDATA\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\logs\mcp-server-directo.log" | + | Get-Content "$env:APPDATA\Claude\logs\mcp-server-directo.log" |
| </ | </ | ||
| - | Official Claude Desktop MCP documentation: | + | Official Claude Desktop MCP documentation: |
| + | |||
| + | < | ||
| + | The official MCP documentation still gives the old paths ('' | ||
| + | </ | ||
| ===== 5. Setting up Gemini CLI ===== | ===== 5. Setting up Gemini CLI ===== | ||
| Line 520: | Line 550: | ||
| <note important> | <note important> | ||
| - | ⚠️ Before continuing, make sure you have valid authentication | + | ⚠️ Before continuing, make sure you have valid authentication: a paid Gemini API key, a Gemini Code Assist |
| </ | </ | ||
| Line 671: | Line 701: | ||
| < | < | ||
| - | 🟢 directo - Ready (32 tools) | + | 🟢 directo - Ready (41 tools) |
| </ | </ | ||
| Test query: | Test query: | ||
| - | > Show me all stock levels | + | > Which Directo interfaces are enabled on my API key? |
| Official Gemini CLI MCP documentation: | Official Gemini CLI MCP documentation: | ||
| Line 684: | Line 714: | ||
| ^ Error message ^ Cause ^ Fix ^ | ^ Error message ^ Cause ^ Fix ^ | ||
| - | | '' | + | | '' |
| + | | '' | ||
| | '' | | '' | ||
| | '' | | '' | ||
| - | | '' | + | | '' |
| - | | '' | + | | '' |
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| | '' | | '' | ||
| - | | '' | + | | '' |
| | '' | | '' | ||
| < | < | ||
| - | The first row above (" | + | The server' |
| </ | </ | ||
| - | ==== Claude Desktop-specific errors ==== | + | |
| ^ Problem ^ Fix ^ | ^ Problem ^ Fix ^ | ||
| Line 703: | Line 740: | ||
| | MCP server doesn' | | MCP server doesn' | ||
| | Config folder is missing | Run Claude Desktop once — the folders are created automatically | | | Config folder is missing | Run Claude Desktop once — the folders are created automatically | | ||
| - | | Config edited, but nothing changes | Make sure you're editing the RIGHT file — see Step 4.1 (two possible locations, | + | | Config edited, but nothing changes | Make sure you're editing the RIGHT file — see Step 4.1 (four possible locations; in current Claude Desktop the file is in '' |
| + | | No answer (after several minutes: "No result received" | ||
| + | | MCP disappeared after a Claude Desktop update | Claude moved its data to the new folder (Step 4.1). Check that '' | ||
| - | Log file (try both, see Step 4.1): | + | Log file (current Claude Desktop versions; the second line is for the earlier |
| <code powershell> | <code powershell> | ||
| + | Get-Content " | ||
| Get-Content " | Get-Content " | ||
| - | Get-Content " | ||
| </ | </ | ||
| Line 717: | Line 756: | ||
| | ''/ | | ''/ | ||
| | '' | | '' | ||
| - | | Rate limit / 429 error | Free-tier request limit exceeded — wait for the limit to reset, or consider | + | | Rate limit / 429 error | Free API key request limit exceeded — wait for the limit to reset, or use a paid API key (see Step 2.3) | |
| + | | Gemini CLI won't sign in with a Google account | Free Google account support ended on June 18, 2026: use a paid Gemini API key or a Gemini Code Assist license | ||
| Gemini CLI diagnostics: | Gemini CLI diagnostics: | ||
| Line 727: | Line 767: | ||
| ===== 7. MCP tools ===== | ===== 7. MCP tools ===== | ||
| - | Both clients (Claude Desktop and Gemini CLI) use the same tools: | + | Both clients (Claude Desktop and Gemini CLI) use the same 41 tools (40 Directo API interfaces and the access-overview tool '' |
| ^ Group ^ Tools ^ | ^ Group ^ Tools ^ | ||
| | Sales | get_invoices, | | Sales | get_invoices, | ||
| | Customers | get_customers, | | Customers | get_customers, | ||
| - | | Products | + | | Items / stock | get_items, get_itemclasses, |
| | Purchasing | get_purchase_orders, | | Purchasing | get_purchase_orders, | ||
| | Accounting | get_transactions, | | Accounting | get_transactions, | ||
| | Logistics | get_deliveries, | | Logistics | get_deliveries, | ||
| - | | Other | get_projects, | + | | People / HR | get_users, get_absences, |
| + | | Assets | get_assets, get_customer_assets | | ||
| + | | Other | get_projects, | ||
| | Sync | get_deleted | | | Sync | get_deleted | | ||
| + | | Access overview | get_api_access | | ||
| + | |||
| + | ==== Good to know ==== | ||
| + | |||
| + | * **A tool only works if its interface is enabled on your API key.** Your Directo administrator chooses which interfaces and which fields the key allows. If an interface is missing, the error message says which interface must be enabled in Directo. | ||
| + | * **Access overview:** ask "Which Directo interfaces are enabled on my API key?". The result is saved for 1 day (file '' | ||
| + | * **Stock levels:** prefer the '' | ||
| + | * **Filters: | ||
| + | * **Result size:** the start of every answer shows the number of matches and the size. If it says " | ||
| + | * **Sensitive data:** the people, payroll, expense and usage-log tools ('' | ||
| ===== 8. Security ===== | ===== 8. Security ===== | ||
| ^ Measure ^ Explanation ^ | ^ Measure ^ Explanation ^ | ||
| - | | Credential Manager (both clients) | API key is encrypted, visible only to your Windows account — Claude and Gemini read the same entry | | + | | Credential Manager (both clients) | The API key is encrypted |
| | Environment variable (Gemini fallback) | If Credential Manager is set up, the '' | | Environment variable (Gemini fallback) | If Credential Manager is set up, the '' | ||
| | Local server | The MCP server only runs on your computer, it is not publicly reachable | | | Local server | The MCP server only runs on your computer, it is not publicly reachable | | ||
| - | | Minimal permissions | Restrict the Directo API key's permissions to only the resources | + | | Data to the AI provider | Query results are sent to the AI provider' |
| + | | Minimal permissions | Restrict the Directo API key's permissions to only the interfaces and fields | ||
| + | | Access-overview cache | The file '' | ||
| | OneDrive/ | | OneDrive/ | ||
| | Admin rights | Only for installing Node.js (Step 3.1) — a shared prerequisite for both paths — everything else, including the CredentialManager module, runs under '' | | Admin rights | Only for installing Node.js (Step 3.1) — a shared prerequisite for both paths — everything else, including the CredentialManager module, runs under '' | ||
| - | ===== 9. References ===== | + | ===== 9. Updating and versions ===== |
| + | |||
| + | ==== Which version am I running? ==== | ||
| + | |||
| + | The MCP server version is in the server' | ||
| + | |||
| + | <code powershell> | ||
| + | Select-String -Path " | ||
| + | </ | ||
| + | |||
| + | The scripts' | ||
| + | |||
| + | ==== How to update ==== | ||
| + | |||
| + | - Download a **fresh** ZIP (see Step A1), extract it and open PowerShell in the extracted folder. | ||
| + | - Copy the new '' | ||
| + | - Close Claude Desktop **completely** (Step 4.3) or Gemini CLI and open it again. | ||
| + | - Check the version in the log (see above). | ||
| + | |||
| + | Copy command: | ||
| + | |||
| + | <code powershell> | ||
| + | Copy-Item .\directo-mcp.js " | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | The new '' | ||
| + | </ | ||
| + | |||
| + | ===== 10. References ===== | ||
| **Claude Desktop:** | **Claude Desktop:** | ||
| Line 755: | Line 838: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| Line 760: | Line 844: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| Line 771: | Line 857: | ||
| **Quick-install scripts** (see Path A, Chapter 3): | **Quick-install scripts** (see Path A, Chapter 3): | ||
| - | * '' | + | * '' |
| * '' | * '' | ||
| * '' | * '' | ||
| * '' | * '' | ||
en/ask_directo.txt · Last modified: 2026/11/12 15:58 by toomas