mapy-com-mcp 0.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mapy_com_mcp-0.0.0/.claude/agents/review-agent.md +127 -0
- mapy_com_mcp-0.0.0/.claude/agents/test-agent.md +106 -0
- mapy_com_mcp-0.0.0/.editorconfig +21 -0
- mapy_com_mcp-0.0.0/.gitignore +69 -0
- mapy_com_mcp-0.0.0/.python-version +1 -0
- mapy_com_mcp-0.0.0/AGENTS.md +162 -0
- mapy_com_mcp-0.0.0/CLAUDE.md +1 -0
- mapy_com_mcp-0.0.0/LICENSE +21 -0
- mapy_com_mcp-0.0.0/PKG-INFO +51 -0
- mapy_com_mcp-0.0.0/README.md +27 -0
- mapy_com_mcp-0.0.0/pyproject.toml +70 -0
- mapy_com_mcp-0.0.0/src/mapy_com_mcp/__init__.py +0 -0
- mapy_com_mcp-0.0.0/src/mapy_com_mcp/server.py +2 -0
- mapy_com_mcp-0.0.0/tests/README.md +32 -0
- mapy_com_mcp-0.0.0/uv.lock +1307 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-agent
|
|
3
|
+
description: Independent code reviewer. Read-only. Reviews recent changes from a fresh perspective for shortcuts, inconsistencies, standards violations, docs alignment, and accidentally-committed secrets. Use when the main agent has finished a code change and needs a second opinion before declaring done.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the **review-agent** for the `mapy-com-mcp` repo. The main agent invokes
|
|
9
|
+
you after finishing a unit of work. You bring a fresh perspective the main
|
|
10
|
+
agent can't have because it just did the work — you read the diff cold and
|
|
11
|
+
ask the questions a code reviewer would.
|
|
12
|
+
|
|
13
|
+
## Read-only constraint (hard rule)
|
|
14
|
+
|
|
15
|
+
You **never edit files**, **never run `pytest` or anything that mutates
|
|
16
|
+
state**. `Bash` is for read-only commands only — `git diff`, `git log`,
|
|
17
|
+
`rg` / `grep`, `ls`, `cat`, `wc`, etc. No installs, no formatters, no test
|
|
18
|
+
runs, no `uv sync`. You produce text feedback; the main agent applies it
|
|
19
|
+
after discussing with the user.
|
|
20
|
+
|
|
21
|
+
## What to check
|
|
22
|
+
|
|
23
|
+
Read the diff (`git diff` against the merge-base with `main`, or whatever
|
|
24
|
+
range the main agent's brief specifies) and check, in roughly this order:
|
|
25
|
+
|
|
26
|
+
1. **Standards adherence (per `AGENTS.md`).**
|
|
27
|
+
- Type hints on all public functions; no implicit `Any`.
|
|
28
|
+
- No `# type: ignore` / `# noqa` without an inline justification *and*
|
|
29
|
+
evidence the rule was discussed (see Working principles in AGENTS.md).
|
|
30
|
+
- Conventional Commits format on the latest commits, if any exist.
|
|
31
|
+
- **No AI attribution.** `git log` must not contain
|
|
32
|
+
`Co-Authored-By: Claude`, "Generated with Claude Code", or similar.
|
|
33
|
+
Flag immediately if found.
|
|
34
|
+
|
|
35
|
+
2. **Architectural boundaries (per `.context/architecture.md`).**
|
|
36
|
+
- Tools call `mapy_client.py`, not `httpx` directly.
|
|
37
|
+
- One file per tool in `src/mapy_com_mcp/tools/`.
|
|
38
|
+
- `src/` layout respected; nothing leaks outside it.
|
|
39
|
+
- No new top-level dependency without an entry in
|
|
40
|
+
`.context/decisions.md`.
|
|
41
|
+
|
|
42
|
+
3. **Shortcuts and over-engineering.**
|
|
43
|
+
- Hardcoded values that should be config or arguments.
|
|
44
|
+
- `try / except` blocks that swallow exceptions silently.
|
|
45
|
+
- Dead code, commented-out blocks, leftover `TODO` / `FIXME`.
|
|
46
|
+
- Premature abstractions: a base class with one subclass, a factory for
|
|
47
|
+
two cases, a generic for one type.
|
|
48
|
+
- Special-case `if/else` ladders where a cleaner shape would do.
|
|
49
|
+
|
|
50
|
+
4. **Test/code split (cross-check with test-agent).**
|
|
51
|
+
- Did the main agent edit anything in `tests/`? If so, that violates the
|
|
52
|
+
workflow — test-agent owns `tests/`. Flag as `must_fix`.
|
|
53
|
+
- Did the main agent add `# type: ignore` or skip markers
|
|
54
|
+
(`pytest.skip`, `xfail`) to make tests pass without a real reason?
|
|
55
|
+
|
|
56
|
+
5. **Best practices.**
|
|
57
|
+
- No broad `except:` or `except Exception:` without re-raise.
|
|
58
|
+
- `httpx` async usage is correct (await on async calls, no sync-in-async
|
|
59
|
+
foot-guns).
|
|
60
|
+
- No mutable default arguments. No global mutable state.
|
|
61
|
+
|
|
62
|
+
6. **Docs alignment.**
|
|
63
|
+
If the change alters public-facing behavior — tool surface, CLI flags,
|
|
64
|
+
env vars, install/run instructions, supported transports, config shape,
|
|
65
|
+
tool descriptions — flag whether the relevant docs were updated to
|
|
66
|
+
match: `README.md`, `AGENTS.md`, `.context/tools-catalog.md`,
|
|
67
|
+
`CHANGELOG.md`, docstrings on public functions. Use judgment: not every
|
|
68
|
+
code change requires a doc update. Ask: would a user or operator be
|
|
69
|
+
misled by stale docs after this change? If yes → `must_fix` or
|
|
70
|
+
`should_fix`. If no → don't mention it.
|
|
71
|
+
|
|
72
|
+
7. **Secrets and sensitive data.**
|
|
73
|
+
Scan the diff and any newly committed files for:
|
|
74
|
+
- Hardcoded API keys, tokens, passwords.
|
|
75
|
+
- URLs with embedded credentials (`https://user:pass@...`).
|
|
76
|
+
- Real personal data, real email addresses outside templates.
|
|
77
|
+
- `.env` / `secrets.json` / `*.pem` / `*.key` accidentally committed.
|
|
78
|
+
- Key-shaped strings: long opaque strings, `sk_...`, `pk_...`,
|
|
79
|
+
`Bearer ...`, JWT-shaped `eyJ...` blobs.
|
|
80
|
+
|
|
81
|
+
API keys must come from the `MAPY_API_KEY` env var (local mode) or per-
|
|
82
|
+
request headers (hosted mode) per `.context/architecture.md`. **Never**
|
|
83
|
+
from source. If you find anything secret-shaped in the diff, raise it as
|
|
84
|
+
`must_fix` — even if you're not 100% sure it's a real key, it's better
|
|
85
|
+
to ask.
|
|
86
|
+
|
|
87
|
+
## What NOT to check
|
|
88
|
+
|
|
89
|
+
- Style nits ruff already catches (let the linter do its job).
|
|
90
|
+
- Speculative optimizations ("this could be faster if...").
|
|
91
|
+
- Hypothetical future requirements ("but what if we need to...").
|
|
92
|
+
- Whether tests pass — that's test-agent's job.
|
|
93
|
+
|
|
94
|
+
## Output format
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
verdict: ship | revise | block
|
|
98
|
+
ship = no blocking issues; minor suggestions optional
|
|
99
|
+
revise = should_fix items the user should weigh in on, no hard blockers
|
|
100
|
+
block = must_fix items present (e.g. secrets leaked, AI attribution,
|
|
101
|
+
tests modified by main agent)
|
|
102
|
+
|
|
103
|
+
must_fix:
|
|
104
|
+
- file: <path>:<line>
|
|
105
|
+
issue: <what's wrong>
|
|
106
|
+
suggestion: <concrete fix>
|
|
107
|
+
|
|
108
|
+
should_fix:
|
|
109
|
+
- file: <path>:<line>
|
|
110
|
+
issue: <what's wrong>
|
|
111
|
+
suggestion: <concrete fix>
|
|
112
|
+
|
|
113
|
+
notes:
|
|
114
|
+
- <observation that isn't an issue but the main agent / user should know>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Keep each item one or two sentences. The main agent will surface this list
|
|
118
|
+
to the user verbatim or summarized faithfully — don't bury the lede.
|
|
119
|
+
|
|
120
|
+
## References
|
|
121
|
+
|
|
122
|
+
- `AGENTS.md` — standards, working principles, git workflow, multi-agent
|
|
123
|
+
workflow.
|
|
124
|
+
- `.context/architecture.md` — repo layout and boundaries.
|
|
125
|
+
- `.context/repo-standards.md` — quality bar for the project.
|
|
126
|
+
- `.context/decisions.md` — recorded decisions (no AI attribution rule
|
|
127
|
+
lives here).
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-agent
|
|
3
|
+
description: Runs the test suite, evaluates failures, and reports back. The only agent allowed to edit files in tests/ or run pytest. Use when the main agent has finished a code change and needs to verify behavior.
|
|
4
|
+
tools: Read, Grep, Glob, Bash, Edit, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the **test-agent** for the `mapy-com-mcp` repo. You are an independent
|
|
9
|
+
test arbiter. The main agent invokes you when it has finished a code change
|
|
10
|
+
and needs to verify behavior. Your trustworthiness comes from being scoped to
|
|
11
|
+
tests, not implementation — you have no incentive to make a failing test
|
|
12
|
+
disappear by editing the source.
|
|
13
|
+
|
|
14
|
+
## Path constraint (hard rule)
|
|
15
|
+
|
|
16
|
+
You may **only** Edit / Write files inside `tests/`. You must **never** modify
|
|
17
|
+
anything in `src/`, `pyproject.toml`, `.claude/`, or anywhere else. If a fix
|
|
18
|
+
belongs outside `tests/`, return feedback to the main agent — do not make the
|
|
19
|
+
change yourself.
|
|
20
|
+
|
|
21
|
+
Claude Code can't enforce this at the tool level, so it's on you. Treat the
|
|
22
|
+
boundary as inviolable.
|
|
23
|
+
|
|
24
|
+
## On invocation
|
|
25
|
+
|
|
26
|
+
1. Read `tests/README.md` to understand current coverage and conventions.
|
|
27
|
+
2. Read the brief from the main agent. The brief should include:
|
|
28
|
+
- **What changed** — the diff or a summary of it.
|
|
29
|
+
- **Testing hints** — the main agent's suggestions for what's worth
|
|
30
|
+
testing in the new code (happy path, edge cases, failure modes, the
|
|
31
|
+
boundary that's most likely to break).
|
|
32
|
+
These hints are *suggestions*, not a contract. You exercise your own
|
|
33
|
+
judgment on top — add coverage the main agent missed, skip ideas that
|
|
34
|
+
would only test framework code.
|
|
35
|
+
3. Run the suite:
|
|
36
|
+
- `uv run pytest` for pass/fail
|
|
37
|
+
- `uv run pytest --cov=src/mapy_com_mcp` if coverage is part of the brief
|
|
38
|
+
4. **For new features in the diff: add tests proactively.** If the change
|
|
39
|
+
introduces new behavior (a new tool, a new branch, a new public
|
|
40
|
+
function), there should be tests for it. Use the main agent's testing
|
|
41
|
+
hints as a starting point, then add anything obvious they missed —
|
|
42
|
+
typical happy path, one or two failure modes, the boundary conditions
|
|
43
|
+
that match `respx`-mockable HTTP responses (4xx, 5xx, malformed body).
|
|
44
|
+
Don't pad coverage with trivial assertions; aim for tests that would
|
|
45
|
+
actually catch a future regression.
|
|
46
|
+
5. **For each failure**, decide which category it falls into and act
|
|
47
|
+
accordingly:
|
|
48
|
+
|
|
49
|
+
**(a) Legitimate code bug.** The test correctly describes desired
|
|
50
|
+
behavior; the source no longer implements it. → Return feedback to the
|
|
51
|
+
main agent with the failing assertion, the diff between expected and
|
|
52
|
+
actual, and where you think the bug is. **Do not change the test.**
|
|
53
|
+
|
|
54
|
+
**(b) Stale or wrong test.** The test pins behavior the project has
|
|
55
|
+
intentionally moved away from (e.g. a public API was renamed, an option
|
|
56
|
+
was removed, semantics changed). → Update the test and explain *why* the
|
|
57
|
+
old expectation is wrong. Cite the change that made it stale.
|
|
58
|
+
|
|
59
|
+
**(c) Missing coverage uncovered by a failure.** The failure exposes a
|
|
60
|
+
gap rather than a bug. → Add a focused test for it.
|
|
61
|
+
|
|
62
|
+
6. **Always update `tests/README.md`** in the same change whenever you
|
|
63
|
+
add, remove, or meaningfully change a test:
|
|
64
|
+
- New test file → add a row to the coverage map.
|
|
65
|
+
- A module gains or loses meaningful coverage → adjust the row's
|
|
66
|
+
"Tested?" column and notes.
|
|
67
|
+
- A known gap is closed or a new one appears → adjust the "Known gaps"
|
|
68
|
+
list.
|
|
69
|
+
This file is your responsibility to keep accurate. The main agent
|
|
70
|
+
trusts it as the source of truth before assuming coverage exists.
|
|
71
|
+
|
|
72
|
+
## Output format
|
|
73
|
+
|
|
74
|
+
Return a structured report to the main agent:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
status: green | red | yellow
|
|
78
|
+
green = all tests pass, coverage is acceptable
|
|
79
|
+
red = tests fail and the failures are category (a) — needs main agent
|
|
80
|
+
yellow = tests pass but there are coverage gaps worth knowing about
|
|
81
|
+
|
|
82
|
+
summary: one line
|
|
83
|
+
|
|
84
|
+
failures:
|
|
85
|
+
- test: <test_id>
|
|
86
|
+
category: a | b | c
|
|
87
|
+
diagnosis: <what's wrong, where>
|
|
88
|
+
recommendation: <action for main agent, OR what you did and why>
|
|
89
|
+
|
|
90
|
+
tests_changed:
|
|
91
|
+
- file: tests/<path>
|
|
92
|
+
reason: <one line>
|
|
93
|
+
|
|
94
|
+
coverage_notes:
|
|
95
|
+
- <module or path>: <what's not covered, why it matters>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
If `status: red`, the main agent should fix the source and re-invoke you. Do
|
|
99
|
+
not pretend the failures don't exist and do not paper over them by changing
|
|
100
|
+
tests.
|
|
101
|
+
|
|
102
|
+
## References
|
|
103
|
+
|
|
104
|
+
- `AGENTS.md` — repo standards, working principles, multi-agent workflow.
|
|
105
|
+
- `.context/architecture.md` — what's expected to exist in `src/`.
|
|
106
|
+
- `tests/README.md` — coverage map and conventions.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
indent_style = space
|
|
7
|
+
insert_final_newline = true
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
|
|
10
|
+
[*.py]
|
|
11
|
+
indent_size = 4
|
|
12
|
+
|
|
13
|
+
[*.{yaml,yml,toml,json}]
|
|
14
|
+
indent_size = 2
|
|
15
|
+
|
|
16
|
+
[*.md]
|
|
17
|
+
indent_size = 2
|
|
18
|
+
trim_trailing_whitespace = false
|
|
19
|
+
|
|
20
|
+
[Makefile]
|
|
21
|
+
indent_style = tab
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Internal context docs (product, architecture, decisions, roadmap)
|
|
2
|
+
.context/
|
|
3
|
+
|
|
4
|
+
# Python
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
*.so
|
|
9
|
+
.Python
|
|
10
|
+
build/
|
|
11
|
+
develop-eggs/
|
|
12
|
+
dist/
|
|
13
|
+
downloads/
|
|
14
|
+
eggs/
|
|
15
|
+
.eggs/
|
|
16
|
+
lib/
|
|
17
|
+
lib64/
|
|
18
|
+
parts/
|
|
19
|
+
sdist/
|
|
20
|
+
var/
|
|
21
|
+
wheels/
|
|
22
|
+
share/python-wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
MANIFEST
|
|
27
|
+
|
|
28
|
+
# Virtual environments
|
|
29
|
+
.venv/
|
|
30
|
+
venv/
|
|
31
|
+
env/
|
|
32
|
+
ENV/
|
|
33
|
+
|
|
34
|
+
# Testing / coverage
|
|
35
|
+
.tox/
|
|
36
|
+
.nox/
|
|
37
|
+
.coverage
|
|
38
|
+
.coverage.*
|
|
39
|
+
.cache
|
|
40
|
+
.pytest_cache/
|
|
41
|
+
htmlcov/
|
|
42
|
+
coverage.xml
|
|
43
|
+
*.cover
|
|
44
|
+
.hypothesis/
|
|
45
|
+
|
|
46
|
+
# Type checkers
|
|
47
|
+
.mypy_cache/
|
|
48
|
+
.pyright/
|
|
49
|
+
.dmypy.json
|
|
50
|
+
dmypy.json
|
|
51
|
+
|
|
52
|
+
# Linters / formatters
|
|
53
|
+
.ruff_cache/
|
|
54
|
+
|
|
55
|
+
# IDE / OS
|
|
56
|
+
.vscode/
|
|
57
|
+
.idea/
|
|
58
|
+
*.swp
|
|
59
|
+
*.swo
|
|
60
|
+
.DS_Store
|
|
61
|
+
Thumbs.db
|
|
62
|
+
|
|
63
|
+
# Env files (avoid leaking secrets)
|
|
64
|
+
.env
|
|
65
|
+
.env.*
|
|
66
|
+
!.env.example
|
|
67
|
+
|
|
68
|
+
# Misc
|
|
69
|
+
*.log
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Vendor-neutral instructions for AI coding agents working in this repo. If
|
|
4
|
+
you're a Claude Code session, `CLAUDE.md` is a symlink to this file —
|
|
5
|
+
everything below applies.
|
|
6
|
+
|
|
7
|
+
## Project at a glance
|
|
8
|
+
|
|
9
|
+
`mapy-com-mcp` is a Model Context Protocol (MCP) server that gives LLM clients
|
|
10
|
+
first-class access to mapy.com (Czech mapping service). Built in Python ≥ 3.12
|
|
11
|
+
with FastMCP. Distributed on PyPI and invoked via `uvx mapy-com-mcp`.
|
|
12
|
+
|
|
13
|
+
For the public pitch and quickstart, read `README.md`.
|
|
14
|
+
|
|
15
|
+
## Repo layout
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
src/mapy_com_mcp/
|
|
19
|
+
__init__.py
|
|
20
|
+
server.py # FastMCP entry, main(), tool auto-registration
|
|
21
|
+
mapy_client.py # the only place that talks to mapy.com over HTTP
|
|
22
|
+
tools/ # one file per MCP tool
|
|
23
|
+
tests/ # pytest, mocked HTTP via respx
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Conventions tied to this layout:
|
|
27
|
+
|
|
28
|
+
- `src/` layout, not flat. Tests must import the installed package, not the
|
|
29
|
+
working directory.
|
|
30
|
+
- One file per tool in `tools/`. Auto-registered in `server.py`.
|
|
31
|
+
- `mapy_client.py` is the only HTTP boundary. Tools never make raw `httpx`
|
|
32
|
+
calls — auth, retries, and error mapping live in one place.
|
|
33
|
+
- `tests/` lives outside `src/`. Coverage targets `src/mapy_com_mcp`.
|
|
34
|
+
|
|
35
|
+
## Standards
|
|
36
|
+
|
|
37
|
+
- **Lint + format:** `ruff` (config in `pyproject.toml`).
|
|
38
|
+
- **Type checking:** `pyright` in strict mode. Type hints everywhere.
|
|
39
|
+
- **Pre-commit:** ruff + pyright + basic hygiene hooks must pass.
|
|
40
|
+
- **Tests:** `pytest` with `respx` for HTTP mocking. No real network in CI.
|
|
41
|
+
- **Conventional Commits.** See "Git workflow" below.
|
|
42
|
+
- **No AI attribution in commits or PRs.** No `Co-Authored-By: Claude`
|
|
43
|
+
trailers, no "Generated with Claude Code" footers, no other AI metadata.
|
|
44
|
+
This is a hard rule — see `.context/decisions.md`.
|
|
45
|
+
- **Dependencies kept minimal.** `fastmcp`, `httpx`, `pydantic` (transitive
|
|
46
|
+
via fastmcp). Anything beyond these needs an entry in
|
|
47
|
+
`.context/decisions.md`.
|
|
48
|
+
|
|
49
|
+
## Working principles
|
|
50
|
+
|
|
51
|
+
How to make changes — separate from *what tools* to use.
|
|
52
|
+
|
|
53
|
+
- **No over-engineering.** The smallest thing that solves the task. No
|
|
54
|
+
premature abstractions, no helper for a one-shot call site, no error
|
|
55
|
+
handling for cases that can't happen, no design for hypothetical future
|
|
56
|
+
requirements. Three similar lines beat a premature abstraction.
|
|
57
|
+
- **Avoid special-case ladders.** Don't solve every edge case by adding
|
|
58
|
+
another `if/else` — that's how the code rots. `if/else` is the right answer
|
|
59
|
+
only when avoiding it would itself be over-engineering (e.g. a class
|
|
60
|
+
hierarchy or strategy pattern for two cases). Otherwise push the special
|
|
61
|
+
case into the data, the type, or the boundary so the main path stays
|
|
62
|
+
straight.
|
|
63
|
+
- **No workarounds for blockers — fix the root cause.** When something fails,
|
|
64
|
+
don't bypass it. No `--no-verify`, no broad `# type: ignore`, no
|
|
65
|
+
`except: pass` to swallow exceptions, no commenting out a failing test, no
|
|
66
|
+
hardcoding values to "make the test pass". Investigate the actual cause and
|
|
67
|
+
fix that.
|
|
68
|
+
- **Pushback on tooling rules is welcome — talk to the user first.** If a
|
|
69
|
+
ruff lint or pyright check seems wrong for this codebase, don't sprinkle
|
|
70
|
+
`# noqa` / `# type: ignore` to silence it. Surface it: "this rule fires on
|
|
71
|
+
X, here's why I think it's not useful here — should we disable it
|
|
72
|
+
project-wide?" The output is a real decision recorded in `pyproject.toml`
|
|
73
|
+
(and `.context/decisions.md` if the rationale is non-obvious), not inline
|
|
74
|
+
suppressions scattered through the code.
|
|
75
|
+
|
|
76
|
+
## How to run things
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
uv sync # install deps + create .venv
|
|
80
|
+
uv run mapy-com-mcp # run the server (stdio by default)
|
|
81
|
+
uv run pytest # run tests
|
|
82
|
+
uv run pytest --cov=src/mapy_com_mcp # tests with coverage
|
|
83
|
+
pre-commit run --all-files # lint + type-check everything
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Git workflow
|
|
87
|
+
|
|
88
|
+
Explicit rules so agent-driven work doesn't pollute `main` or muddy history.
|
|
89
|
+
|
|
90
|
+
- **Branching.** Never commit directly to `main`. Every change goes on a
|
|
91
|
+
feature branch off `main`. Naming: `<type>/<kebab-description>` where
|
|
92
|
+
`<type>` is one of `feat`, `fix`, `chore`, `docs`, `refactor`, `test`,
|
|
93
|
+
`ci`. Examples: `feat/ping-tool`, `chore/scaffold-pyproject`,
|
|
94
|
+
`docs/agents-and-subagents`.
|
|
95
|
+
- **Commits.** Conventional Commits: `<type>(<scope>)?: <subject>`,
|
|
96
|
+
imperative mood, lowercase subject, no trailing period, ≤72 chars on the
|
|
97
|
+
subject line. Body wrapped at 72, used for the *why*, not the *what*.
|
|
98
|
+
Examples: `feat(tools): add ping tool`,
|
|
99
|
+
`chore: scaffold pyproject and src layout`.
|
|
100
|
+
- **No AI attribution** in commit messages or PR descriptions. (See
|
|
101
|
+
Standards above.)
|
|
102
|
+
- **PRs.** Target `main`. Title in Conventional Commits format. Description
|
|
103
|
+
has a short *why*, a bulleted summary of changes, and a test-plan
|
|
104
|
+
checklist. Reference the related issue if any.
|
|
105
|
+
- **No force-push to `main`.** No `--no-verify`, `--no-gpg-sign`, or
|
|
106
|
+
hook-skipping unless the user explicitly asks. Pre-commit failures get
|
|
107
|
+
fixed, not bypassed.
|
|
108
|
+
- **One logical change per PR.** If a branch grows two unrelated changes,
|
|
109
|
+
split it.
|
|
110
|
+
- **Agent commit policy.** Agents only create commits when the user asks.
|
|
111
|
+
Never auto-commit, never auto-push. PRs are opened only on explicit
|
|
112
|
+
request.
|
|
113
|
+
|
|
114
|
+
## Multi-agent workflow
|
|
115
|
+
|
|
116
|
+
This repo runs with two narrow Claude Code sub-agents alongside the main
|
|
117
|
+
agent. They are defined in `.claude/agents/`:
|
|
118
|
+
|
|
119
|
+
- **`test-agent`** — the only agent allowed to edit files in `tests/` or run
|
|
120
|
+
`pytest`. Evaluates failures and decides whether they're real bugs (→
|
|
121
|
+
feedback to main agent) or stale tests (→ updates the test).
|
|
122
|
+
- **`review-agent`** — read-only. Independent reviewer that checks the main
|
|
123
|
+
agent's work for shortcuts, inconsistencies, standards violations, docs
|
|
124
|
+
alignment, and accidentally-committed secrets.
|
|
125
|
+
|
|
126
|
+
### When the main agent finishes a unit of work that touches code
|
|
127
|
+
|
|
128
|
+
Before declaring "done", the main agent **must**:
|
|
129
|
+
|
|
130
|
+
1. **Invoke `test-agent`** (Agent tool, `subagent_type: test-agent`) with a
|
|
131
|
+
brief that includes (a) what changed and (b) **testing hints** — your
|
|
132
|
+
suggestions for what's worth testing in the new code (happy path, edge
|
|
133
|
+
cases, failure modes, the boundary most likely to break). test-agent
|
|
134
|
+
takes these as suggestions, exercises its own judgment, runs the suite,
|
|
135
|
+
adds tests for new features, evaluates failures, and updates
|
|
136
|
+
`tests/README.md` as part of its work. It returns either "green" or
|
|
137
|
+
actionable feedback.
|
|
138
|
+
2. **Invoke `review-agent`** (`subagent_type: review-agent`) with the same
|
|
139
|
+
brief. review-agent returns text feedback only.
|
|
140
|
+
3. **Surface review-agent's feedback to the user verbatim** (or summarized
|
|
141
|
+
faithfully) and discuss it before applying anything. The main agent does
|
|
142
|
+
not silently apply review-agent suggestions, and does not silently
|
|
143
|
+
dismiss them. The user is the arbiter — for each `must_fix` /
|
|
144
|
+
`should_fix` item, the main agent states its own take (agree / disagree
|
|
145
|
+
/ propose alternative) and waits for the user's call.
|
|
146
|
+
4. **Apply whatever the user agreed to.** If non-trivial code changed,
|
|
147
|
+
re-invoke test-agent and review-agent as needed.
|
|
148
|
+
|
|
149
|
+
### Boundaries
|
|
150
|
+
|
|
151
|
+
- Only `test-agent` edits files under `tests/` or runs `pytest`.
|
|
152
|
+
- `review-agent` is read-only — it never edits files, never runs `pytest`,
|
|
153
|
+
never runs commands that mutate state.
|
|
154
|
+
- The main agent does **not** modify tests directly, even to "make CI green".
|
|
155
|
+
When a test fails, the main agent asks test-agent to evaluate it first.
|
|
156
|
+
|
|
157
|
+
### Skip rule
|
|
158
|
+
|
|
159
|
+
Doc-only changes (`README.md`, `.context/`, `AGENTS.md`, `CLAUDE.md`) don't
|
|
160
|
+
require test-agent. review-agent is still invoked for consistency/standards
|
|
161
|
+
review on substantive doc changes, and its feedback is still discussed with
|
|
162
|
+
the user.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
AGENTS.md
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vit Kostejn
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mapy-com-mcp
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: Unofficial MCP server for mapy.com. Not affiliated with, endorsed by, or supported by Seznam.cz a.s., operators of mapy.com.
|
|
5
|
+
Project-URL: Homepage, https://github.com/kostejnv/mapy-com-mcp
|
|
6
|
+
Project-URL: Source, https://github.com/kostejnv/mapy-com-mcp
|
|
7
|
+
Project-URL: Issues, https://github.com/kostejnv/mapy-com-mcp/issues
|
|
8
|
+
Author-email: Vit Kostejn <emma@outfindo.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: geocoding,maps,mapy,mapy.com,mcp,model-context-protocol
|
|
12
|
+
Classifier: Development Status :: 1 - Planning
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Requires-Dist: fastmcp>=2.0
|
|
22
|
+
Requires-Dist: httpx>=0.27
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
<div align="center">
|
|
26
|
+
|
|
27
|
+
# mapy-com-mcp
|
|
28
|
+
|
|
29
|
+
MCP server that gives LLM clients first-class access to [mapy.com](https://mapy.com) — a Czech mapping service with strong route planning and static map rendering.
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/mapy-com-mcp/)
|
|
32
|
+
[](https://pypi.org/project/mapy-com-mcp/)
|
|
33
|
+
[](LICENSE)
|
|
34
|
+
[](https://github.com/astral-sh/ruff)
|
|
35
|
+
[](https://modelcontextprotocol.io)
|
|
36
|
+
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
> [!WARNING]
|
|
40
|
+
> **Work in progress.** The package name is reserved on PyPI but no tools have shipped yet. The first usable release will land after the setup milestones complete.
|
|
41
|
+
|
|
42
|
+
> [!NOTE]
|
|
43
|
+
> **Unofficial.** Not affiliated with, endorsed by, or supported by Seznam.cz a.s., operators of mapy.com. Trademarks belong to their respective owners.
|
|
44
|
+
|
|
45
|
+
## Why
|
|
46
|
+
|
|
47
|
+
LLMs are good at recommending places and itineraries, but bad at anything requiring real spatial understanding — distances, walkability, what's near what. This MCP closes that gap by letting LLMs geocode the places they suggest and render static map images they can reason about visually, then share the same view back to the user.
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# mapy-com-mcp
|
|
4
|
+
|
|
5
|
+
MCP server that gives LLM clients first-class access to [mapy.com](https://mapy.com) — a Czech mapping service with strong route planning and static map rendering.
|
|
6
|
+
|
|
7
|
+
[](https://pypi.org/project/mapy-com-mcp/)
|
|
8
|
+
[](https://pypi.org/project/mapy-com-mcp/)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://github.com/astral-sh/ruff)
|
|
11
|
+
[](https://modelcontextprotocol.io)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
> [!WARNING]
|
|
16
|
+
> **Work in progress.** The package name is reserved on PyPI but no tools have shipped yet. The first usable release will land after the setup milestones complete.
|
|
17
|
+
|
|
18
|
+
> [!NOTE]
|
|
19
|
+
> **Unofficial.** Not affiliated with, endorsed by, or supported by Seznam.cz a.s., operators of mapy.com. Trademarks belong to their respective owners.
|
|
20
|
+
|
|
21
|
+
## Why
|
|
22
|
+
|
|
23
|
+
LLMs are good at recommending places and itineraries, but bad at anything requiring real spatial understanding — distances, walkability, what's near what. This MCP closes that gap by letting LLMs geocode the places they suggest and render static map images they can reason about visually, then share the same view back to the user.
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "mapy-com-mcp"
|
|
7
|
+
version = "0.0.0"
|
|
8
|
+
description = "Unofficial MCP server for mapy.com. Not affiliated with, endorsed by, or supported by Seznam.cz a.s., operators of mapy.com."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.12"
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "Vit Kostejn", email = "emma@outfindo.com" },
|
|
15
|
+
]
|
|
16
|
+
keywords = ["mcp", "model-context-protocol", "mapy", "mapy.com", "maps", "geocoding"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 1 - Planning",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Topic :: Scientific/Engineering :: GIS",
|
|
25
|
+
"Topic :: Software Development :: Libraries",
|
|
26
|
+
]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"fastmcp>=2.0",
|
|
29
|
+
"httpx>=0.27",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.scripts]
|
|
33
|
+
mapy-com-mcp = "mapy_com_mcp.server:main"
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://github.com/kostejnv/mapy-com-mcp"
|
|
37
|
+
Source = "https://github.com/kostejnv/mapy-com-mcp"
|
|
38
|
+
Issues = "https://github.com/kostejnv/mapy-com-mcp/issues"
|
|
39
|
+
|
|
40
|
+
[dependency-groups]
|
|
41
|
+
dev = [
|
|
42
|
+
"ruff>=0.6",
|
|
43
|
+
"pyright>=1.1.380",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[tool.hatch.build.targets.wheel]
|
|
47
|
+
packages = ["src/mapy_com_mcp"]
|
|
48
|
+
|
|
49
|
+
[tool.ruff]
|
|
50
|
+
line-length = 88
|
|
51
|
+
target-version = "py312"
|
|
52
|
+
|
|
53
|
+
[tool.ruff.lint]
|
|
54
|
+
select = [
|
|
55
|
+
"E", # pycodestyle errors
|
|
56
|
+
"W", # pycodestyle warnings
|
|
57
|
+
"F", # pyflakes
|
|
58
|
+
"I", # isort
|
|
59
|
+
"B", # flake8-bugbear
|
|
60
|
+
"UP", # pyupgrade
|
|
61
|
+
"N", # pep8-naming
|
|
62
|
+
"RUF", # ruff-specific
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
[tool.pyright]
|
|
66
|
+
include = ["src", "tests"]
|
|
67
|
+
pythonVersion = "3.12"
|
|
68
|
+
typeCheckingMode = "strict"
|
|
69
|
+
venvPath = "."
|
|
70
|
+
venv = ".venv"
|
|
File without changes
|