MyTown MCP 2.0
Bounded US and Canadian civic lookups through the MyTown API v2. AI summaries must be checked against linked official records; coverage is uneven.
Install
uvx --from mytown-mcp==2.0.0 mytown-mcp
After publication, use that command in an MCP client's stdio server configuration:
{"mcpServers":{"mytown":{"command":"uvx","args":["--from","mytown-mcp==2.0.0","mytown-mcp"]}}}
For a source checkout before publication: pip install ./mcp-server, then run
mytown-mcp. Requires Python 3.10+ and MCP Python SDK 1.x (dependency pinned below
2 because SDK 2 renamed FastMCP).
Tools
| Tool | Behavior |
|---|---|
list_cities(query='', state='', country='', limit=10, cursor='') |
Resolve place names to slugs; paginate with next_cursor. |
get_city_meetings(slug, country='', limit=5, cursor='', period='recent') |
Recent or upcoming meeting summaries and official source links. |
get_city_context(slug, country='', sections='demographics', limit=5) |
Request selected comma-separated context sections. |
search_meetings(query, limit=5, state='', kind='', country='') |
Search summaries/decisions with jurisdiction filters. |
dataset_info() |
Current v2 capabilities and coverage. |
list_research_queries() |
Authenticated catalog of prepared research queries. |
run_research_query(name, parameters={}, limit=5) |
Authenticated execution with named values bound by the API. |
All explicit limits are 1–20. Outputs are at most 48 KiB of JSON, including
metadata. Long text and rows may be shortened, with truncated and guidance;
pagination metadata is preserved when practical. count may describe the API
result before local shortening. Upstream bodies larger than 2 MiB are rejected.
Configuration and privacy
Default API origin: https://search.theboringparts.com. Optional
MYTOWN_API_URL must be an HTTPS origin, without credentials, path, query or
fragment; HTTP is allowed for localhost, 127.0.0.1, or ::1 development.
Set optional MYTOWN_API_TOKEN securely in the server environment to enable
private research calls. Tokens are sent only to research routes at the configured
origin, never supplied as tool arguments. Do not paste tokens into prompts.
The server reuses one HTTP connection pool for its MCP lifespan, closes it on shutdown, does not follow redirects, and returns sanitized actionable errors. 401 means check the token; 410 means upgrade/use v2; 429 and 503 mean retry later.
Breaking migration
Version 2 uses only /v2/info, /v2/cities, /v2/cities/{slug}/meetings,
/v2/cities/{slug}/context, /v2/search, and authenticated
/v2/research/queries[/{name}]. It does not fetch legacy static JSON, call
HuggingFace, perform arbitrary SQL/filter expressions, or fall back to old hosts.
dataset_tables, search_dataset, and filter_dataset have been removed.
Replace them with civic tools or explicitly authorized named research queries.
Restart your MCP client after upgrading to refresh tool discovery.
Offline validation
From an isolated repository checkout, with dependencies and pytest installed:
MYTOWN_DIR="$PWD" MYTOWN_ROOT="$PWD" PREFECT_SERVER_ALLOW_EPHEMERAL_MODE=false \
python -m pytest tests/test_mcp_v2.py -q
Tests mock HTTP and do not call production data services or providers.
Metadata
Release files for mytown-mcp 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mytown_mcp-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / mytown_mcp-2.0.0-py3-none-any.whl
| Download URL | mytown_mcp-2.0.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4fa10f71a483fc46f4ad8491c2a4cc03c7e3b6e0283750a17d2863286cd885f
|
|
BLAKE2b-256 checksum How to use checksums |
c829469f0f8e00237908b3ead691d738e3bf6eea60f0135037414671d37d65f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|