Parliament MCP Server provides access to UK parliamentary data through an MCP server interface. It offers tools to search constituencies, members, debates, and parliamentary questions, along with semantic search capabilities powered by Qdrant vector database.
You'll need:
Create a .env
file by copying the .env.example
file and fill in the required variables, including your Azure OpenAI credentials.
Run the automated setup:
make dev_setup_from_scratch
{
"mcpServers": {
"parliament-mcp": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8080/mcp/", "--allow-http", "--debug"]
}
}
}
# Clone the repo
git clone [email protected]:i-dot-ai/parliament-mcp.git
cd parliament-mcp
# Set up environment file
cp .env.example .env
nano .env # Edit to add your configuration
# Start Qdrant and MCP server
docker-compose up --build
The services will be available at:
http://localhost:8080/mcp/
http://localhost:6333
# Initialize Qdrant
docker compose exec mcp-server uv run parliament-mcp --log-level INFO init-qdrant
# Load Hansard data
docker compose exec mcp-server uv run parliament-mcp load-data hansard --from-date 2025-06-23 --to-date 2025-06-27
# Load Parliamentary Questions
docker compose exec mcp-server uv run parliament-mcp --log-level WARNING load-data parliamentary-questions --from-date 2025-06-23 --to-date 2025-06-27
npm install -g mcp-remote
Add the server configuration to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"parliament-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8080/mcp/",
"--allow-http",
"--debug"
]
}
}
}
You can also generate this configuration automatically:
make mcp_claude_config
Claude should now have access to the Parliament MCP tools.
The MCP Server provides 11 tools for parliamentary research:
You can use natural language queries with Claude, such as:
MCP Connection Issues
Data Loading Failures
.env
file--ll DEBUG
flag for detailed loggingQdrant Issues
parliament-mcp init-qdrant
View server logs:
docker-compose logs mcp-server
Check Qdrant status:
curl http://localhost:6333/healthz
# Or use the make command:
make qdrant_health
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "parliament-mcp" '{"command":"npx","args":["mcp-remote","http://localhost:8080/mcp/","--allow-http","--debug"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"parliament-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8080/mcp/",
"--allow-http",
"--debug"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"parliament-mcp": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8080/mcp/",
"--allow-http",
"--debug"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect