Skip to content

Commit 8bd4f95

Browse files
authored
Fix Ollama provider support and add CLI alias (#3)
* Fix Ollama provider support and add CLI alias - Fix Ollama provider to use empty API key and ensure base_url is set - Add 'mtef' as shorter alias for mcp-tef-cli command - Improve tool quality evaluation error handling - Add better prompt instructions for JSON output * Fix linting: remove trailing whitespace * Remove mcp-tef-cli, keep only mtef alias * Move default Ollama base URL to config constant - Add DEFAULT_OLLAMA_BASE_URL constant in settings.py - Use constant in get_base_url_for_provider() method - Use constant in llm_service.py for Ollama provider - Use constant in default_model configuration - Addresses code review feedback to avoid hardcoded values * Update docs and tests to use 'mtef' command instead of 'mcp-tef-cli' - Update all command examples in cli/README.md - Update test scripts to use 'mtef' command - Update GitHub workflow release notes to use 'mtef' - Keep package name references as 'mcp-tef-cli' for installation * Update workflow release notes to use mtef command * Update README.md to use 'mtef' command * Update all command references from 'mcp-tef-cli' to 'mtef' in Python source files - Update prog_name in __init__.py - Update all docstring examples in command files - Update error messages and help text - Keep package name as 'mcp-tef-cli' for installation
1 parent 4f15d3b commit 8bd4f95

21 files changed

+168
-139
lines changed

.github/workflows/release-cli.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ jobs:
120120
121121
```bash
122122
# Deploy latest mcp-tef server
123-
mcp-tef-cli deploy
123+
mtef deploy
124124
125125
# Deploy with API keys
126-
mcp-tef-cli deploy \
126+
mtef deploy \
127127
--env OPENROUTER_API_KEY=sk-xxx \
128128
--health-check
129129
```

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ The easiest way to deploy mcp-tef is using the CLI tool:
220220
uv tool install mcp-tef-cli
221221

222222
# Deploy latest version
223-
mcp-tef-cli deploy
223+
mtef deploy
224224

225225
# Deploy with API keys and health check
226-
mcp-tef-cli deploy \
226+
mtef deploy \
227227
--env OPENROUTER_API_KEY=sk-xxx \
228228
--health-check
229229
```

cli/README.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ uv tool install https://github.com/StacklokLabs/mcp-tef/releases/download/cli-v0
2525

2626
Replace `0.1.0` with the desired version. See [releases](https://github.com/StacklokLabs/mcp-tef/releases) for available versions.
2727

28-
This installs the CLI in an isolated environment and makes it available globally as `mcp-tef-cli`.
28+
This installs the CLI in an isolated environment and makes it available globally as `mtef`.
2929

3030
### Alternative: Install from Git Repository
3131

@@ -53,23 +53,23 @@ uv tool install --editable .
5353

5454
```bash
5555
# Deploy latest version
56-
mcp-tef-cli deploy
56+
mtef deploy
5757

5858
# Deploy with API keys and health check
59-
mcp-tef-cli deploy \
59+
mtef deploy \
6060
--env OPENROUTER_API_KEY=sk-xxx \
6161
--env ANTHROPIC_API_KEY=sk-xxx \
6262
--health-check
6363

6464
# Deploy specific version
65-
mcp-tef-cli deploy --version v0.2.1
65+
mtef deploy --version v0.2.1
6666
```
6767

6868
### Evaluate Tool Quality
6969

7070
```bash
7171
# Evaluate tool description quality from an MCP server
72-
mcp-tef-cli tool-quality \
72+
mtef tool-quality \
7373
--server-urls http://localhost:3000/sse \
7474
--model-provider openrouter \
7575
--model-name anthropic/claude-sonnet-4-5-20250929
@@ -79,7 +79,7 @@ mcp-tef-cli tool-quality \
7979

8080
```bash
8181
# Create a test case
82-
mcp-tef-cli test-case create \
82+
mtef test-case create \
8383
--name "Weather lookup" \
8484
--query "What is the weather in San Francisco?" \
8585
--expected-server "http://localhost:3000/sse" \
@@ -97,64 +97,64 @@ mcp-tef-cli test-case create \
9797
# "expected_tool_name": "get_weather"
9898
# }
9999
# ]
100-
mcp-tef-cli test-case create \
100+
mtef test-case create \
101101
--from-file test-cases.json \
102102
--set MCP_SERVER_URL=http://localhost:3000/sse
103103

104104
# List all test cases
105-
mcp-tef-cli test-case list
105+
mtef test-case list
106106

107107
# Get test case details
108-
mcp-tef-cli test-case get <test-case-id>
108+
mtef test-case get <test-case-id>
109109
```
110110

111111
### Execute Test Runs
112112

113113
```bash
114114
# Execute a test case with an LLM
115-
mcp-tef-cli test-run execute <test-case-id> \
115+
mtef test-run execute <test-case-id> \
116116
--model-provider openrouter \
117117
--model-name anthropic/claude-sonnet-4-5-20250929 \
118118
--api-key sk-xxx
119119

120120
# List test runs
121-
mcp-tef-cli test-run list
121+
mtef test-run list
122122

123123
# Get test run results
124-
mcp-tef-cli test-run get <test-run-id>
124+
mtef test-run get <test-run-id>
125125
```
126126

127127
### Analyze Tool Similarity
128128

129129
```bash
130130
# Run similarity analysis across MCP servers
131-
mcp-tef-cli similarity analyze \
131+
mtef similarity analyze \
132132
--server-urls http://localhost:3000/sse
133133

134134
# Generate similarity matrix
135-
mcp-tef-cli similarity matrix \
135+
mtef similarity matrix \
136136
--server-urls http://localhost:3000/sse
137137

138138
# Get differentiation recommendations for similar tools
139-
mcp-tef-cli similarity recommend \
139+
mtef similarity recommend \
140140
--server-urls http://localhost:3000/sse
141141
```
142142

143143
### Stop the Server
144144

145145
```bash
146146
# Stop and remove the container
147-
mcp-tef-cli stop
147+
mtef stop
148148
```
149149

150150
## Usage
151151

152-
### `mcp-tef-cli deploy`
152+
### `mtef deploy`
153153

154154
Deploy mcp-tef as a Docker container from GitHub Container Registry.
155155

156156
```bash
157-
mcp-tef-cli deploy [OPTIONS]
157+
mtef deploy [OPTIONS]
158158
```
159159

160160
#### Options
@@ -176,12 +176,12 @@ mcp-tef-cli deploy [OPTIONS]
176176
| `--restart TEXT` | `no` | Restart policy: `no`, `always`, `on-failure`, `unless-stopped` |
177177
| `--insecure` | False | Skip SSL certificate verification for health checks (for self-signed certs) |
178178

179-
### `mcp-tef-cli stop`
179+
### `mtef stop`
180180

181181
Stop and remove a deployed mcp-tef container.
182182

183183
```bash
184-
mcp-tef-cli stop [OPTIONS]
184+
mtef stop [OPTIONS]
185185
```
186186

187187
#### Options
@@ -197,16 +197,16 @@ mcp-tef-cli stop [OPTIONS]
197197

198198
```bash
199199
# Stop the default mcp-tef container
200-
mcp-tef-cli stop
200+
mtef stop
201201

202202
# Stop a named container
203-
mcp-tef-cli stop --name mcp-tef-dev
203+
mtef stop --name mcp-tef-dev
204204

205205
# Stop and remove the image to free disk space
206-
mcp-tef-cli stop --remove-image
206+
mtef stop --remove-image
207207

208208
# Force stop (immediate kill)
209-
mcp-tef-cli stop --force
209+
mtef stop --force
210210
```
211211

212212
## Usage Examples
@@ -216,7 +216,7 @@ mcp-tef-cli stop --force
216216
Deploy for local development with debug logging:
217217

218218
```bash
219-
mcp-tef-cli deploy \
219+
mtef deploy \
220220
--env LOG_LEVEL=DEBUG \
221221
--env OPENROUTER_API_KEY=sk-xxx \
222222
--health-check
@@ -227,7 +227,7 @@ mcp-tef-cli deploy \
227227
Deploy on a different port:
228228

229229
```bash
230-
mcp-tef-cli deploy --port 9000
230+
mtef deploy --port 9000
231231
```
232232

233233
### Environment File
@@ -245,15 +245,15 @@ DATABASE_URL=sqlite:///./data/mcp-tef.db
245245
Deploy with environment file:
246246

247247
```bash
248-
mcp-tef-cli deploy --env-file .env --health-check
248+
mtef deploy --env-file .env --health-check
249249
```
250250

251251
### Volume Mounting
252252

253253
Mount a local database directory:
254254

255255
```bash
256-
mcp-tef-cli deploy \
256+
mtef deploy \
257257
--volume ./data:/app/data:rw \
258258
--env DATABASE_URL=sqlite:///./data/mcp-tef.db
259259
```
@@ -263,7 +263,7 @@ mcp-tef-cli deploy \
263263
Deploy with restart policy and health check:
264264

265265
```bash
266-
mcp-tef-cli deploy \
266+
mtef deploy \
267267
--name mcp-tef-production \
268268
--port 8000 \
269269
--env-file .env.prod \
@@ -281,7 +281,7 @@ Deploy a locally built image for testing:
281281
docker build -t mcp-tef:test .
282282

283283
# Deploy local image
284-
mcp-tef-cli deploy --image mcp-tef:test --port 9000
284+
mtef deploy --image mcp-tef:test --port 9000
285285
```
286286

287287
## CI/CD Integration
@@ -313,7 +313,7 @@ jobs:
313313

314314
- name: Deploy mcp-tef server
315315
run: |
316-
mcp-tef-cli deploy \
316+
mtef deploy \
317317
--version latest \
318318
--port 8000 \
319319
--env OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }} \
@@ -346,7 +346,7 @@ Create environment file from secrets:
346346
347347
- name: Deploy mcp-tef server
348348
run: |
349-
mcp-tef-cli deploy \
349+
mtef deploy \
350350
--version latest \
351351
--port 8000 \
352352
--env-file .env.ci \
@@ -371,7 +371,7 @@ test:
371371
- uv tool install "mcp-tef-cli @ git+https://github.com/StacklokLabs/mcp-tef.git#subdirectory=cli"
372372
script:
373373
- |
374-
mcp-tef-cli deploy \
374+
mtef deploy \
375375
--env OPENROUTER_API_KEY=$OPENROUTER_API_KEY \
376376
--env ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
377377
--health-check
@@ -424,7 +424,7 @@ See the [main documentation](https://github.com/StacklokLabs/mcp-tef) for comple
424424
```
425425
426426
**Solution:**
427-
1. Use a different port: `mcp-tef-cli deploy --port 9000`
427+
1. Use a different port: `mtef deploy --port 9000`
428428
2. Or stop the conflicting container: `docker ps` and `docker stop <container>`
429429
430430
### Image Not Found
@@ -475,7 +475,7 @@ By default, containers are deployed in detached mode (`--detach`). In this mode:
475475

476476
- Containers are **not** automatically removed when stopped
477477
- Stopped containers persist and can accumulate over time
478-
- Use `mcp-tef-cli stop` to clean up containers when done
478+
- Use `mtef stop` to clean up containers when done
479479

480480
To manually list and clean up stopped containers:
481481
```bash
@@ -495,7 +495,7 @@ When mounting host directories that don't exist, Docker creates them with root o
495495
**Best practice:** Create host directories before mounting:
496496
```bash
497497
mkdir -p ./data
498-
mcp-tef-cli deploy --volume ./data:/app/data:rw
498+
mtef deploy --volume ./data:/app/data:rw
499499
```
500500

501501
## Development

cli/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies = [
2727
]
2828

2929
[project.scripts]
30-
mcp-tef-cli = "mcp_tef_cli:main"
30+
mtef = "mcp_tef_cli:main"
3131

3232
[project.urls]
3333
Homepage = "https://github.com/StacklokLabs/mcp-tef"

cli/src/mcp_tef_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020

2121
@click.group()
22-
@click.version_option(version=__version__, prog_name="mcp-tef-cli")
22+
@click.version_option(version=__version__, prog_name="mtef")
2323
def cli() -> None:
2424
"""mcp-tef CLI - MCP Tool Evaluation System.
2525

cli/src/mcp_tef_cli/commands/deploy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,19 +149,19 @@ def deploy(
149149
150150
\b
151151
# Deploy latest version
152-
mcp-tef-cli deploy
152+
mtef deploy
153153
154154
\b
155155
# Deploy specific version with API key
156-
mcp-tef-cli deploy --version v0.2.1 --env OPENROUTER_API_KEY=sk-xxx
156+
mtef deploy --version v0.2.1 --env OPENROUTER_API_KEY=sk-xxx
157157
158158
\b
159159
# Deploy with environment file and health check
160-
mcp-tef-cli deploy --env-file .env.prod --health-check
160+
mtef deploy --env-file .env.prod --health-check
161161
162162
\b
163163
# Deploy local test image
164-
mcp-tef-cli deploy --image my-test-image:dev --port 9000
164+
mtef deploy --image my-test-image:dev --port 9000
165165
"""
166166
try:
167167
# Parse environment variables

0 commit comments

Comments
 (0)