loading…
Search for a command to run...
loading…
An MCP server that enables users to search and navigate Madison, Wisconsin municipal ordinances using a TF-IDF search index. It provides specific code sections
An MCP server that enables users to search and navigate Madison, Wisconsin municipal ordinances using a TF-IDF search index. It provides specific code sections and citations to answer questions about local regulations like building permits and zoning.
An MCP (Model Context Protocol) server that lets Claude search and navigate Madison, WI municipal ordinances. Ask questions like "Can I build a fence in my front yard?" and get real answers with citations!
Model Context Protocol is Anthropic's open standard for connecting AI assistants to external tools and data. This project demonstrates building a production MCP server.
┌─────────────────────────────────────────────────────┐
│ Claude Desktop │
│ (asks: "fence regulations?") │
└──────────────────────┬──────────────────────────────┘
│ MCP Protocol
▼
┌─────────────────────────────────────────────────────┐
│ GovNavigator MCP Server │
│ (searches our ordinance database) │
└──────────────────────┬──────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────┐
│ TF-IDF Search Index │
│ (30+ chapters of Madison city code) │
└─────────────────────────────────────────────────────┘
# Create virtual environment
python -m venv .venv
# Activate (Windows PowerShell)
.\.venv\Scripts\Activate.ps1
# Activate (Mac/Linux)
source .venv/bin/activate
# Install dependencies
pip install -e .
python -m src.scraper.municode_scraper
python -m src.search.index
Add to your Claude Desktop config (%APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"govnavigator": {
"command": "python",
"args": ["-m", "src.mcp_server.server"],
"cwd": "C:\\Users\\Krish\\OneDrive\\Desktop\\GovNavigator"
}
}
}
After adding the config, restart Claude Desktop. You should see "govnavigator" in the MCP tools list.
Once connected, ask Claude:
GovNavigator/
├── src/
│ ├── scraper/ # Web scraper for Municode
│ │ └── municode_scraper.py
│ ├── search/ # TF-IDF search engine
│ │ └── index.py
│ └── mcp_server/ # MCP server implementation
│ └── server.py
├── data/
│ ├── raw/ # Scraped ordinance data
│ └── processed/ # Search index
└── pyproject.toml # Project configuration
Uses Playwright (browser automation) to scrape Madison's municipal code from Municode.com. Handles JavaScript-rendered content.
Builds a term-frequency inverse-document-frequency index for semantic search. No AI APIs needed - pure Python math!
Exposes two tools to Claude:
search_ordinance: Search for relevant code sectionsget_ordinance_details: Get full text of a specific sectionThis project demonstrates:
MIT License - Use freely for learning and building!
Built with Claude Code by a human learning AI engineering.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"govnavigator": {
"command": "npx",
"args": []
}
}
}PRs, issues, code search, CI status
Database, auth and storage
Reference / test server with prompts, resources, and tools.
Secure file operations with configurable access controls.