agentic-mcp-solver 4.2.0__py3-none-any.whl
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.
- agentic_mcp_solver-4.2.0.dist-info/METADATA +318 -0
- agentic_mcp_solver-4.2.0.dist-info/RECORD +22 -0
- agentic_mcp_solver-4.2.0.dist-info/WHEEL +4 -0
- agentic_mcp_solver-4.2.0.dist-info/entry_points.txt +5 -0
- agentic_mcp_solver-4.2.0.dist-info/licenses/LICENSE +21 -0
- mcp_solver/__init__.py +20 -0
- mcp_solver/agent/__init__.py +1 -0
- mcp_solver/agent/cli.py +496 -0
- mcp_solver/agent/harness.py +258 -0
- mcp_solver/agent/mcp_server.py +508 -0
- mcp_solver/agent/runfolder.py +159 -0
- mcp_solver/helpers/__init__.py +7 -0
- mcp_solver/helpers/maxsat.py +79 -0
- mcp_solver/helpers/pysat.py +346 -0
- mcp_solver/helpers/z3.py +213 -0
- mcp_solver/templates/__init__.py +22 -0
- mcp_solver/templates/clingo.md +1305 -0
- mcp_solver/templates/cpmpy.md +124 -0
- mcp_solver/templates/didp.md +270 -0
- mcp_solver/templates/maxsat.md +192 -0
- mcp_solver/templates/pysat.md +186 -0
- mcp_solver/templates/z3.md +165 -0
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: agentic-mcp-solver
|
|
3
|
+
Version: 4.2.0
|
|
4
|
+
Summary: LLM-driven constraint solving (SAT, MaxSAT, SMT, CP, ASP) on top of agentic-python-coder
|
|
5
|
+
Author-email: Stefan Szeider <stefan@szeider.net>
|
|
6
|
+
License: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: <3.15,>=3.13
|
|
9
|
+
Provides-Extra: agent
|
|
10
|
+
Requires-Dist: agentic-python-coder>=3.4.4; extra == 'agent'
|
|
11
|
+
Requires-Dist: mcp-minion>=0.2.2; extra == 'agent'
|
|
12
|
+
Requires-Dist: mcp<3,>=1.25; extra == 'agent'
|
|
13
|
+
Requires-Dist: python-dotenv>=1.0.0; extra == 'agent'
|
|
14
|
+
Provides-Extra: all
|
|
15
|
+
Requires-Dist: agentic-python-coder>=3.4.4; extra == 'all'
|
|
16
|
+
Requires-Dist: clingo>=5.8.0; extra == 'all'
|
|
17
|
+
Requires-Dist: cpmpy>=0.9.24; extra == 'all'
|
|
18
|
+
Requires-Dist: didppy<0.12,>=0.11.1; extra == 'all'
|
|
19
|
+
Requires-Dist: mcp-minion>=0.2.2; extra == 'all'
|
|
20
|
+
Requires-Dist: mcp<3,>=1.25; extra == 'all'
|
|
21
|
+
Requires-Dist: pytest-asyncio>=0.26; extra == 'all'
|
|
22
|
+
Requires-Dist: pytest>=8.3.5; extra == 'all'
|
|
23
|
+
Requires-Dist: python-dotenv>=1.0.0; extra == 'all'
|
|
24
|
+
Requires-Dist: python-sat>=1.8.dev16; extra == 'all'
|
|
25
|
+
Requires-Dist: ruff>=0.4.10; extra == 'all'
|
|
26
|
+
Requires-Dist: z3-solver>=4.14.1.0; extra == 'all'
|
|
27
|
+
Provides-Extra: dev
|
|
28
|
+
Requires-Dist: ruff>=0.4.10; extra == 'dev'
|
|
29
|
+
Provides-Extra: test
|
|
30
|
+
Requires-Dist: clingo>=5.8.0; extra == 'test'
|
|
31
|
+
Requires-Dist: cpmpy>=0.9.24; extra == 'test'
|
|
32
|
+
Requires-Dist: didppy<0.12,>=0.11.1; extra == 'test'
|
|
33
|
+
Requires-Dist: pytest-asyncio>=0.26; extra == 'test'
|
|
34
|
+
Requires-Dist: pytest>=8.3.5; extra == 'test'
|
|
35
|
+
Requires-Dist: python-sat>=1.8.dev16; extra == 'test'
|
|
36
|
+
Requires-Dist: z3-solver>=4.14.1.0; extra == 'test'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# MCP Solver
|
|
40
|
+
|
|
41
|
+
[](https://opensource.org/licenses/MIT) [](https://www.python.org/)
|
|
42
|
+
|
|
43
|
+
An MCP server for constraint solving (SAT, MaxSAT, SMT, CP, ASP, DP). It turns
|
|
44
|
+
the connected LLM host into a solver-writing agent: the host gets a Python
|
|
45
|
+
kernel preloaded with a real solver library, modeling instructions for the
|
|
46
|
+
chosen backend, and a submission gate. The host encodes the problem, runs
|
|
47
|
+
and verifies it against the real solver, and submits the final program —
|
|
48
|
+
the outcome is the solution plus the verified solver program that produced
|
|
49
|
+
it.
|
|
50
|
+
|
|
51
|
+
> **Version 4 is a complete re-architecture.** Both the MCP interface and the
|
|
52
|
+
> solving engine changed; the design from the SAT 2025 paper (v3) lives on
|
|
53
|
+
> unchanged on the
|
|
54
|
+
> [`v3`](https://github.com/szeider/mcp-solver/tree/v3) branch.
|
|
55
|
+
> See [From v3 to v4](#from-v3-to-v4-a-new-architecture) below.
|
|
56
|
+
|
|
57
|
+
## The MCP server
|
|
58
|
+
|
|
59
|
+
`mcp-solver-serve` runs over stdio and works with any MCP host: Claude
|
|
60
|
+
Desktop, Claude Code, Cursor, or your own client. The host LLM does the
|
|
61
|
+
solving itself — the server is a solver toolkit; it runs no LLM and needs
|
|
62
|
+
no API key:
|
|
63
|
+
|
|
64
|
+
- **`select_backend(solver)`** sets up a persistent IPython kernel with the
|
|
65
|
+
backend's solver library and helper functions, and returns the modeling
|
|
66
|
+
instructions for that backend. Calling it again recycles the kernel for
|
|
67
|
+
the next problem.
|
|
68
|
+
- **Kernel tools** (`python_exec`, `python_reset`, `python_status`,
|
|
69
|
+
`python_interrupt`) let the host write, run, and verify a real solver
|
|
70
|
+
program; bare `python_exec` calls are routed to the solving kernel
|
|
71
|
+
automatically.
|
|
72
|
+
- **`submit_code(code)`** is the finish line: the final self-contained
|
|
73
|
+
program is syntax-checked and, on success, stored and linked back as an
|
|
74
|
+
MCP resource (`mcp-solver://submissions/{id}`), with the verdict as
|
|
75
|
+
structured content.
|
|
76
|
+
- **Resources:** `mcp-solver://guide` (backend selection and workflow) and
|
|
77
|
+
`mcp-solver://template/{solver}` (the full modeling instructions,
|
|
78
|
+
browsable without selecting).
|
|
79
|
+
- **Statistics** (optional): set `MCP_SOLVER_STATS=/path/to/stats.jsonl` in
|
|
80
|
+
the server's `env` to log one JSON line per solving episode — tool-call
|
|
81
|
+
counts, execution failures, submissions, wall time. Host tokens are
|
|
82
|
+
invisible to the server by protocol design; tool usage is the comparable
|
|
83
|
+
metric across hosts. (`submit_code` results also carry a compact stats
|
|
84
|
+
snapshot as structured content; the CLI path reports tokens and actual
|
|
85
|
+
OpenRouter cost via `--stats-json`.)
|
|
86
|
+
|
|
87
|
+
Claude Desktop configuration, straight from PyPI (no install step; see
|
|
88
|
+
[Installation](#installation) for why the package is called
|
|
89
|
+
`agentic-mcp-solver`):
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"mcpServers": {
|
|
94
|
+
"mcp-solver": {
|
|
95
|
+
"command": "uvx",
|
|
96
|
+
"args": ["--python", "3.14", "--from", "agentic-mcp-solver[agent]", "mcp-solver-serve"]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
From a checkout (the development path):
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"mcpServers": {
|
|
107
|
+
"mcp-solver": {
|
|
108
|
+
"command": "uv",
|
|
109
|
+
"args": ["run", "--project", "/path/to/mcp-solver", "--extra", "agent", "mcp-solver-serve"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The server needs no API key — the model doing the solving belongs to the
|
|
116
|
+
host. An [OpenRouter](https://openrouter.ai) key is required only for the
|
|
117
|
+
[command-line path](#command-line-use) below, which brings its own agent.
|
|
118
|
+
|
|
119
|
+
## Requirements
|
|
120
|
+
|
|
121
|
+
- Python 3.13 or 3.14 (not yet 3.15: the solver kernels run on the server's
|
|
122
|
+
Python version, and ortools and python-sat publish no 3.15 wheels yet)
|
|
123
|
+
- [uv](https://docs.astral.sh/uv/) (a hard runtime requirement: solver
|
|
124
|
+
libraries are supplied at solve time via `uv run --with`)
|
|
125
|
+
- An [OpenRouter](https://openrouter.ai) API key — for the CLI and benchmark
|
|
126
|
+
harness only; the MCP server itself runs without one
|
|
127
|
+
|
|
128
|
+
## Installation
|
|
129
|
+
|
|
130
|
+
> **The PyPI package is called `agentic-mcp-solver`.** The PyPI name
|
|
131
|
+
> `mcp-solver` is held by a third-party upload of stale v2.0.0 code, and a
|
|
132
|
+
> [PEP 541](https://peps.python.org/pep-0541/) name-transfer request is
|
|
133
|
+
> pending. Do not install `mcp-solver` from PyPI. The import package
|
|
134
|
+
> (`mcp_solver`) and the commands (`mcp-solver`, `mcp-solver-serve`) keep
|
|
135
|
+
> their names.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
uv tool install --python 3.14 "agentic-mcp-solver[agent]" # CLI + MCP server
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
From a checkout (development):
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
git clone https://github.com/szeider/mcp-solver.git
|
|
145
|
+
cd mcp-solver
|
|
146
|
+
uv venv # Python 3.13 or 3.14, per pyproject.toml
|
|
147
|
+
uv pip install -e ".[agent]"
|
|
148
|
+
|
|
149
|
+
# OpenRouter key — only needed for the CLI path, not the MCP server:
|
|
150
|
+
mkdir -p ~/.config/coder
|
|
151
|
+
echo 'OPENROUTER_API_KEY="sk-or-v1-..."' > ~/.config/coder/.env
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
See [INSTALL.md](INSTALL.md) for details and troubleshooting.
|
|
155
|
+
|
|
156
|
+
## Command-line use
|
|
157
|
+
|
|
158
|
+
The `mcp-solver` CLI runs the same solving pipeline without an MCP host,
|
|
159
|
+
which is handy for scripts and benchmarks:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
mcp-solver pysat "Place 8 non-attacking queens on an 8x8 board and give one solution."
|
|
163
|
+
mcp-solver pysat --problem tests/problems/pysat/n_queens.md
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The solution JSON goes to stdout; the submitted solver program (e.g.
|
|
167
|
+
`n_queens_code.py`) and a complete run log (`run_*.json`) land in the working
|
|
168
|
+
directory.
|
|
169
|
+
|
|
170
|
+
| Option | Description |
|
|
171
|
+
| ---------------- | ------------------------------------------------------ |
|
|
172
|
+
| `--problem FILE` | Read the task from a markdown file instead of text |
|
|
173
|
+
| `--model NAME` | Agent model: an alias like `gpt56terra` or a full OpenRouter ID (default: `gpt56terra`) |
|
|
174
|
+
| `--workdir DIR` | Working directory for the run (default: current dir) |
|
|
175
|
+
| `--step-limit N` | Maximum agent steps before stopping (default: 30) |
|
|
176
|
+
| `-q`, `--quiet` | Suppress per-step progress output |
|
|
177
|
+
| `--dev [PATH]` | Dev mode: take helpers and templates from a local checkout (bare `--dev` auto-detects; auto-on inside a checkout; also `MCP_SOLVER_DEV`) |
|
|
178
|
+
| `--no-dev` | Disable dev mode; use the published (PyPI-pinned) helpers |
|
|
179
|
+
| `--stats-json FILE` | Write the run statistics to `FILE` as JSON |
|
|
180
|
+
|
|
181
|
+
From an editable clone, the CLI runs in **dev mode**: helpers and templates
|
|
182
|
+
come from the source checkout (auto-detected), with one provenance line on
|
|
183
|
+
stderr.
|
|
184
|
+
|
|
185
|
+
### mcp-minion
|
|
186
|
+
|
|
187
|
+
The CLI runs **mcp-minion** underneath: a minimal ReAct agent over MCP,
|
|
188
|
+
developed in this repo as the workspace package [`minion/`](minion/). It is
|
|
189
|
+
a lightweight, batchable substitute for a full MCP host such as Claude
|
|
190
|
+
Desktop — point its standalone CLI at `mcp-solver-serve` (or any MCP server)
|
|
191
|
+
to script what a chat host would do interactively (see
|
|
192
|
+
[minion/README.md](minion/README.md)). The default agent model is
|
|
193
|
+
`gpt56terra`, the bundled alias for OpenRouter's `openai/gpt-5.6-terra`.
|
|
194
|
+
|
|
195
|
+
## Backends
|
|
196
|
+
|
|
197
|
+
Each backend is selected as the first CLI argument (or via the
|
|
198
|
+
`select_backend` tool). The right solver library is injected into the
|
|
199
|
+
solve-time kernel automatically.
|
|
200
|
+
|
|
201
|
+
| Backend | Domain | Solver library |
|
|
202
|
+
| -------- | ------------------------------- | ------------------- |
|
|
203
|
+
| `pysat` | Boolean satisfiability (SAT) | python-sat |
|
|
204
|
+
| `maxsat` | Weighted optimization | python-sat (RC2) |
|
|
205
|
+
| `z3` | SMT solving / verification | z3-solver |
|
|
206
|
+
| `cpmpy` | Constraint programming (CP) | cpmpy |
|
|
207
|
+
| `clingo` | Answer Set Programming (ASP) | clingo |
|
|
208
|
+
| `didp` | Dynamic programming (DIDP) | didppy |
|
|
209
|
+
|
|
210
|
+
MiniZinc mode from v3 is retired; constraint programming is now covered by
|
|
211
|
+
CPMpy. The `didp` backend is based on domain-independent dynamic programming
|
|
212
|
+
([Kuroiwa & Beck](https://didp.ai/); solved with
|
|
213
|
+
[didppy](https://didppy.readthedocs.io)'s anytime beam search): problems are
|
|
214
|
+
modeled as state transition systems, a natural fit for routing, sequencing,
|
|
215
|
+
scheduling, and packing.
|
|
216
|
+
|
|
217
|
+
## How it works
|
|
218
|
+
|
|
219
|
+
The base `mcp-solver` package is a dependency-free **solver helper library**
|
|
220
|
+
(`mcp_solver.helpers.{pysat,maxsat,z3}`; the CPMpy, Clingo, and DIDP
|
|
221
|
+
backends need no helper module). It is never pip-installed into your
|
|
222
|
+
environment; instead it is injected into each solve-time kernel via
|
|
223
|
+
`uv run --with mcp-solver==<version>`, alongside the backend's solver library.
|
|
224
|
+
This keeps the host environment clean and each solve reproducible.
|
|
225
|
+
|
|
226
|
+
Each backend ships a **project template**: a markdown prompt (package data)
|
|
227
|
+
with the encoding conventions, output format, and helper API for that
|
|
228
|
+
solver. The template goes to whoever solves: an MCP host receives it from
|
|
229
|
+
`select_backend`; the CLI hands it to its mcp-minion agent as the system
|
|
230
|
+
prompt. Either way, the solving LLM drives the write → execute → verify
|
|
231
|
+
loop in a persistent IPython kernel — the `ipython_mcp` server from
|
|
232
|
+
[agentic-python-coder](https://github.com/szeider/agentic-python-coder) —
|
|
233
|
+
and must end the solve by calling `submit_code` with the final
|
|
234
|
+
self-contained program (syntax-checked server-side, never written to disk
|
|
235
|
+
by the kernel). On the MCP path the accepted submission is linked back to
|
|
236
|
+
the host as a resource; on the CLI path the client extracts the last
|
|
237
|
+
successful submission, writes it to `<basename>_code.py`, and re-executes
|
|
238
|
+
it in a fresh `uv` kernel to produce the answer.
|
|
239
|
+
|
|
240
|
+
## Benchmark harness
|
|
241
|
+
|
|
242
|
+
`mcp-solver-bench` runs the bundled test problems in `tests/problems/<solver>/`
|
|
243
|
+
end-to-end and validates each result against a per-problem
|
|
244
|
+
`*_ground_truth.py` validator (which reads the solution JSON on stdin and
|
|
245
|
+
returns `{"valid": ..., "message": ...}`).
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
# Benchmark every backend
|
|
249
|
+
mcp-solver-bench
|
|
250
|
+
|
|
251
|
+
# Specific backends, several runs each, in parallel
|
|
252
|
+
mcp-solver-bench pysat z3 --runs 3 --jobs 4
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Each run is bounded by `--step-limit` (default: 30 agent steps), and results
|
|
256
|
+
are appended to `results.jsonl` in the output directory.
|
|
257
|
+
|
|
258
|
+
The same problems are also runnable as pytest end-to-end tests
|
|
259
|
+
(`uv run pytest minion/e2e_tests -k didp`), and `mcp-solver-runfolder
|
|
260
|
+
<solver> <problem> <dir>` materializes a standalone mcp-minion run folder
|
|
261
|
+
for any of them.
|
|
262
|
+
|
|
263
|
+
Current status: in our runs with `gpt-5.6-terra`, all 30 bundled test
|
|
264
|
+
problems solve correctly, including the four `didp` problems (TSPTW,
|
|
265
|
+
knapsack, weighted tardiness, talent scheduling), each solved to proven
|
|
266
|
+
optimality in every run. The MCP server path is validated with Claude Opus
|
|
267
|
+
as host: 229/229 instances across
|
|
268
|
+
[CP-Bench](https://doi.org/10.5281/zenodo.18034815) (101) and
|
|
269
|
+
[ASP-Bench](https://doi.org/10.5281/zenodo.18062939) (128) solve correctly
|
|
270
|
+
under strict semantic validation, as do the bundled SAT, MaxSAT, and SMT
|
|
271
|
+
problems.
|
|
272
|
+
|
|
273
|
+
## From v3 to v4: a new architecture
|
|
274
|
+
|
|
275
|
+
The SAT 2025 paper, ["Bridging Language Models and Symbolic Solvers via the
|
|
276
|
+
Model Context Protocol"](https://doi.org/10.4230/LIPIcs.SAT.2025.30),
|
|
277
|
+
documents **v3**: an MCP server exposing model-editing tools (`add_item`,
|
|
278
|
+
`replace_item`, `solve_model`, …) through which a chat LLM builds up a solver
|
|
279
|
+
model item by item, with solving happening inside the server.
|
|
280
|
+
|
|
281
|
+
**v4 follows the IPython-kernel approach** laid out in the
|
|
282
|
+
[CP-Agent](https://doi.org/10.1145/3786181.3788711) (LLM4Code 2026) and
|
|
283
|
+
[ASP-Bench](https://doi.org/10.1145/3786168.3788402) (NSE '26) papers:
|
|
284
|
+
instead of a
|
|
285
|
+
host LLM editing a model through protocol tools, a dedicated coding agent
|
|
286
|
+
works in a persistent IPython kernel, where it iteratively writes an actual
|
|
287
|
+
Python solver program, executes it against the real solver, verifies the
|
|
288
|
+
result independently, and only then submits the program as the answer.
|
|
289
|
+
|
|
290
|
+
| | v3 (SAT 2025 paper) | v4 (CP-Agent / ASP-Bench approach) |
|
|
291
|
+
| ------------------ | -------------------------------------------- | -------------------------------------------------- |
|
|
292
|
+
| Who does the work | The host chat LLM, via MCP editing tools | The host LLM (or **mcp-minion** for batch runs), as a solver programmer |
|
|
293
|
+
| Unit of work | Model items (`add_item`, `solve_model`, …) | A complete, runnable Python solver program |
|
|
294
|
+
| Execution | Inside the MCP server | In a persistent IPython kernel (`ipython_mcp`) |
|
|
295
|
+
| Verification | Manual, by the host LLM | Built into the loop: run → check → `submit_code` |
|
|
296
|
+
| Artifact | Transient model state | A verified, re-executable program you keep |
|
|
297
|
+
| Host interface | Many fine-grained model-editing tools | A solving kernel: `select_backend`, `python_exec`, `submit_code` |
|
|
298
|
+
| Backends | MiniZinc, PySAT, MaxSAT, Z3, ASP | PySAT, MaxSAT, Z3, CPMpy, Clingo, DIDP |
|
|
299
|
+
|
|
300
|
+
## Citations
|
|
301
|
+
|
|
302
|
+
- Stefan Szeider, "Bridging Language Models and Symbolic Solvers via the Model
|
|
303
|
+
Context Protocol", SAT 2025. Documents the v3 architecture (v3 branch).
|
|
304
|
+
[DOI 10.4230/LIPIcs.SAT.2025.30](https://doi.org/10.4230/LIPIcs.SAT.2025.30)
|
|
305
|
+
- Stefan Szeider, "CP-Agent: Agentic Constraint Programming", in
|
|
306
|
+
*Proceedings of the 3rd International Workshop on Large Language Models
|
|
307
|
+
For Code (LLM4Code 2026)*, pages 6–13, ACM, 2026. The IPython-kernel
|
|
308
|
+
approach behind v4.
|
|
309
|
+
[DOI 10.1145/3786181.3788711](https://doi.org/10.1145/3786181.3788711)
|
|
310
|
+
- Stefan Szeider, "ASP-Bench: From Natural Language to Logic Programs", in
|
|
311
|
+
*Proceedings of the 2026 IEEE/ACM 2nd International Workshop on
|
|
312
|
+
Neuro-Symbolic Software Engineering (NSE '26)*, pages 1–8, ACM, 2026.
|
|
313
|
+
The verification-gated benchmark methodology used by v4's test problems.
|
|
314
|
+
[DOI 10.1145/3786168.3788402](https://doi.org/10.1145/3786168.3788402)
|
|
315
|
+
|
|
316
|
+
## License
|
|
317
|
+
|
|
318
|
+
MIT; see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
mcp_solver/__init__.py,sha256=xdCgZ_Z2nXANXa7_xJ86jvuZp5n-_ifJhbxYB_ihHpE,824
|
|
2
|
+
mcp_solver/agent/__init__.py,sha256=4JdtspScfLwkf_6j4_h2hbRTUBRJ0Y5Bngs1a8qdNqA,78
|
|
3
|
+
mcp_solver/agent/cli.py,sha256=6FjneB6P78KImI4be6TDJWPk4V1GMCWuVo4giJpPKYI,16816
|
|
4
|
+
mcp_solver/agent/harness.py,sha256=pCfxL8Y-umHt85g1IPlWC_JvI5o-2ary4AX8JBrYLwc,8882
|
|
5
|
+
mcp_solver/agent/mcp_server.py,sha256=fin-KZKkVHlcvq__9g2Qu98asPs1HJdR20mrh-8w8oA,19536
|
|
6
|
+
mcp_solver/agent/runfolder.py,sha256=IIInVT8_v2kv1LLBVfW-RiXGvw7-hRcM6u3t-BxiUI8,5149
|
|
7
|
+
mcp_solver/helpers/__init__.py,sha256=snXQobv5psVFZNL7-y-JyBBzrYNdHrq26LVUUGnNyiY,326
|
|
8
|
+
mcp_solver/helpers/maxsat.py,sha256=8bFN78I-es5ypfGTjsFuah67EowekydZ336phwftnP4,2409
|
|
9
|
+
mcp_solver/helpers/pysat.py,sha256=IBKJtQAuL0d6WQizREEELZ0NiYhhT_fb_xJwbiXHr8E,11994
|
|
10
|
+
mcp_solver/helpers/z3.py,sha256=5Ey3f11GxurkJm320jMpy2jQZ5UncIFcK5oWFkifBhU,6980
|
|
11
|
+
mcp_solver/templates/__init__.py,sha256=XmBrTmEqNMUyzZz-8kpx_8N7PR9KccWPaSTrVzxQwfM,909
|
|
12
|
+
mcp_solver/templates/clingo.md,sha256=xIoak2RBplYC_hb7peq30xsw5sBxjd7n0abbV0A6iBU,54107
|
|
13
|
+
mcp_solver/templates/cpmpy.md,sha256=tFBQSncFwTN3lF0tqK0mkw2xFsJx35J1QB5vajvf63c,6222
|
|
14
|
+
mcp_solver/templates/didp.md,sha256=WyaLAVwFkyXDI-6an7lm7AfOz5kS2HfPIAQVbcejsR4,14001
|
|
15
|
+
mcp_solver/templates/maxsat.md,sha256=j2lWpp0XWgbAljBPbakDHVL4MWHtYHToKdQCvMEyj5I,7704
|
|
16
|
+
mcp_solver/templates/pysat.md,sha256=GI-9A_Z0Eai3QURh5xiMCSALu01Pb10SgphOsjLr12s,8038
|
|
17
|
+
mcp_solver/templates/z3.md,sha256=jVvrkvtpWlVNWvjFL7-iw4cuGL8yJ6Au49O26myCPdA,7012
|
|
18
|
+
agentic_mcp_solver-4.2.0.dist-info/METADATA,sha256=lE0pjIKPBuZhrou6xUTQmd5WRGEgRiOAAr4DgbUZeUU,15199
|
|
19
|
+
agentic_mcp_solver-4.2.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
20
|
+
agentic_mcp_solver-4.2.0.dist-info/entry_points.txt,sha256=F1KPPj_u03BlAC5c4JmzTB55bL1zblqB2wIQjCukG9c,213
|
|
21
|
+
agentic_mcp_solver-4.2.0.dist-info/licenses/LICENSE,sha256=iFVnqtTDxONRvFMe7Grm0CqGYIoP511_3RhtAGQzdI0,1071
|
|
22
|
+
agentic_mcp_solver-4.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Stefan Szeider
|
|
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.
|
mcp_solver/__init__.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""MCP Solver: LLM-driven constraint solving on top of agentic-python-coder.
|
|
2
|
+
|
|
3
|
+
The base package is the solver helper library (``mcp_solver.helpers``),
|
|
4
|
+
importable inside solve-time kernels. The product layer (CLI, templates,
|
|
5
|
+
MCP server) lives in ``mcp_solver.agent`` and requires the ``[agent]``
|
|
6
|
+
extra. Nothing is imported eagerly here so that the base package works
|
|
7
|
+
without any solver library installed.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
11
|
+
|
|
12
|
+
# PyPI distribution name. The `mcp-solver` name is held by an unrelated
|
|
13
|
+
# upload (PEP 541 request pending), so releases go out as `agentic-mcp-solver`
|
|
14
|
+
# for now. Solve kernels fetch the helper library under this name.
|
|
15
|
+
DIST_NAME = "agentic-mcp-solver"
|
|
16
|
+
|
|
17
|
+
try:
|
|
18
|
+
__version__ = version(DIST_NAME)
|
|
19
|
+
except PackageNotFoundError:
|
|
20
|
+
__version__ = "0.0.0.dev0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Product layer: CLI and solve orchestration. Requires the [agent] extra."""
|