c0a2177d0868219a6c75a26bdc5ca2889f0ec45c
Demo Project
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:
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.jsonin 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:
{
"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:
rm -rf .claude
Available MCP Tools
When the server is running, you can query:
get_law- Retrieve Norwegian law by slug/doc_idget_provision- Get single provision by IDget_provisions_batch- Batch retrieve multiple provisionslist_provisions- List provisions with paginationsearch_provisions_fts- Full-text search (Norwegian)search_provisions_vector- Vector similarity searchhealth_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 - Detailed testing guide
Description
Languages
Markdown
100%