Follow these steps to set up the MCP server for use with Claude Desktop.
Prerequisites
- An account and API Key from the MLIT Data Platform.
- Python 3.10 or higher installed.
- An MCP-compatible host (e.g., Claude Desktop).
Installation Steps
Clone the repository
git clone https://github.com/MLIT-DATA-PLATFORM/mlit-dpf-mcp.git
cd mlit-dpf-mcp
Create and activate a virtual environment
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
Install dependencies
pip install -e .
pip install aiohttp pydantic tenacity python-json-logger mcp python-dotenv
Configure environment variables
Create a .env file in the root directory with your credentials:
MLIT_API_KEY=your_api_key_here
MLIT_BASE_URL=https://data-platform.mlit.go.jp/api/v1/
Configure Claude Desktop
Open your claude_desktop_config.json and add the mlit-dpf-mcp configuration. Replace the paths with your actual absolute paths.
Windows Path: %APPDATA%\Claude\claude_desktop_config.json
macOS Path: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mlit-dpf-mcp": {
"command": "/path/to/mlit-dpf-mcp/.venv/Scripts/python.exe",
"args": [
"/path/to/mlit-dpf-mcp/src/server.py"
],
"env": {
"MLIT_API_KEY": "your_api_key_here",
"MLIT_BASE_URL": "https://data-platform.mlit.go.jp/api/v1/",
"PYTHONUNBUFFERED": "1",
"LOG_LEVEL": "WARNING"
}
}
}
}
Restart Claude Desktop
{
"mcpServers": {
"mlit-dpf-mcp": {
"command": "/path/to/mlit-dpf-mcp/.venv/Scripts/python.exe",
"args": [
"/path/to/mlit-dpf-mcp/src/server.py"
],
"env": {
"MLIT_API_KEY": "your_api_key_here",
"MLIT_BASE_URL": "https://data-platform.mlit.go.jp/api/v1/",
"PYTHONUNBUFFERED": "1",
"LOG_LEVEL": "WARNING"
}
}
}
}