GovNavigator
GovNavigator - MCP Municipal Code Assistant
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!
What is MCP?
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) │
└─────────────────────────────────────────────────────┘Related MCP server: Estate Atlas SD-MCP
Features
Real Data: Scraped from Madison, WI's actual municipal code
Semantic Search: TF-IDF based search finds relevant ordinances
No API Costs: 100% free - no paid APIs needed!
Citation Support: Returns section numbers and URLs
MCP Integration: Works with Claude Desktop
Quick Start
1. Install Dependencies
# 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 .2. Scrape Data (Optional - data already included)
python -m src.scraper.municode_scraper3. Build Search Index
python -m src.search.index4. Configure Claude Desktop
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"
}
}
}5. Restart Claude Desktop
After adding the config, restart Claude Desktop. You should see "govnavigator" in the MCP tools list.
Example Queries
Once connected, ask Claude:
"Can I build a 6-foot fence in my front yard in Madison?"
"What are the short-term rental regulations in Madison?"
"Do I need a permit to open a food truck?"
"What are the noise ordinance quiet hours?"
"What's required for a building permit?"
Project Structure
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 configurationHow It Works
1. Web Scraping
Uses Playwright (browser automation) to scrape Madison's municipal code from Municode.com. Handles JavaScript-rendered content.
2. TF-IDF Search
Builds a term-frequency inverse-document-frequency index for semantic search. No AI APIs needed - pure Python math!
3. MCP Server
Exposes two tools to Claude:
search_ordinance: Search for relevant code sectionsget_ordinance_details: Get full text of a specific section
Tech Stack
Python 3.10+
MCP SDK - Anthropic's Model Context Protocol
Playwright - Browser automation for scraping
BeautifulSoup - HTML parsing
Pydantic - Data validation
Learning Resources
This project demonstrates:
Building MCP servers
Web scraping with Playwright
TF-IDF search implementation
Async Python programming
Data pipeline design
License
MIT License - Use freely for learning and building!
Built with Claude Code by a human learning AI engineering.
Available Tools
2 toolsget_ordinance_detailsA
Get full details of a specific ordinance section by title.
Use this after search_ordinance to get more details about a specific section.
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | The title of the ordinance section to retrieve |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It implies this is a read operation ('Get'), but doesn't disclose behavioral traits like authentication requirements, rate limits, error conditions, or what constitutes 'full details' in the response. The description adds some context about the workflow but lacks operational details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero waste. The first states the purpose, the second provides usage guidance. Both sentences earn their place by adding distinct value beyond what's in the structured fields.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple single-parameter read tool with no annotations and no output schema, the description is reasonably complete. It covers purpose, usage context, and workflow positioning. However, it doesn't describe what 'full details' includes in the response, which would be helpful given the lack of output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents the single 'title' parameter. The description adds minimal value beyond the schema by mentioning 'by title' but doesn't provide additional semantic context about format, examples, or constraints. Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Get full details') and resource ('a specific ordinance section by title'), distinguishing it from the sibling tool 'search_ordinance' which presumably returns multiple results rather than detailed information about one section.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use this tool ('Use this after search_ordinance to get more details about a specific section'), providing clear context and naming the alternative tool (search_ordinance) for the initial search step.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_ordinanceA
Search Madison, WI municipal code/ordinances for specific topics.
Use this tool when users ask about:
City regulations (fences, parking, noise, permits, etc.)
What is allowed or prohibited in Madison
Requirements for construction, businesses, animals, etc.
Penalties and fees for violations
Returns relevant ordinance sections with citations.
Examples of good queries:
"fence height limit residential"
"short term rental requirements"
"parking permit downtown"
"noise ordinance quiet hours"
"building permit required when"
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language search query about municipal regulations | |
| max_results | No | Maximum number of results to return (default: 5, max: 10) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states that the tool 'returns relevant ordinance sections with citations' which describes the output behavior, but doesn't mention rate limits, authentication requirements, or error conditions. The description doesn't contradict any annotations since none exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and efficiently organized with clear sections: purpose statement, usage scenarios, return value description, and concrete query examples. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool with 2 parameters and no output schema, the description provides good context about what the tool does and when to use it. However, without annotations or output schema, it could benefit from more detail about the format of returned results (e.g., structured data vs text snippets).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain query formatting or result ranking). This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as searching Madison, WI municipal code/ordinances for specific topics, with specific examples of regulations (fences, parking, noise, permits). It distinguishes from the sibling tool 'get_ordinance_details' by focusing on search rather than detailed retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool, listing specific user question types (city regulations, what is allowed/prohibited, requirements, penalties/fees) and includes concrete examples of good queries. This clearly differentiates it from the sibling tool for detailed ordinance retrieval.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools have clearly distinct purposes: search_ordinance finds relevant ordinance sections based on topics, while get_ordinance_details retrieves full details for a specific section. There is no overlap or ambiguity between them, as one is for discovery and the other for detailed lookup.
Both tools follow a consistent verb_noun pattern (search_ordinance and get_ordinance_details) with clear, descriptive names. The naming convention is uniform and predictable across the tool set.
With only two tools, the server feels thin for its apparent scope of navigating municipal codes and ordinances. While the tools cover search and detail retrieval, the lack of additional operations like listing ordinances, updating information, or handling related processes suggests an incomplete surface for the domain.
The tool set is severely incomplete for a municipal code navigation server. It only supports search and detail retrieval, missing essential operations such as listing ordinances, accessing related documents, or providing updates. This creates significant gaps that could hinder agent workflows in this domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Unofficial MCP server for the public PortlandMaps property/permit/zoning API. Not city-affiliated.
An MCP server that provides congressional transcripts
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
Related MCP Servers
- AlicenseAqualityCmaintenanceOpen-source MCP server providing real estate regulatory intelligence (zoning, permits, entitlements, deal scoring) for US properties, enabling AI agents to access 10 callable tools.1215MIT

Estate Atlas SD-MCPofficial
AlicenseAqualityCmaintenanceMCP server for querying the San Diego Municipal Code, bulletins, permits, parcels, and zoning data with citations and freshness guarantees.14MIT- AlicenseNot gradedqualityBmaintenanceThis MCP server enables searching Korean construction standards (KDS/KCS), laws from the Ministry of Government Legislation, administrative rules and interpretations, and optionally local water/wastewater design manuals to generate grounded evidence packages for engineering answers.2MIT
- FlicenseNot gradedqualityCmaintenanceThis MCP server integrates South Korea's national law information, building registers from MOLIT, and KOSIS statistics for housing development research. It enables searching laws, retrieving building details, and accessing statistical data through natural language.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/krishangMittal/GovNavigator'
If you have feedback or need assistance with the MCP directory API, please join our Discord server