added info
This commit is contained in:
72
README.md
72
README.md
@@ -1,3 +1,73 @@
|
|||||||
# Demo Project
|
# 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
|
||||||
|
|||||||
Reference in New Issue
Block a user