# OpenClaw EGP Plugin RAG over Vietnamese government procurement documents (TBMT, KHLCNT, KQLCNT). Connects an OpenClaw agent to a running [`openclaw-egp-server`](https://git.pkhtech.com/vietnd11/openclaw-egp-server) instance via remote MCP. ## Install ```bash openclaw plugins install git:git.pkhtech.com/vietnd11/openclaw-egp-plugin@v0.1.0 ``` ## Configure Point the plugin at your `openclaw-egp-server` instance: ```bash openclaw plugins config openclaw-egp set serverUrl=http://100.123.9.15:8000 openclaw plugins restart ``` The plugin reads `serverUrl` from its config; the agent connects to `{serverUrl}/mcp` for the 5 MCP tools below. > **Note on MCP wiring.** OpenClaw's manifest schema does not currently declare a dedicated field for remote MCP server URLs. If `openclaw plugins inspect openclaw-egp --runtime` does not list the 5 tools after install, you may need to add an entry to the OpenClaw global config pointing the MCP runtime at `{serverUrl}/mcp`. See the [server repo's `/mcp` endpoint](https://git.pkhtech.com/vietnd11/openclaw-egp-server#mcp-endpoint) for the canonical URL. ## Capabilities | Tool | Purpose | |------|---------| | `search_procurement_docs(query, limit?, entity_type?, entity_code?, mode?)` | Semantic search over the corpus | | `list_entities(entity_type?, status?, limit?)` | Enumerate TBMT/KHLCNT/KQLCNT records | | `describe_entity(entity_code)` | Metadata + file list for one entity | | `fetch_raw_file_url(file_id)` | Public download URL for the original file | | `entity_types_glossary()` | Static domain reference | Each tool has an accompanying `SKILL.md` in `skills/` telling the agent **when** to use it. Skills are loaded automatically when the plugin is installed. ## Server requirements The plugin depends on an `openclaw-egp-server` instance with: - `/mcp` endpoint mounted (FastMCP Streamable HTTP transport). - `/files/{id}/raw` endpoint for raw file download. - `PUBLIC_BASE_URL` env var set to the externally-reachable URL (required for `fetch_raw_file_url`). See the [server README](https://git.pkhtech.com/vietnd11/openclaw-egp-server#mcp-endpoint) for setup. ## Verify install ```bash openclaw plugins inspect openclaw-egp --runtime ``` Expected: `openclaw-egp` enabled, 5 skills loaded, `serverUrl` shown as configured. Then in chat, try: > "Liệt kê các TBMT đã indexed" The agent should call `list_entities(entity_type="TBMT", status="indexed")` and return a markdown table. ## Update ```bash openclaw plugins install git:git.pkhtech.com/vietnd11/openclaw-egp-plugin@v0.2.0 openclaw plugins restart ``` ## Uninstall ```bash openclaw plugins uninstall openclaw-egp ``` ## Server repository [openclaw-egp-server](https://git.pkhtech.com/vietnd11/openclaw-egp-server) — FastAPI app exposing `/mcp` (5 tools), `/files/{id}/raw`, plus the admin dashboard and ingestion pipeline. ## License MIT — see [LICENSE](LICENSE).