From 5141577723499469c56c53a17cf130d57e7b4527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B8rn=20Lindahl?= Date: Fri, 2 Jan 2026 10:27:36 +0100 Subject: [PATCH] added info --- README.md | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e1d751..4489c70 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,73 @@ # Demo Project -This is a demo project where I test-run the MCP server developed in ~/git/lovdata-ai +This is a demo project where I test-run the MCP server developed in ~/git/lovdata-ai. + +## MCP Server Configuration + +The MCP server has been configured for **project scope**. This means the server will only be available when working in this specific project directory (`/home/lindahl/git/lovdata-test`). + +### Adding the MCP Server + +If you need to add the MCP server in another location or reconfigure it, use this command: + +```bash +claude mcp add --transport stdio lovdata --env PGDATABASE=lovdata CWD=/home/lindahl/git/lovdata-ai/python/lovdata-mcp -- /home/lindahl/git/lovdata-ai/python/lovdata-mcp/.venv/bin/python -m lovdata_mcp.server +``` + +This command: +- Adds the MCP server to **project scope** (creates `.mcp.json` in project root) +- Sets the working directory to the MCP server location +- Configures the production database (`lovdata`) +- Uses the correct Python executable from the virtual environment + +### Server Configuration File + +The configuration is stored in `.mcp.json` at the project root: + +```json +{ + "mcpServers": { + "lovdata-mcp": { + "command": "/home/lindahl/git/lovdata-ai/python/lovdata-mcp/.venv/bin/python", + "args": [ + "-m", + "lovdata_mcp.server" + ], + "cwd": "/home/lindahl/git/lovdata-ai/python/lovdata-mcp", + "env": { + "PGDATABASE": "lovdata" + } + } + } +} +``` + +### Cleanup + +After the MCP server is configured, you can remove the old `.claude/` directory that was created by the global command: + +```bash +rm -rf .claude +``` + +### Available MCP Tools + +When the server is running, you can query: + +- `get_law` - Retrieve Norwegian law by slug/doc_id +- `get_provision` - Get single provision by ID +- `get_provisions_batch` - Batch retrieve multiple provisions +- `list_provisions` - List provisions with pagination +- `search_provisions_fts` - Full-text search (Norwegian) +- `search_provisions_vector` - Vector similarity search +- `health_check` - Database connectivity check + +### Database + +- **769** Norwegian laws loaded +- **20,254** provisions with full-text search indexes +- Production database: `lovdata` + +### See Also + +- [MCP_SERVER_TESTING.md](./MCP_SERVER_TESTING.md) - Detailed testing guide