Skip to content

Commit 0141efc

Browse files
committed
docs: Fix flag name from --mcp-port to --server
The clean PR branch is based on upstream/dev-agents (PR crytic#1502) which uses the '--server' flag name. Documentation was written for the development branch which used '--mcp-port', causing inconsistency. Changes: - AGENT_TESTING_GUIDE.md: Update all command examples - test-mcp-client.py: Fix error message - examples/README.md: Update all 3 command examples - examples/simple_agent.py: Fix error message - examples/langgraph_agent.py: Fix error message - tests/mcp/conftest.py: Fix pytest fixture command - .gitignore: Add Python cache patterns This ensures documentation matches the actual upstream implementation.
1 parent 8d80aa5 commit 0141efc

File tree

7 files changed

+13
-21
lines changed

7 files changed

+13
-21
lines changed

.gitignore

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ echidna-*.log
2929
# External C++ dependencies (build artifacts)
3030
libff/
3131

32-
# Internal planning and status documents
33-
MCP_IMPLEMENTATION_STATUS.md
34-
*_REPORT.md
35-
*_SUMMARY.md
36-
*_ANALYSIS.md
37-
PR_FILES_REVIEW.md
38-
prepare-pr.sh
39-
cleanup-history.sh
40-
41-
# Speckit files (use stash to restore - see .speckit-instructions.md)
42-
.speckit-instructions.md
32+
# Python cache files
33+
**/__pycache__/
34+
**/*.pyc

AGENT_TESTING_GUIDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cd /Users/daniel.a.tradito/Development/Audit/echidna-mcp
1717

1818
# Start Echidna with MCP server (background)
1919
~/.local/bin/echidna tests/mcp/contracts/EchidnaMCPTest.sol \
20-
--mcp-port 8080 \
20+
--server 8080 \
2121
--test-limit 1000000 &
2222

2323
# Wait for startup
@@ -213,7 +213,7 @@ mkdir -p corpus
213213

214214
# Start Echidna with corpus dir
215215
~/.local/bin/echidna tests/mcp/contracts/EchidnaMCPTest.sol \
216-
--mcp-port 8080 \
216+
--server 8080 \
217217
--corpus-dir ./corpus \
218218
--test-limit 1000000 &
219219

@@ -314,7 +314,7 @@ You should see:
314314
**Common issues:**
315315
1. **Wrong endpoint**: Use `/mcp` path → `http://localhost:8080/mcp`
316316
2. **Test limit reached**: Echidna exits when fuzzing completes
317-
3. **Wrong flag**: Use `--mcp-port` not `--server`
317+
3. **Correct flag**: Use `--server 8080` to enable MCP server
318318

319319
### Command log not created?
320320

examples/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ source ../.venv/bin/activate
2424
```bash
2525
# Start Echidna first
2626
cd ..
27-
~/.local/bin/echidna tests/mcp/contracts/EchidnaMCPTest.sol --mcp-port 8080 --test-limit 1000000 &
27+
~/.local/bin/echidna tests/mcp/contracts/EchidnaMCPTest.sol --server 8080 --test-limit 1000000 &
2828

2929
# Run agent
3030
source .venv/bin/activate
@@ -58,7 +58,7 @@ export ANTHROPIC_API_KEY=your_key_here
5858
```bash
5959
# Start Echidna first
6060
cd ..
61-
~/.local/bin/echidna tests/mcp/contracts/EchidnaMCPTest.sol --mcp-port 8080 --test-limit 1000000 &
61+
~/.local/bin/echidna tests/mcp/contracts/EchidnaMCPTest.sol --server 8080 --test-limit 1000000 &
6262

6363
# Run agent
6464
python examples/langgraph_agent.py
@@ -79,7 +79,7 @@ python examples/langgraph_agent.py
7979
```bash
8080
# Terminal 1: Start Echidna
8181
cd /Users/daniel.a.tradito/Development/Audit/echidna-mcp
82-
~/.local/bin/echidna tests/mcp/contracts/EchidnaMCPTest.sol --mcp-port 8080 --test-limit 1000000 &
82+
~/.local/bin/echidna tests/mcp/contracts/EchidnaMCPTest.sol --server 8080 --test-limit 1000000 &
8383

8484
# Terminal 2: Run simple agent
8585
source .venv/bin/activate

examples/langgraph_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def main():
267267
status = agent._call_mcp_tool("status")
268268
if "error" in status:
269269
print("❌ Cannot connect to Echidna MCP server")
270-
print(" Make sure Echidna is running with --mcp-port 8080")
270+
print(" Make sure Echidna is running with --server 8080")
271271
return
272272
print("✅ Connected to Echidna MCP server\n")
273273
except Exception as e:

examples/simple_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def main():
196196
status = agent.get_status()
197197
if not status:
198198
print("❌ Cannot connect to Echidna MCP server")
199-
print(" Make sure Echidna is running with --mcp-port 8080")
199+
print(" Make sure Echidna is running with --server 8080")
200200
sys.exit(1)
201201

202202
print("✅ Connected to Echidna MCP server")

test-mcp-client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def call_mcp_tool(tool_name: str, arguments: dict = None) -> dict:
3434
return response.json()
3535
except httpx.ConnectError:
3636
print(f"❌ Cannot connect to MCP server on port {MCP_PORT}")
37-
print(f" Make sure Echidna is running with --mcp-port {MCP_PORT}")
37+
print(f" Make sure Echidna is running with --server {MCP_PORT}")
3838
sys.exit(1)
3939
except Exception as e:
4040
print(f"❌ Error calling {tool_name}: {e}")

tests/mcp/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def test_with_campaign(echidna_campaign_running):
148148
cmd = [
149149
'echidna-test',
150150
contract_path,
151-
'--mcp-port', str(port),
151+
'--server', str(port),
152152
'--test-mode', 'assertion',
153153
'--test-limit', '1000'
154154
]

0 commit comments

Comments
 (0)