testmcpy 0.1.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.
testmcpy-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,272 @@
1
+ Metadata-Version: 2.4
2
+ Name: testmcpy
3
+ Version: 0.1.0
4
+ Summary: A comprehensive testing framework for validating LLM tool calling capabilities with MCP services
5
+ Author-email: Preset <amin@preset.io>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/preset-io/testmcpy
8
+ Project-URL: Repository, https://github.com/preset-io/testmcpy
9
+ Project-URL: Issues, https://github.com/preset-io/testmcpy/issues
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.8
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: typer>=0.9.0
23
+ Requires-Dist: rich>=13.0.0
24
+ Requires-Dist: pyyaml>=6.0
25
+ Requires-Dist: requests>=2.28.0
26
+ Requires-Dist: aiohttp>=3.8.0
27
+ Requires-Dist: ollama>=0.1.0
28
+ Requires-Dist: anthropic>=0.39.0
29
+ Requires-Dist: fastmcp>=0.2.0
30
+ Requires-Dist: httpx>=0.27.0
31
+ Requires-Dist: python-dotenv>=1.0.0
32
+ Requires-Dist: click>=8.0.0
33
+ Requires-Dist: shellingham>=1.3.0
34
+ Provides-Extra: dev
35
+ Requires-Dist: black>=23.0.0; extra == "dev"
36
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
37
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
38
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
39
+ Dynamic: license-file
40
+
41
+ # testmcpy - MCP Testing Framework
42
+
43
+ A comprehensive testing framework for validating LLM tool calling capabilities with MCP (Model Context Protocol) services, specifically designed for testing Superset operations.
44
+
45
+ ## Quick Start
46
+
47
+ ### Installation
48
+
49
+ **From source (development):**
50
+ ```bash
51
+ git clone https://github.com/preset-io/testmcpy.git
52
+ cd testmcpy
53
+ pip install -e .
54
+ ```
55
+
56
+ **From PyPI (once published):**
57
+ ```bash
58
+ pip install testmcpy
59
+ ```
60
+
61
+ **Via Homebrew (once published to PyPI):**
62
+ ```bash
63
+ brew tap preset-io/testmcpy
64
+ brew install testmcpy
65
+ ```
66
+
67
+ See [INSTALLATION.md](INSTALLATION.md) for detailed installation instructions and distribution options.
68
+
69
+ ### Quick Usage
70
+
71
+ ```bash
72
+ # List MCP tools
73
+ testmcpy tools
74
+ testmcpy tools --detail --filter chart
75
+
76
+ # Research LLM capabilities
77
+ testmcpy research --model claude-sonnet-4.5-20250929 --provider anthropic
78
+
79
+ # Run test suites
80
+ testmcpy run tests/ --model claude-3-5-haiku-20241022 --provider anthropic
81
+
82
+ # Interactive chat
83
+ testmcpy chat --provider anthropic --model claude-sonnet-4.5-20250929
84
+
85
+ # Compare test results
86
+ testmcpy report reports/model1.yaml reports/model2.yaml
87
+
88
+ # Initialize new project
89
+ testmcpy init my_project
90
+ ```
91
+
92
+ ## Framework Structure
93
+
94
+ ```
95
+ mcp_testing/
96
+ ├── research/ # Research scripts for testing LLM capabilities
97
+ │ └── test_ollama_tools.py
98
+ ├── src/ # Core framework modules
99
+ │ ├── mcp_client.py # MCP protocol client
100
+ │ ├── llm_integration.py # LLM provider abstraction
101
+ │ └── test_runner.py # Test execution engine
102
+ ├── evals/ # Evaluation functions
103
+ │ └── base_evaluators.py # Standard evaluators
104
+ ├── tests/ # Test cases (YAML/JSON)
105
+ │ ├── basic_test.yaml
106
+ │ └── example_mcp_tests.yaml
107
+ ├── reports/ # Test reports and comparisons
108
+ └── cli.py # CLI interface
109
+
110
+ ```
111
+
112
+ ## Writing Test Cases
113
+
114
+ Test cases are defined in YAML files:
115
+
116
+ ```yaml
117
+ version: "1.0"
118
+ name: "My Test Suite"
119
+
120
+ tests:
121
+ - name: "test_chart_creation"
122
+ prompt: "Create a bar chart showing sales by region"
123
+ expected_tools:
124
+ - "create_chart"
125
+ evaluators:
126
+ - name: "was_mcp_tool_called"
127
+ args:
128
+ tool_name: "create_chart"
129
+ - name: "execution_successful"
130
+ - name: "final_answer_contains"
131
+ args:
132
+ expected_content: ["chart", "created"]
133
+ - name: "within_time_limit"
134
+ args:
135
+ max_seconds: 30
136
+ ```
137
+
138
+ ## Available Evaluators
139
+
140
+ ### Generic Evaluators
141
+ - `was_mcp_tool_called` - Verify MCP tool was called
142
+ - `execution_successful` - Check for successful execution
143
+ - `final_answer_contains` - Validate response content
144
+ - `answer_contains_link` - Check for links in response
145
+ - `within_time_limit` - Verify performance
146
+ - `token_usage_reasonable` - Check token/cost efficiency
147
+
148
+ ### Superset-Specific Evaluators
149
+ - `was_superset_chart_created` - Verify chart creation
150
+ - `sql_query_valid` - Validate SQL syntax
151
+
152
+ ## Supported LLM Providers
153
+
154
+ - **Claude Agent SDK** (`claude-sdk`) - Official Anthropic SDK ⚠️ **Limited MCP Support**
155
+ - claude-sonnet-4.5-20250929 (newest, most capable)
156
+ - claude-sonnet-4-20250514
157
+ - claude-3-5-sonnet-20241022
158
+ - claude-3-5-haiku-20241022
159
+ - All Claude models
160
+ - Requires: `ANTHROPIC_API_KEY` environment variable
161
+ - Features: Native tool calling, streaming, hooks
162
+ - **Note**: Designed for stdio-based MCP servers, **not HTTP-based services**
163
+ - **For HTTP MCP (like Superset)**: Use `anthropic` provider instead
164
+
165
+ - **Anthropic API** (`anthropic`) - Direct API integration ✅ **Recommended for HTTP MCP**
166
+ - claude-sonnet-4.5-20250929 (newest, recommended)
167
+ - claude-sonnet-4-20250514
168
+ - claude-3-5-sonnet-20241022
169
+ - claude-3-5-haiku-20241022 (fast, cost-effective)
170
+ - claude-3-opus-20240229
171
+ - All Claude models via API
172
+ - Requires: `ANTHROPIC_API_KEY` environment variable
173
+ - **Full support for HTTP-based MCP services** (like Superset MCP)
174
+ - Best choice for production testing with MCP tools
175
+
176
+ - **Ollama** (`ollama`) - Local models with tool calling support
177
+ - llama3.1:8b (recommended)
178
+ - mistral-nemo
179
+ - qwen2.5:7b
180
+
181
+ - **OpenAI** (`openai`) - GPT models via API
182
+ - Requires: `OPENAI_API_KEY` environment variable
183
+
184
+ - **Local** (`local`) - Transformers-based local models
185
+
186
+ - **Claude CLI** (`claude-cli`) - Claude Code CLI interface
187
+ - Uses Claude Code binary
188
+
189
+ ## Configuration
190
+
191
+ ### Environment Variables
192
+
193
+ ```bash
194
+ # For Claude providers (claude-sdk, anthropic)
195
+ export ANTHROPIC_API_KEY="sk-ant-..."
196
+
197
+ # For OpenAI provider
198
+ export OPENAI_API_KEY="sk-..."
199
+
200
+ # MCP service URL (optional, defaults to http://localhost:5008/mcp/)
201
+ export MCP_URL="http://localhost:5008/mcp/"
202
+
203
+ # Default model and provider (optional)
204
+ export DEFAULT_MODEL="claude-sonnet-4.5-20250929"
205
+ export DEFAULT_PROVIDER="anthropic"
206
+ ```
207
+
208
+ ### Configuration File
209
+
210
+ Create `mcp_test_config.yaml`:
211
+
212
+ ```yaml
213
+ mcp_url: "http://localhost:5008/mcp"
214
+ default_model: "claude-sonnet-4.5-20250929"
215
+ default_provider: "anthropic"
216
+ evaluators:
217
+ timeout: 30
218
+ max_tokens: 2000
219
+ max_cost: 0.10
220
+ ```
221
+
222
+ ## Development Status
223
+
224
+ ### Phase 0: Research & Prototype ✅
225
+ - [x] Research local LLM options with tool calling
226
+ - [x] Build minimal Python script for LLM+MCP integration
227
+ - [x] Validate tool calling with selected LLM
228
+ - [x] Create basic framework structure
229
+
230
+ ### Phase 1: Foundation (In Progress)
231
+ - [x] CLI framework with typer + rich
232
+ - [x] Basic test execution engine
233
+ - [x] MCP protocol client
234
+ - [x] LLM provider abstraction
235
+ - [x] Core evaluation functions
236
+ - [ ] Integration with existing Superset tests
237
+
238
+ ### Phase 2: Core Features (Planned)
239
+ - [ ] Multi-model comparison support
240
+ - [ ] Advanced reporting with charts
241
+ - [ ] Test suite versioning
242
+ - [ ] Parallel test execution
243
+
244
+ ### Phase 3: Advanced Capabilities (Future)
245
+ - [ ] CI/CD integration
246
+ - [ ] Interactive test development mode
247
+ - [ ] Performance profiling
248
+ - [ ] Cost optimization insights
249
+
250
+ ## Known Limitations
251
+
252
+ - **Claude SDK Provider**: Only supports stdio-based MCP servers (command-line tools)
253
+ - **Not compatible** with HTTP-based MCP services (like Superset MCP)
254
+ - Use `anthropic` provider for HTTP MCP services
255
+ - **HTTP MCP Services**: Use `anthropic` provider (fully supported)
256
+ - **Ollama models**: Require specific formatting for reliable tool calling
257
+ - **CPU-only execution**: May be slow for larger local models
258
+ - **Tool calling accuracy**: Varies by model (Claude models generally most reliable)
259
+ - **Cost**: Claude API providers (`anthropic`) incur API costs; consider using Ollama for development
260
+
261
+ ## Contributing
262
+
263
+ This framework follows the patterns established by promptimize and superset-sup. When contributing:
264
+
265
+ 1. Use modern Python practices (type hints, async/await)
266
+ 2. Follow the existing code style
267
+ 3. Add tests for new evaluators
268
+ 4. Document new features in this README
269
+
270
+ ## License
271
+
272
+ Same as the parent promptimize project.
@@ -0,0 +1,232 @@
1
+ # testmcpy - MCP Testing Framework
2
+
3
+ A comprehensive testing framework for validating LLM tool calling capabilities with MCP (Model Context Protocol) services, specifically designed for testing Superset operations.
4
+
5
+ ## Quick Start
6
+
7
+ ### Installation
8
+
9
+ **From source (development):**
10
+ ```bash
11
+ git clone https://github.com/preset-io/testmcpy.git
12
+ cd testmcpy
13
+ pip install -e .
14
+ ```
15
+
16
+ **From PyPI (once published):**
17
+ ```bash
18
+ pip install testmcpy
19
+ ```
20
+
21
+ **Via Homebrew (once published to PyPI):**
22
+ ```bash
23
+ brew tap preset-io/testmcpy
24
+ brew install testmcpy
25
+ ```
26
+
27
+ See [INSTALLATION.md](INSTALLATION.md) for detailed installation instructions and distribution options.
28
+
29
+ ### Quick Usage
30
+
31
+ ```bash
32
+ # List MCP tools
33
+ testmcpy tools
34
+ testmcpy tools --detail --filter chart
35
+
36
+ # Research LLM capabilities
37
+ testmcpy research --model claude-sonnet-4.5-20250929 --provider anthropic
38
+
39
+ # Run test suites
40
+ testmcpy run tests/ --model claude-3-5-haiku-20241022 --provider anthropic
41
+
42
+ # Interactive chat
43
+ testmcpy chat --provider anthropic --model claude-sonnet-4.5-20250929
44
+
45
+ # Compare test results
46
+ testmcpy report reports/model1.yaml reports/model2.yaml
47
+
48
+ # Initialize new project
49
+ testmcpy init my_project
50
+ ```
51
+
52
+ ## Framework Structure
53
+
54
+ ```
55
+ mcp_testing/
56
+ ├── research/ # Research scripts for testing LLM capabilities
57
+ │ └── test_ollama_tools.py
58
+ ├── src/ # Core framework modules
59
+ │ ├── mcp_client.py # MCP protocol client
60
+ │ ├── llm_integration.py # LLM provider abstraction
61
+ │ └── test_runner.py # Test execution engine
62
+ ├── evals/ # Evaluation functions
63
+ │ └── base_evaluators.py # Standard evaluators
64
+ ├── tests/ # Test cases (YAML/JSON)
65
+ │ ├── basic_test.yaml
66
+ │ └── example_mcp_tests.yaml
67
+ ├── reports/ # Test reports and comparisons
68
+ └── cli.py # CLI interface
69
+
70
+ ```
71
+
72
+ ## Writing Test Cases
73
+
74
+ Test cases are defined in YAML files:
75
+
76
+ ```yaml
77
+ version: "1.0"
78
+ name: "My Test Suite"
79
+
80
+ tests:
81
+ - name: "test_chart_creation"
82
+ prompt: "Create a bar chart showing sales by region"
83
+ expected_tools:
84
+ - "create_chart"
85
+ evaluators:
86
+ - name: "was_mcp_tool_called"
87
+ args:
88
+ tool_name: "create_chart"
89
+ - name: "execution_successful"
90
+ - name: "final_answer_contains"
91
+ args:
92
+ expected_content: ["chart", "created"]
93
+ - name: "within_time_limit"
94
+ args:
95
+ max_seconds: 30
96
+ ```
97
+
98
+ ## Available Evaluators
99
+
100
+ ### Generic Evaluators
101
+ - `was_mcp_tool_called` - Verify MCP tool was called
102
+ - `execution_successful` - Check for successful execution
103
+ - `final_answer_contains` - Validate response content
104
+ - `answer_contains_link` - Check for links in response
105
+ - `within_time_limit` - Verify performance
106
+ - `token_usage_reasonable` - Check token/cost efficiency
107
+
108
+ ### Superset-Specific Evaluators
109
+ - `was_superset_chart_created` - Verify chart creation
110
+ - `sql_query_valid` - Validate SQL syntax
111
+
112
+ ## Supported LLM Providers
113
+
114
+ - **Claude Agent SDK** (`claude-sdk`) - Official Anthropic SDK ⚠️ **Limited MCP Support**
115
+ - claude-sonnet-4.5-20250929 (newest, most capable)
116
+ - claude-sonnet-4-20250514
117
+ - claude-3-5-sonnet-20241022
118
+ - claude-3-5-haiku-20241022
119
+ - All Claude models
120
+ - Requires: `ANTHROPIC_API_KEY` environment variable
121
+ - Features: Native tool calling, streaming, hooks
122
+ - **Note**: Designed for stdio-based MCP servers, **not HTTP-based services**
123
+ - **For HTTP MCP (like Superset)**: Use `anthropic` provider instead
124
+
125
+ - **Anthropic API** (`anthropic`) - Direct API integration ✅ **Recommended for HTTP MCP**
126
+ - claude-sonnet-4.5-20250929 (newest, recommended)
127
+ - claude-sonnet-4-20250514
128
+ - claude-3-5-sonnet-20241022
129
+ - claude-3-5-haiku-20241022 (fast, cost-effective)
130
+ - claude-3-opus-20240229
131
+ - All Claude models via API
132
+ - Requires: `ANTHROPIC_API_KEY` environment variable
133
+ - **Full support for HTTP-based MCP services** (like Superset MCP)
134
+ - Best choice for production testing with MCP tools
135
+
136
+ - **Ollama** (`ollama`) - Local models with tool calling support
137
+ - llama3.1:8b (recommended)
138
+ - mistral-nemo
139
+ - qwen2.5:7b
140
+
141
+ - **OpenAI** (`openai`) - GPT models via API
142
+ - Requires: `OPENAI_API_KEY` environment variable
143
+
144
+ - **Local** (`local`) - Transformers-based local models
145
+
146
+ - **Claude CLI** (`claude-cli`) - Claude Code CLI interface
147
+ - Uses Claude Code binary
148
+
149
+ ## Configuration
150
+
151
+ ### Environment Variables
152
+
153
+ ```bash
154
+ # For Claude providers (claude-sdk, anthropic)
155
+ export ANTHROPIC_API_KEY="sk-ant-..."
156
+
157
+ # For OpenAI provider
158
+ export OPENAI_API_KEY="sk-..."
159
+
160
+ # MCP service URL (optional, defaults to http://localhost:5008/mcp/)
161
+ export MCP_URL="http://localhost:5008/mcp/"
162
+
163
+ # Default model and provider (optional)
164
+ export DEFAULT_MODEL="claude-sonnet-4.5-20250929"
165
+ export DEFAULT_PROVIDER="anthropic"
166
+ ```
167
+
168
+ ### Configuration File
169
+
170
+ Create `mcp_test_config.yaml`:
171
+
172
+ ```yaml
173
+ mcp_url: "http://localhost:5008/mcp"
174
+ default_model: "claude-sonnet-4.5-20250929"
175
+ default_provider: "anthropic"
176
+ evaluators:
177
+ timeout: 30
178
+ max_tokens: 2000
179
+ max_cost: 0.10
180
+ ```
181
+
182
+ ## Development Status
183
+
184
+ ### Phase 0: Research & Prototype ✅
185
+ - [x] Research local LLM options with tool calling
186
+ - [x] Build minimal Python script for LLM+MCP integration
187
+ - [x] Validate tool calling with selected LLM
188
+ - [x] Create basic framework structure
189
+
190
+ ### Phase 1: Foundation (In Progress)
191
+ - [x] CLI framework with typer + rich
192
+ - [x] Basic test execution engine
193
+ - [x] MCP protocol client
194
+ - [x] LLM provider abstraction
195
+ - [x] Core evaluation functions
196
+ - [ ] Integration with existing Superset tests
197
+
198
+ ### Phase 2: Core Features (Planned)
199
+ - [ ] Multi-model comparison support
200
+ - [ ] Advanced reporting with charts
201
+ - [ ] Test suite versioning
202
+ - [ ] Parallel test execution
203
+
204
+ ### Phase 3: Advanced Capabilities (Future)
205
+ - [ ] CI/CD integration
206
+ - [ ] Interactive test development mode
207
+ - [ ] Performance profiling
208
+ - [ ] Cost optimization insights
209
+
210
+ ## Known Limitations
211
+
212
+ - **Claude SDK Provider**: Only supports stdio-based MCP servers (command-line tools)
213
+ - **Not compatible** with HTTP-based MCP services (like Superset MCP)
214
+ - Use `anthropic` provider for HTTP MCP services
215
+ - **HTTP MCP Services**: Use `anthropic` provider (fully supported)
216
+ - **Ollama models**: Require specific formatting for reliable tool calling
217
+ - **CPU-only execution**: May be slow for larger local models
218
+ - **Tool calling accuracy**: Varies by model (Claude models generally most reliable)
219
+ - **Cost**: Claude API providers (`anthropic`) incur API costs; consider using Ollama for development
220
+
221
+ ## Contributing
222
+
223
+ This framework follows the patterns established by promptimize and superset-sup. When contributing:
224
+
225
+ 1. Use modern Python practices (type hints, async/await)
226
+ 2. Follow the existing code style
227
+ 3. Add tests for new evaluators
228
+ 4. Document new features in this README
229
+
230
+ ## License
231
+
232
+ Same as the parent promptimize project.