Skip to content

Latest commit

 

History

History
2636 lines (2005 loc) · 125 KB

File metadata and controls

2636 lines (2005 loc) · 125 KB

Changelog (Auto Generated by Claude Code with GLM model)

Click to expand v1.24.0 details

[1.24.0] - 2026-09-06

Added

  • Stata Discovery: Add uvx stata-mcp discover to list installed Stata paths on macOS and Windows, sorted and deduplicated with one path per line; return .app bundles on macOS and .exe files on Windows without launching Stata or changing configuration
  • Discovery Errors: Add OSNotSupported; unsupported operating systems print only OS not supported to stderr and exit with code 1, while no installations produces empty output and exit code 0
  • Audit Trail: Add append-only per-tool JSONL lifecycle ledgers, readable run IDs, client/protocol metadata, and cross-ledger security event IDs
  • Do-file Evidence: Execute immutable full-SHA-256 content-addressed snapshots and record original path, hash, size, reuse state, and generated logs
  • Local Debug Tracing: Add default-on local OpenTelemetry spans and immediate checkpoints for get_data_info and stata_do, with bounded file rotation and no default network export
  • Slow-call Diagnostics: Capture privacy-safe Python thread locations after 30 and 120 seconds and link slow events to Audit run IDs, trace/span IDs, and process IDs
  • Cross-platform CI: Exercise modern and legacy stdio protocols on Linux, macOS, and Windows with Python 3.11–3.13
  • Repository Audit Skill: Add the stata-audit skill to the repository's Stata toolbox plugin for inspecting and validating audit records, reviewing security decisions, and generating local HTML reports; the skill is separate from the PyPI package
  • Audit Documentation: Add English and Chinese guides for audit events, evidence inspection, snapshot verification, security linkage, and correlation with debug traces

Changed

  • MCP SDK: Migrate the high-level server from MCP Python SDK 1.x FastMCP to stable 2.x MCPServer, requiring mcp[cli]>=2.1.1,<3.0; the MCP-for-Stata package remains on the 1.x release line
  • Protocol Compatibility: Support modern 2026-07-28 negotiation while retaining legacy 2025-11-25 initialize-era clients
  • Data Info Performance: Reuse one parsed DataFrame within each handler instance so a single get_data_info request does not repeatedly read the same dataset; separate requests still use separate handlers
  • Project Metadata: Clarify the security-first PyPI description and synchronize multilingual README feature/security content

Fixed

  • Registry Metadata: Synchronize the MCP Registry server and PyPI package references with version 1.24.0

Security

  • Security Linkage: Mark blocked stata_do, get_data_info, and read_log calls as blocked with executed: false and linked sanitized records in audit/security.jsonl
  • Privacy: Redact credential-like fields and URL credentials/query/fragment data from persistent diagnostics; never persist dangerous do-file command text in the security ledger

Upgrade Notes

  • Python 3.11+ is still required. The SDK upgrade does not rename the existing MCP tools or CLI entry point.
  • Stata discovery is limited to macOS and Windows; existing Linux server and execution functionality remains available. Discovery checks installation files, not license validity, and may miss unregistered custom installations outside the searched locations.
  • New do-file snapshots use .statamcp/snapshot/objects/<full-sha256>.do, with per-run metadata in .statamcp/snapshot/metadata.jsonl.
  • Local debug tracing is enabled by default. Disable it with [DEBUG.tracing] ENABLED = false or STATA_MCP__DEBUG_TRACING_ON=false; audit records and snapshots are separate from rotating debug files.
  • get_data_info remains beta-gated on Windows by default; this release does not remove that restriction.
Click to expand v1.23.1 details

[1.23.1] - 2026-08-29

Security

  • Dependencies: Raise the minimum supported versions of MCP, cryptography, and pyasn1 to avoid known-vulnerable dependency ranges while retaining MCP 1.x compatibility
  • GitHub Actions: Apply least-privilege permissions to lint and label-sync workflows and correct the label-sync trigger to use master

Added

  • MCP Server: Add beta instructions for reliable Stata graph export and regression-table output
  • OpenSSF: Display the OpenSSF Best Practices badge consistently across all README translations

Changed

  • Release Workflow: Rename the PyPI publishing workflow display name without changing its release trigger
Click to expand v1.23.0 details

[1.23.0] - 2026-08-27

Security

  • Windows Stata Do: Prevent crafted do-file names from reaching cmd.exe through temporary wrapper paths by generating UUID-based wrapper names independent of user-controlled filenames
  • Windows Stata Do: Create temporary wrapper files atomically and verify cleanup after launch errors and monitored timeouts

Added

  • WorkBuddy: Add installer and verifier support for WorkBuddy, including the wb alias and preservation of existing MCP server entries
  • Pi: Add explicit-only Pi setup that installs pi-mcp-adapter when available, otherwise prepares ~/.pi/agent/mcp.json and reports that the integration is not yet active
  • GitHub Copilot CLI: Add installer and verifier support through copilot mcp add, with an isolated ~/.copilot/mcp-config.json fallback

Changed

  • Citations: Remove pinned package versions from citation metadata and README examples so citations remain valid across releases

Fixed

  • Docs: Correct DeepSeek Harness documentation rendering on the project site
Click to expand v1.22.0 details

[1.22.0] - 2026-08-13

Added

  • DeepSeek Harness: Add Day 0 support with equivalent dsh and deepseek-harness installer targets, a dedicated DSH patch entry, a 20-minute tool timeout, and duplicate protection based on id: stata-mcp
  • Data Info Cache: Add a versioned JSON Schema document with strict JSON serialization and cache compatibility checks
  • MCP Server: Add richer system instructions and an available-version hint

Changed

  • Ado Install: Avoid ctx.elicit so clients without MCP elicitation support can use the explicitly enabled unsafe profile
  • Dependencies: Allow uv-build versions from 0.11.28 up to, but not including, 0.13

Fixed

  • Data Info Cache: Preserve the flat cache shape, normalize non-finite values, and accept numeric Excel column names
Click to expand v1.21.4 details

[1.21.4] - 2026-08-05

Fixed

  • Installer: Keep installer's shell window open on errors, discover uv from standard paths, and handle piped execution safely
Click to expand v1.21.3 details

[1.21.3] - 2026-07-30

Fixed

  • Dependencies: Pinned mcp[cli] to <2.0 to prevent unexpected breaking changes from a future major version release
Click to expand v1.21.2 details

[1.21.2] - 2026-07-28

Added

  • Configuration: BETA.enable_windows_data_info option and STATA_MCP__ENABLE_WINDOWS_DATA_INFO environment variable to opt into the get_data_info MCP tool on Windows
  • MCP Server: Windows-only beta gate that hides get_data_info from the MCP tool list unless the beta flag is enabled

Changed

  • MCP Server: get_data_info is no longer advertised on Windows by default while the Windows-specific MCP wrapper bug is being investigated
Click to expand v1.21.1 details

[1.21.1] - 2026-07-16

Added

  • Data Info: DATA_INFO_IS_CACHE config option to disable get_data_info caching
  • Diagnostics: Privacy-safe stage timing, per-process debug logs, and watchdog stack snapshots for get_data_info investigations

Changed

  • Diagnostics: Renamed Windows-specific diagnostic identifiers so the new logging is available on all platforms when IS_DEBUG is enabled
Click to expand v1.21.0 details

[1.21.0] - 2026-07-11

Added

  • Async Stata Do: Beta async stata_do execution with concurrency limits for multi-client workflows
  • Configuration: Layered config files (project, user, Linux system) with unified override resolution
  • Security: Audit logging for security rejections, boundary violations, and lifecycle events
  • Security: Static dofile parser that extracts data paths and expands macros for guard path auditing
  • Security: strict_read_log_boundary switch and hardened get_data_info path/URL validation
  • Build: Nuitka-based release binaries with wheel and sdist included in release assets
  • Skill: New mcp-smoke-test skill for local MCP server smoke testing

Changed

  • MCP Server: Removed deprecated write_dofile tool registration
  • Dependencies: Dropped unused python-dotenv and pathvalidate from core dependencies
  • CI: Dropped macOS x86_64 binary build and fixed Windows binary build

Fixed

  • SPSS: Use DEFAULT_TIMEOUT for SPSS URL downloads
  • Docs: Corrected stata_do examples and removed references to non-existent features
Click to expand v1.20.2 details

[1.20.2] - 2026-07-07

Security

  • Stata Log: Capped SMCL log expansion at 10,000 characters for {hline} and {space} directives to prevent memory exhaustion from malicious log content

Changed

  • CLI: Removed stale help parameters (--enable-smcl, --is-read-log) and simplified --replace help text
  • Data Info: Added explicit > env > config > default resolution for string_keep_number, decimal_places, and hash_length; synced supported format list across tool description
  • Project: Updated homepage and documentation URLs in pyproject.toml and __init__.py
  • Dependencies: Bump pydantic-settings from 2.14.1 to 2.14.2

Documentation

  • Added setup guides for Codex and Claude Science
  • Added troubleshooting guide and migrated uv mirror documentation
  • Updated README comparison tables, tagline, and project links across language versions
  • Updated AGPL 3.0 license explanation and security reporting policy
Click to expand v1.20.1 details

[1.20.1] - 2026-06-19

Security

  • Guard: Stripped Stata block comments (/* */) before security validation to prevent dangerous commands from being hidden inside comments
  • Guard: Stripped frame prefixes before command checks so dangerous commands cannot bypass detection via frame scoping

Changed

  • Dependencies: Updated locked dependencies to resolve security alerts
Click to expand v1.20.0 details

[1.20.0] - 2026-06-14

Fixed

  • Data Info: Fixed crash when summarizing string columns containing numeric values across DTA, CSV, and XLSX formats

Added

  • Tests: Added cross-format tests for string-numeric column handling and base type detection
Click to expand v1.19.0 details

[1.19.0] - 2026-06-09

Security

  • Ado Install: Moved ado_package_install behind the unsafe MCP server profile; the tool is no longer available in core or all profiles, requiring explicit opt-in via --unsafe
  • Ado Install: Added entry-point approval layer so stata-mcp install must explicitly approve ado installation capability before the tool becomes usable
  • Ado Install: Enforced alphanumeric package name validation to prevent command injection through malformed package names
  • Ado Install: Closed multiple security bypasses in the ado installation flow, including direct loader validation and centralized Stata command input validation
  • Stata Help: Hardened Stata help lookup with direct loader validation and refreshed help cache behavior to prevent unauthorized command execution paths

Added

  • Stata Do: Added optional timeout parameter for stata_do execution to prevent runaway Stata processes

Changed

  • Stata Do: Use Stata return codes for install status detection instead of string parsing
  • Dependencies: Bump starlette from 1.0.0 to 1.0.1
Click to expand v1.18.2 details

[1.18.2] - 2026-06-04

Added

  • Installer: New src/stata_mcp/utils/installer/output.py module with ColorStream and colored_stdout() for ANSI-colored install output.
    • ColorStream buffers writes by line and colorizes any line starting with a known [TAG]\t prefix.
    • colored_stdout() swaps sys.stdout for a ColorStream(sys.stdout) inside a with block and restores it on exit.
    • Tag-to-color map: [ERROR] red, [DONE] green, [WARN] yellow, [BACKUP] cyan; unknown prefixes pass through plain.
    • Honors NO_COLOR env var and disables itself when the underlying stream is not a TTY.
  • Tests: 13 new tests in tests/test_color_stream.py covering tag matching, buffering, flush, NO_COLOR, non-TTY, context-manager restoration, exception safety, and __getattr__ passthrough.

Changed

  • CLI: handle_install now wraps each Installer.install*() call with colored_stdout() and prefixes its own print(...) lines with [ERROR] / [DONE] / [WARN] so the same wrapper handles both handler- and core-layer output.
  • Verifier: _paint in verifier.py now delegates to the shared _should_color(stream) and _wrap(code, text) helpers in output.py, removing the duplicated NO_COLOR + isatty() check.
  • Tests: tests/test_install.py updated to assert on [WARN]\t prefixes and adds an end-to-end test that verifies ANSI escapes for all four tags plus a plain line.
Click to expand v1.18.1 details

[1.18.1] - 2026-06-03

Changed

  • Refactor: Rename src/stata_mcp/utils/Installer/ to lowercase src/stata_mcp/utils/installer/ for PEP 8 conformance.
  • Refactor: Move src/stata_mcp/utils/Verifier/verifier.py into src/stata_mcp/utils/installer/verifier.py since verification is conceptually part of the install workflow.
  • Refactor: Re-export Verifier, VerifyOutcome, VerifyResult, and color helpers from utils/installer/__init__.py.
  • Refactor: Update import paths in cli/_handlers.py and three test files (test_install.py, test_installer_backup.py, test_verify.py).
Click to expand v1.18.0 details

[1.18.0] - 2026-06-03

Added

  • Verify: New stata-mcp verify subcommand for read-only diagnostic checks of MCP client config files
    • verify -c <client> checks built-in clients (codex, claude, cc, claude-code, gemini, cursor, cline, opencode, openclaw, hermes, hermes-agent)
    • verify -f <path> [--index mcp.servers] [--key stata-mcp] checks custom JSON or TOML files
    • Exit codes: 0 (verified/warning), 1 (file/path/permission), 2 (key/index), 3 (parse), 4 (schema), 5 (usage)
    • Stdio warning flags localhost-like commands or http:// prefixes
    • Argparse usage errors exit 5 (overridden from default 2)
    • --key defaults to stata-mcp; accepts any custom key inside the target dict
  • Installer: Add find_config_path(client) and find_default_index(client) read-only helpers to the Installer class
  • Tests: 58 new tests in tests/test_verify.py covering success paths, parse errors, schema errors, warnings, permission-denied, and CLI routing

Changed

  • Rebrand: Project renamed to MCP-for-Stata per StataCorp request
    • pyproject.toml: new description, expanded keywords, full trove classifiers
    • README*.md: hero, tagline, and quick-start sections updated across all four languages
    • CITATION.cff: title and repository updated to mcp-for-stata
Click to expand v1.17.3 details

[1.17.3] - 2026-05-20

Security

  • Stata Do: Fix critical log_file_name injection vulnerability that allowed arbitrary Stata command execution via crafted log file names (closes #74).
  • Stata Do: Add dofile_path control character validation to prevent quote and backtick injection in Stata do commands.
  • Stata Do: Add log path traversal protection using resolve() and is_relative_to() checks.
  • Guard: Harden validator against colon-prefix bypasses (quietly:, capture:, noisily:).
  • Guard: Reject #delimit ; syntax in guard mode to prevent delimiter-based command smuggling.
  • Guard: Enhance macro expansion detection to catch local/global macro bypasses with arguments and compound quotes.
  • Guard: Add python, mata, java, and plugin commands to the dangerous commands blacklist.

Added

  • Tests: Add comprehensive regression tests for all security fixes in test_guard_validator.py and test_stata_do_boundary.py.
  • Docs: Add Codex installation instructions to README and Chinese translation.
Click to expand v1.17.2 details

[1.17.2] - 2026-05-19

Fixed

  • Update: Fix uv-tool installation detection in stata-mcp update by using sys.prefix instead of sys.executable.resolve() to correctly identify uv tool environments (closes #69).

Added

  • Tests: Fetch fixture data from Stata Press at runtime for improved test reliability.
  • Tests: Add install parser and installer backup tests.

Changed

  • Chore: Remove tests/ from .gitignore to include test files in version control.
Click to expand v1.17.1 details

[1.17.1] - 2026-05-18

Added

  • Install: Backup original config file before editing during stata-mcp install
    • Backup naming: stem.backup-yyyymmddHHMM.suffix in the same directory
    • Covers JSON, TOML, and YAML config paths
    • Aborts install if backup fails to prevent data loss
Click to expand v1.17.0 details

[1.17.0] - 2026-05-16

Added

  • Install: Custom JSON path and nested key support via --json-file and --json-index flags
    • --json-file PATH writes MCP config to an arbitrary JSON file
    • --json-index KEY.PATH specifies nested keys (e.g. mcp.servers for OpenClaw)
    • Bare stata-mcp install now defaults to --all instead of Claude Desktop only
  • Install: CLI-first installation fallback for supported clients
    • Claude Code: tries claude mcp add before falling back to ~/.claude.json
    • Codex: tries codex mcp add before falling back to TOML config
    • OpenClaw: tries openclaw mcp set before falling back to ~/.openclaw/openclaw.json
    • Hermes Agent: tries hermes mcp add before falling back to ~/.hermes/config.yaml
  • Install: New client support for Hermes Agent with YAML config generation
  • Config: stata-mcp config show now supports Section.Key notation (e.g. DEBUG.IS_DEBUG)

Changed

  • CLI: Flattened config subcommand structure (stata-mcp config show / set / cli set)
  • Docs: Synchronized all multilingual READMEs, CLI docs, and agent guides with new install features
Click to expand v1.16.3 details

[1.16.3] - 2026-05-12

Added

  • Install: Add OpenClaw client support via stata-mcp install -c openclaw, writing config to ~/.openclaw/openclaw.json.

Changed

  • Dependencies: Upgrade mcp to 1.27.1, psutil to 7.2.2, requests to 2.34.0, pyreadstat to 1.3.4, python-dotenv to 1.2.2.
  • Dependencies: Move openai packages to optional agents group and mcp-ui-server to ui group.
Click to expand v1.16.2 details

[1.16.2] - 2026-05-04

Security

  • Stata Do: Add directory boundary validation so dofiles can only be executed from STATA_MCP_FOLDER.DO or WORKING_DIR (PR #70).
  • Guard: Strengthen blacklist with dangerous command abbreviations (sh, xsh, winex, unixc, era, rmd) (PR #72).
  • Guard: Add local macro expansion detection to catch bypasses like local cmd "shell" followed by `cmd' (PR #72).
  • Guard: Log [SECURITY] warning when Guard is disabled at startup/execution time (PR #72).
Click to expand v1.16.1 details

[1.16.1] - 2026-04-22

Fixed

  • MCP Server: Disable help resource registration to fix startup crash caused by URI parameter mismatch between {cmd} and function signature (cmd, replace).
Click to expand v1.16.0 details

[1.16.0] - 2026-04-20

Added

  • Doctor: Add check_cleanup to scan and optionally remove old log/dofile/tmp files older than CLEAN_LOG_DAYS (PR #66 closes #63).
  • Config: Add STATA_MCP__FOLDER_TAG config with env var override (default: .statamcp) and migration warning for legacy stata-mcp-folder (PR #67).

Fixed

  • Stata Do: Insert clear before Unix do-file runs to prevent Stata session hangs (PR #64 closes #60).
  • API: Rename is_read_log to read_log_when_error for clearer semantics (PR #65 closes #59).

Changed

  • MCP Server: Trim verbose tool docstrings for stata_do, ado_package_install, and get_data_info to reduce token usage (issue #58).
Click to expand v1.15.1 details

[1.15.1] - 2026-04-09

Changed

  • Data Info: Changed head parameter default from 5 to 0 in get_data_info to prevent context overflow on large datasets. Preview rows are now opt-in instead of opt-out.
  • Docs: Updated tool docs (tools.md, tools.zh.md) to reflect new head default value.
Click to expand v1.15.0 details

[1.15.0] - 2026-04-07

Performance

  • MCP Server: Refactor to tool registry pattern with lazy imports for faster MCP server startup (🚀 🐰 💨 Yes, I have seen you say it is slow 👀)
    • New _TOOL_REGISTRY dict maps tool names to metadata (description, func, profiles, unix_only, deprecated)
    • register_tools() function registers tools based on selected profile (core or all)
    • core profile registers: stata_do, get_data_info, help
    • all profile registers all tools including read_log, ado_package_install, write_dofile
    • Tools no longer registered at import time; register_tools() must be called explicitly
  • MCP Server: Improved tool descriptions for better LLM tool selection accuracy
  • Package Init: Lazy __getattr__ access to stata_mcp server and main entry point
    • Avoids eager import of heavy MCP server dependencies at package import time
    • Graceful PackageNotFoundError fallback for development environments

Added

  • Data Info: head parameter in get_data_info for data preview rows
    • Positive values return first N rows, negative values return last |N| rows, 0 disables
    • head_warning added when requested rows exceed actual data size
  • Data Info: Cache full variables/dimensions in summary, filter on demand
    • Summary now computes all variables regardless of vars_list; filtering applied in info property
    • Cache lookup simplified to hash-only comparison (no longer checks var_list subset)
  • Read Log: lines parameter for content trimming
    • Positive values return first N items, negative values return last |N| items, 0 returns all
    • dict format trims by entry count instead of text lines for consistent behavior
  • CLI: stata-mcp server subcommand with --core / --all profile flags
    • Supports -t/--transport option for stdio/sse/http
  • CLI: stata-mcp doctor diagnostics subcommand
    • Comprehensive health checks for Stata CLI, Python version, OS, config, dependencies
    • Supports --json, --verbose, --check options for selective checks
    • Replaces deprecated --usable flag
  • CLI: stata-mcp update subcommand for one-command package updates
    • Auto-detects install method (pip, uv-tool, uvx, homebrew, editable)
    • Supports --check for version comparison, --dry-run for preview, --method for override
  • Tests: Added test_server_parser.py (4 cases) and test_server_registration.py (7 cases)

Changed

  • MCP Server: Help function moved out of if config.IS_UNIX: conditional block with lazy-load guard
  • MCP Server: Help resource registration moved into register_tools() for consistency
  • CLI: --usable flag now deprecated with DeprecationWarning (will be removed in v1.16.0)
  • CLI: __init__.py modules use lazy imports to avoid heavy dependency loading at startup
  • Data Info: load_cached_summary() returns full summary (no longer applies _filter_var)

Documentation

  • Docs: Update CLI docs (cli.md, cli.zh.md), CLAUDE.md for server profiles, doctor, update commands
  • Docs: Update tool descriptions in _TOOL_REGISTRY for all MCP tools
Click to expand v1.14.3 details

[1.14.3] - 2026-04-06

Performance

  • MCP Server: Lazy import heavy dependencies (StataDo, StataHelp, GuardValidator, RAMMonitor, etc.) inside tool functions to reduce startup time
  • Config: Cache parsed TOML config with @cached_property and invalidate on write via save_config()

Changed

  • Logging: Use config.IS_DEBUG to control file log level instead of hardcoded logging.DEBUG
  • Logging: Remove dead IS_DEBUG variable assignment and redundant ENABLE_WRITE_DOFILE module-level constant
  • Config: Invalidate cached config after save_config() to ensure fresh reads
Click to expand v1.14.2 details

[1.14.2] - 2026-04-04

Performance

  • Startup: Delay STATA_CLI resolution and cache found path to config
  • Startup: Lazy-load help_cls to avoid resolving Stata path at import time
  • Startup: Lazy-import data_info to avoid loading pandas/numpy at startup
  • Startup: Lazy-create stata-mcp-folder on tool invocation instead of at import

Fixed

  • Guard: Strip Stata prefixes before security validation
  • Help: Guard help save path when project temp directory is unset
  • Help: Fix help cache lookup when project temp directory is unset
  • Monitor: Ensure monitors are stopped in _execute_windows_with_monitors finally block
  • Monitor: Remove redundant monitor.stop() calls and ensure process cleanup
  • StataDo: Prevent subprocess resource leaks in execution methods

Docs

  • Fix tool name reference from ssc_install to ado_package_install
Click to expand v1.14.1 details

[1.14.1] - 2026-03-24

Fixed

  • Ado Install: Fixed SSC install success detection to be case-insensitive for better reliability
  • Ado Install: Added explicit error summary extraction when installation fails for clearer feedback
  • Ado Install: Improved error messages for all package sources (SSC, GitHub, net)
Click to expand v1.14.0 details

[1.14.0] - 2026-03-20

Added

  • API Module: Created new API package with standalone functions for CLI and external use
    • Added stata_do, stata_help, read_log, get_data_info, ado_install, write_dofile API functions
    • Added _runtime.py for shared runtime utilities
  • CLI: Added API-backed CLI tool commands (stata-mcp help, stata-mcp do, stata-mcp log, stata-mcp data-info, stata-mcp install)
    • CLI tools now behave like one-shot helpers with proper exit codes

Changed

  • Architecture: Promoted core modules to top-level
    • Moved stata_mcp/core/stata to stata_mcp/stata
    • Moved stata_mcp/core/data_info to stata_mcp/data_info
  • CLI: Refactored CLI code structure for better maintainability
    • Split _cli.py into _parsers.py (argument parsing) and _handlers.py (command handlers)
    • Reduced _cli.py from 458 lines to a thinner orchestrator
  • Stata: Moved stata_log module to builtin_tools directory
  • Ado Install: Increased default timeout to 300s for package installation
Click to expand v1.13.42 details

[1.13.42] - 2026-03-19

Changed

  • MCP Tools: Made write_dofile tool optional via ENABLE_WRITE_DOFILE flag (default: False)
    • Added ENABLE_WRITE_DOFILE config property for conditional tool registration
    • Converted write_dofile from decorator to conditional registration pattern
    • Added deprecation warning in tool docstring
    • Tool only registers when ENABLE_WRITE_DOFILE=True
Click to expand v1.13.41 details

[1.13.41] - 2026-03-17

Added

  • CLI: Added config inspect and STATA_CLI set commands
    • New stata-mcp config inspect command to view configuration
    • New stata-mcp config set stata_cli <path> command to set Stata CLI path
  • Data Info: Added unified URL fetch with timeout support
  • Registry: Added server.json for MCP registry

Changed

  • Config: Use tomli-w for TOML serialization (replacing manual string formatting)
  • Data Info: Unified URL and local file handling with bytes_io_data
  • Data Info: Reorganized metrics for better code structure
  • Security: Removed unsafe code execution calls in ado_install and macos finder
  • MCP Tools: Removed append_dofile tool and deprecated write_dofile
  • Windows: Use list args with shell=True for safer path handling
Click to expand v1.13.40 details

[1.13.40] - 2026-03-03

Changed

  • MCP Tools: Removed load_figure tool from MCP server (unused and causes errors for non-vision models)
  • CI: Added missing GitHub Actions permissions (attestations: write, actions: read) for provenance-based publish flows
  • Documentation: Updated tools and overview docs to reflect load_figure removal
Click to expand v1.13.39 details

[1.13.39] - 2026-03-01

Added

  • CI: Added MCP registry publishing step to PyPI workflow

Changed

  • MCP Tools: Removed mk_dir tool from MCP server
  • MCP Tools: Added error notes for non-vision model
  • Documentation: Updated CLAUDE.md environment variables to match actual code
Click to expand v1.13.38 details

[1.13.38] - 2026-02-28

Added

  • CLI: Enhanced usable command with uv check support
    • Added check_uv() to detect uv installation and prioritize it over Python version check
    • Added print_info() for non-failure info messages
  • Documentation: Added MCP registry signature badge to README

Changed

  • CLI: Refactored usable command with config integration
    • Uses config.IS_UNIX instead of platform detection
    • Simplified check_os() implementation
    • Fixed env var name: stata_cli -> STATA_CLI
  • Style: Improved multi-line string formatting in mcp_servers.py
Click to expand v1.13.37 details

[1.13.37] - 2026-02-26

Added

  • CLI: Enhanced install command with multi-client support
    • Added --all flag for one-click installation to all supported clients
    • Added --json-file option to read installation config from JSON file
    • Added Gemini client support via --client gemini
    • Added OpenCode client support via --client opencode
  • Log System: New stata_log module for Stata log file parsing
    • StataLogTEXT: Parser for plain text .log files
    • StataLogSMCL: Parser for SMCL (Stata Markup and Control Language) .smcl files
    • Factory pattern with StataLog class for automatic format detection
    • Closes #37
  • Data Info: Added SPSS file support (.sav, .zsav)
  • Dependencies: Added pyreadstat>=1.2.0 and requests>=2.28.0 for SPSS support

Changed

  • MCP Tools: Renamed read_file to read_log with StataLog integration
  • Dependencies: Upgraded pandas to >=3.0.0,<4.0.0 (closes #36)
  • Style: Unified function parameter formatting in mcp_servers.py

Fixed

  • Data Info: Fixed HASH_LENGTH type error and URL hash bug
  • CLI: Fixed --all flag using install_all() instead of install("all")

Documentation

  • Added CI/CD status badges (PyPI publish, Docker build) to README
  • Updated tool docs for read_log with StataLog integration
  • Updated stata_do docstring for SMCL support
Click to expand v1.13.36 details

[1.13.36] - 2026-02-23

Fixed

  • Guard: Fixed false positives in security validation
    • Added line-start anchor (^\s*) to all DANGEROUS_PATTERNS to prevent matching commands in the middle of lines
    • Fixed describe, summarize, and capture confirm variable rm being incorrectly flagged as dangerous
    • Commands like rm, do, shell are now only matched at line start (allowing indentation)
    • Removed duplicate \bdo\s+.* pattern
Click to expand v1.13.35 details

[1.13.35] - 2026-02-22

Added

  • Data Info: Variable labels support for Stata .dta files
    • get_data_info now returns variable labels in vars_detail for DTA files
    • Added _get_var_extra_info hook method in base class for subclass extensibility

Fixed

  • Data Info: Unified extension validation across CSV and Excel handlers
    • Both now use self.suffix and self.supported_extensions consistently
    • Removed redundant valid_extensions local variables

Changed

  • CLI: Added --source option for Docker image registry selection
  • Docker: Detect architecture instead of OS for platform flag

Documentation

  • Enhanced mkdocs config with i18n and theme features
  • Added Chinese translations for i18n support
  • Added collapsible new features section and fixed usage links

CI

  • Added mkdocs-static-i18n to gh-pages workflow
Click to expand v1.13.34 details

[1.13.34] - 2026-02-16

Changed

  • Docker Refactor: Complete Docker image architecture redesign
    • Now using AEA Data Editor's Stata images as base
    • No longer distributes Stata installer - users only need to provide license file
    • New image naming convention: stata-mcp_{VERSION}_{EDITION} (e.g., stata-mcp_19_5_mp)
    • Supports StataNow 19.5, 18.5, and Stata 18 with mp/se/be editions
    • 9 image variants built via GitHub Actions matrix

Added

  • CLI: Enhanced sandbox-install command with new options
    • --version / -V: Specify Stata version (19_5, 18_5, 18)
    • --edition / -e: Specify Stata edition (mp, se, be)
    • --tag: Specify Docker image tag (default: latest)
    • Example: stata-mcp sandbox-install -V 19_5 -e mp -l /path/to/stata.lic

Fixed

  • Docker build permissions and lowercase repository name issues in GitHub Actions

Documentation

  • Updated Docker guide with new image naming and CLI options
  • Added license notice acknowledging StataCorp and AEA Data Editor
  • Added recommendation note for Docker beginners
Click to expand v1.13.33 details

[1.13.33] - 2026-02-15

Added

  • Docker Support: Full Docker containerization support for Stata-MCP
    • Added Dockerfile for containerized Stata-MCP deployment
    • Added GitHub Actions workflow for Docker image build and push to GHCR
    • Supports Stata 17/18/19 with configurable installer URL
  • CLI: New sandbox-install command for Docker-based installation
    • Install Docker-based Stata-MCP to MCP clients (Claude, Cursor, Cline, etc.)
    • Configurable options: license file, work directory, CPU/memory limits, image tag
    • Usage: stata-mcp sandbox-install -l /path/to/stata.lic -c claude

Changed

  • Dockerfile: Use local source code instead of PyPI for development builds

Documentation

  • Docker Guide: Added comprehensive Docker documentation (docs/docker.md)
    • Image pull instructions for GHCR and DockerHub
    • Container running examples with parameter explanations
    • MCP client configuration for Docker-based setup
    • Building from source with local/remote installers
  • Index: Added Docker to Advanced Features section
Click to expand v1.13.32 details

[1.13.32] - 2026-02-06

Changed

  • CLI Refactor: Redesigned CLI structure with subcommands for better usability
    • Replaced stata-mcp --agent with stata-mcp agent run subcommand
    • Replaced stata-mcp --install with stata-mcp install subcommand
    • Added support for -c/--client option to specify installation target (claude, cc, cursor, cline, codex)
    • Set -t/--transport default to stdio explicitly
  • Documentation: Comprehensive documentation updates
    • Added new CLI reference guide (docs/cli.md) with complete command documentation
    • Updated all existing documentation with new CLI syntax
    • Updated README and translations (cn, fr, sp) with new command examples
    • Updated mkdocs.yml navigation to include CLI Reference

Breaking Changes

  • CLI Commands: Flag-based commands changed to subcommands
    • stata-mcp --agentstata-mcp agent run
    • stata-mcp --install [client]stata-mcp install -c [client]
    • Users will need to update scripts and documentation using old syntax
Click to expand v1.13.31 details

[1.13.31] - 2026-02-03

Fixed

  • Code Quality Improvements: Fixed 8 code issues discovered through AI code reviews
    • ado_package_install: Made source parameter case-insensitive to match documentation (e.g., "GitHub" now works)
    • logging.disable(): Added missing required level argument to prevent TypeError when logging is disabled
    • Windows Path Handling: Removed unicode_escape processing that corrupted Windows paths (e.g., C:\new\dataC:\n + ew)
    • Config Directory: Unified configuration directory from inconsistent ~/.stata_mcp and ~/.stata_mcp to single ~/.statamcp
    • write_dofile: Added microsecond precision to timestamps (from %Y%m%d%H%M%S to %Y%m%d%H%M%S%f) to prevent filename collisions
    • Code Comments: Translated Chinese code comments to English for international team maintainability

Removed

  • Deprecated Modules: Removed deprecated code to simplify codebase
    • Removed claude_proj module (entire directory, 261 lines)
    • Removed StataFinderOLD class (154 lines of dead code)

Technical

  • Code Review: Issues were discovered through multiple AI code review tools (ChatGPT, Codex, and other reviewers)
  • Breaking Change: Config directory changed from ~/.stata_mcp to ~/.statamcp - users may need to migrate configurations
  • Performance: Microsecond precision in timestamps reduces collision probability from 1/second to 1/microsecond (1,000,000x improvement)
Click to expand v1.13.30 details

[1.13.30] - 2026-02-02

Fixed

  • macOS StataNow BE Detection: Fixed StataNow BE not being detected on macOS
    • StataNow BE uses CamelCase executable filename (e.g., StataBE) instead of lowercase (e.g., stata-be)
    • FinderMacOS now tries multiple possible executable name formats:
      • stata-{edition} (traditional lowercase format)
      • Stata{EDITION} (StataNow CamelCase format)
      • Stata{Edition} (alternative capitalization)
    • Ensures compatibility with StataNow BE/SE/MP while maintaining backward compatibility
    • Related to issue #35

Technical

  • Compatibility: Extended Stata finder to support both traditional and StataNow naming conventions
  • Backward Compatibility: Existing Stata installations continue to work (first option tried is original format)
Click to expand v1.13.29 details

[1.13.29] - 2026-02-01

Fixed

  • Environment Variable Documentation: Fixed inconsistent environment variable names in documentation

    • Corrected debug mode environment variable from STATA_MCP_DEBUG to STATA_MCP__IS_DEBUG in usage docs
    • Fixed working directory environment variable documentation showing duplicate names
    • Clarified that STATA_MCP__CWD (double underscore) is the new standard
    • Added deprecation notice for legacy STATA_MCP_CWD (single underscore) variable
    • Documentation now matches actual code implementation
  • Stata CLI Error Detection: Added early error detection when Stata CLI cannot be found

    • Created new StataCLINotFoundError exception class for clear error messages
    • Modified Config.STATA_CLI to check if finder returns None and raise exception immediately
    • Added helpful configuration instructions in error message
    • Previously, None was propagated to execution stage causing confusing runtime errors
    • Now raises at MCP server startup with actionable guidance
  • Logging Configuration: Fixed file logging configuration not being respected

    • Removed fallback logic that forced file logging when no handlers existed
    • Changed condition from len(logging_handlers) == 0 or LOGGING_FILE_HANDLER_ON to just LOGGING_FILE_HANDLER_ON
    • File logging is now only enabled when explicitly configured
    • Previously, LOGGING_FILE_HANDLER_ON=false did not prevent file log creation when console logging was disabled
  • Security and Path Handling: Changed Unix-like systems to use shell=False for subprocess execution

    • Changed subprocess.Popen shell parameter from True to False in macOS/Linux execution paths
    • Fixed incorrect usage of shell=True with list arguments (only first element was used)
    • Paths with spaces now work correctly on Unix-like systems
    • Eliminated potential shell command injection risk
    • Updated comments to reflect correct subprocess usage pattern
    • Windows execution remains unchanged (correctly uses shell=True with string arguments and manual quoting)

Technical

  • Security: Improved subprocess security by avoiding shell parsing on Unix-like systems
  • Reliability: Early error detection prevents confusing runtime failures
  • User Experience: Configuration now behaves as documented and expected
  • Documentation: Environment variable documentation now matches implementation
Click to expand v1.13.28 details

[1.13.28] - 2026-01-26

Changed

  • Data Handler Registry Pattern: Implemented registry pattern for extensible data format handler management

    • Added DATA_INFO_REGISTRY in base.py for automatic extension-to-handler mapping
    • Implemented __init_subclass__ for automatic subclass registration with their supported extensions
    • Added get_data_handler() function for retrieving handlers by file extension
    • Replaced hardcoded CLASS_MAPPING with dynamic registry in get_data_info()
    • Added supported_extensions class attribute to all data handler classes (CsvDataInfo, DtaDataInfo, ExcelDataInfo)
    • Improved imports organization in mcp_servers.py with relative imports
    • Enhanced extensibility - new data formats can be added without modifying core get_data_info function
  • Code Naming Consistency: Renamed internal base module files for better naming conventions

    • Renamed _base.py to base.py in agent_as_rag module
    • Renamed _base.py to base.py in data_info module
    • Updated all import statements to reflect new file names
    • Removed leading underscore convention as these are not private modules

Removed

  • Sandbox Module Cleanup: Removed unused sandbox infrastructure code
    • Cleaned up 136 lines of unused sandbox module code
    • Removed sandbox README and core module implementations
    • Removed jupyter_manager implementation
    • Streamlined codebase by removing experimental features

Technical

  • Code Architecture: Enhanced extensibility through registry pattern implementation
  • Maintainability: Improved code organization with consistent naming conventions
  • Developer Experience: Easier to add new data format support through registration mechanism
Click to expand v1.13.27 details

[1.13.27] - 2026-01-25

Added

  • Performance Monitoring System: Complete RAM monitoring framework for Stata subprocess execution

    • Abstract MonitorBase class for extensible monitor implementations
    • RAMMonitor implementation with psutil integration for cross-platform RAM tracking
    • Daemon thread-based monitoring with configurable check interval (0.5s default)
    • Automatic process termination when RAM exceeds configured limit
    • Custom exception hierarchy: StataMCPErrorRAMLimitExceededError
  • Configuration System: Comprehensive monitoring configuration via config and environment variables

    • IS_MONITOR global toggle for enabling/disabling monitoring (default: false)
    • MAX_RAM_MB configuration property for RAM limit in MB (default: -1, no limit)
    • Environment variable STATA_MCP__IS_MONITOR for global toggle
    • Environment variable STATA_MCP__RAM_LIMIT for RAM limit configuration
    • Configuration priority: environment variables > config file > defaults
  • Monitor Integration: Clean separation between monitored and non-monitored execution paths

    • Original execution functions remain unchanged (_execute_unix_like, _execute_windows)
    • New monitored execution functions (_execute_unix_like_with_monitors, _execute_windows_with_monitors)
    • execute_dofile() routes to appropriate path based on IS_MONITOR flag
    • Monitor list passed to StataDo constructor for flexibility
    • 100% backward compatible when IS_MONITOR=false

Changed

  • StataDo Architecture: Enhanced with monitor support and improved execution control

    • Added monitors parameter to StataDo.__init__() for optional monitor instances
    • Added IS_MONITOR boolean property for efficient execution path selection
    • Maintains original behavior when no monitors provided
    • Clean separation of concerns with dedicated monitor execution paths
  • MCP Server Integration: Wired up RAM monitoring from configuration

    • RAMMonitor instantiation based on config.IS_MONITOR and config.MAX_RAM_MB
    • Monitor list passed to StataDo constructor during initialization
    • RAMLimitExceededError caught and returned as error response to MCP client
    • Nested configuration check for cleaner monitor activation logic
  • Configuration Enhancement: Added monitor configuration section to config system

    • New [MONITOR] section in config.example.toml
    • IS_MONITOR and MAX_RAM_MB configuration options documented
    • Default configuration ensures monitoring is disabled unless explicitly enabled

Technical

  • New Dependencies: Added psutil>=6.0.0 for cross-platform process monitoring
  • Code Quality: Clean architecture with abstract base class pattern for extensibility
  • Backward Compatibility: Original functions unchanged, monitoring opt-in via configuration
  • Performance: Minimal overhead when monitoring disabled, daemon thread when enabled
  • Error Handling: Custom exception with detailed RAM usage information
  • Documentation: Comprehensive docstrings noting feature is "coded by Claude Code with GLM-4.7"

Notes

  • This is a beta feature with monitoring disabled by default
  • When IS_MONITOR=false, behavior is 100% identical to previous versions
  • When IS_MONITOR=true and MAX_RAM_MB is set, Stata processes are monitored and killed if RAM exceeds limit
  • -1 in config for MAX_RAM_MB means no limit (converted to None)
  • Monitor system designed for extensibility to support timeout monitoring in future
Click to expand v1.13.26 details

[1.13.26] - 2026-01-25

Fixed

  • Windows Log File Completeness: Added capture log close before opening log to prevent incomplete log files
    • Ensures proper log file closure in both Unix and Windows environments
    • Adds working directory (cwd) parameter to StataDo for better execution control
    • Sets cwd in subprocess calls for proper execution context

Changed

  • Windows Temporary File Management: Optimized temporary batch dofile handling on Windows

    • Changed temp directory from user directory to system temp directory
    • Uses dofile stem as temporary batch filename instead of timestamp
    • Removed dofile_base_path parameter from StataDo class (no longer needed)
  • Code Quality Improvements: Enhanced StataDo implementation with better type safety

    • Refactored do.py to use Path types instead of strings
    • Replaced repetitive OS checks with boolean is_unix flag
    • Improved error handling with exception handling in read_log method
  • Security Module Integration: Replaced validation logic with guard module

    • Replaced _validate_dofile_content with guard module integration
    • Centralized security validation for better maintainability
  • Configuration Enhancements: Improved configuration and logging system

    • Re-constructed path configuration and IS_GUARD handling
    • Added back logging for output_base_path for better debugging
    • Updated config.example.toml with new configuration options

Technical

  • Code Quality: Improved type safety with Path types and boolean flags
  • Error Handling: Enhanced exception handling throughout StataDo
  • Maintainability: Centralized validation logic in guard module
  • User Experience: Better log file completeness and temporary file management
Click to expand v1.13.25 details

[1.13.25] - 2026-01-22

Added

  • Configuration File Support: Added support for reading configuration from ~/.statamcp/config.toml file
    • Config priority: Environment variables (highest) > TOML config file > Default values (lowest)
    • Added Config class in src/stata_mcp/config.py with unified configuration management
    • Type-safe converters: _to_bool(), _to_int(), _to_path() with validators
    • Configuration properties: IS_DEBUG, LOGGING_ON, LOGGING_CONSOLE_HANDLER_ON, LOGGING_FILE_HANDLER_ON, LOG_FILE, MAX_BYTES, BACKUP_COUNT, SYSTEM_OS, IS_UNIX, STATA_CLI
    • Added config.example.toml for user configuration reference

Changed

  • mcp_servers.py: Simplified configuration initialization using centralized Config class
    • Removed scattered environment variable reading logic
    • Delegated platform detection and Stata CLI finding to Config class
Click to expand v1.13.24 details

[1.13.24] - 2026-01-21

Added

  • Security Guard System: Implemented comprehensive security validation for Stata dofile execution
    • Added guard package with blacklist-based security validation
    • blacklist.py: Defines dangerous commands (shell escapes, file operations, external code execution)
    • validator.py: Core validation logic with GuardValidator, RiskItem, and SecurityReport classes
    • Integrated guard into stata_do function to validate dofiles before execution
    • Returns detailed warnings and blocks execution when dangerous commands are detected
    • Configurable via STATA_MCP__IS_GUARD environment variable (default: enabled)

Security

  • Blacklist Coverage: Protects against dangerous commands including:
    • Shell escapes: !, !!, shell, xshell, winexec, unixcmd
    • File operations: erase, rm, rmdir, copy
    • External code execution: run, do, include

Testing

  • Added comprehensive test suite with 15 test cases covering all security scenarios
  • Tests validate dangerous command detection, line number tracking, and edge cases
Click to expand v1.13.23 details

[1.13.23] - 2026-01-13

Added

  • Multi-Agent Client Support: Extended installer with support for multiple AI agent platforms
    • Added support for Cursor IDE
    • Added support for Cline (VS Code extension)
    • Added support for Codex with TOML-based configuration

Changed

  • Installer Refactor: Enhanced installer architecture for better extensibility
    • Moved command, args, env to instance variables for reusability
    • Added install_to_toml_config method for TOML-based configurations
    • Simplified configuration management across different clients

Technical

  • TOML Support: Added tomllib import and TOML formatting helpers
Click to expand v1.13.22 details

[1.13.22] - 2026-01-12

Added

  • Multi-Client Installation Support: Enhanced installer to support multiple client targets
    • Added install_to_json_config method for generic JSON config installation
    • Added install_to_claude_code method for Claude Code client support
    • Updated install method to accept target client parameter (claude/cc)
    • Support for installing to both Claude Desktop and Claude Code from CLI

Changed

  • Environment Variable Configuration: Improved STATA_CLI configuration flexibility
    • Changed STATA_CLI and STATA_MCP_COMMON_CONFIG to @property methods
    • Support reading STATA_CLI from environment variable
    • Dynamic configuration loading for better portability

Enhanced

  • CLI Installation: Enhanced command-line interface for installation
    • Simplified installation process with direct client target specification
    • Better user experience for installing to different clients
Click to expand v1.13.21 details

[1.13.21] - 2026-01-07

Security

  • Path Traversal Protection: Enhanced file reading security for read_file tool
    • Restricted read_file to only access files within the stata-mcp-folder directory
    • Added path resolution and validation to prevent symlink-based attacks
    • Implemented security violation logging for audit trails
    • Raises PermissionError when attempting to access files outside allowed directory

Technical

  • Security Hardening: Prevented unauthorized file system access through path traversal attacks
  • Error Handling: Enhanced error messages with clear directory restrictions
Click to expand v1.13.20 details

[1.13.20] - 2026-01-06

Changed

  • get_data_info Major Refactor: Comprehensive improvement to data information retrieval and processing
    • Added decimal_places parameter with environment variable support (STATA_MCP_DATA_INFO_DECIMAL_PLACES)
    • Enhanced summary statistics consistency across all data types
    • Added cached loading to summary method for improved performance
    • Simplified get_data_info function architecture with enriched output structure
    • Added string series method for better string variable handling

Fixed

  • Metrics Filtering Bug: Correctly filter metrics in DataInfoBase._filter() method
    • Fixed metric filtering logic that was incorrectly processing data metrics
    • Ensures accurate metric selection and reporting in data info output

Added

  • TSV and PSV Format Support: Extended data file format compatibility
    • Added support for Tab-Separated Values (TSV) files
    • Added support for Pipe-Separated Values (PSV) files
    • Updated mcp_servers to handle new delimiter-separated formats
    • Automatic delimiter detection for seamless file processing

Changed

  • MCP Architecture Cleanup: Improved MCP server organization and maintainability
    • Reorganized tool functions order for better code structure
    • Removed all prompt-related code to streamline MCP server implementation
    • Cleaner separation of concerns in MCP server architecture

Technical

  • Environment Variables: Added support for decimal precision configuration via environment variables
  • Code Quality: Enhanced type annotations and function parameter design
  • Performance: Improved summary method performance with cache integration
  • Maintainability: Simplified codebase through removal of deprecated prompt features
Click to expand v1.13.19 details

[1.13.19] - 2026-01-04

Changed

  • Cached Summary Loading: Enhanced summary method with automatic cache loading capability
    • Added load_cached_summary() integration in DataInfoBase.summary() method
    • Improved performance by loading from cache when available instead of reprocessing data
    • Maintains backward compatibility with existing functionality
    • Optimized data info retrieval workflow with cache-first approach

Technical

  • Performance Enhancement: Reduced data processing time for repeated operations on same datasets
  • Cache Architecture: Better integration of cached summary loading into main summary workflow
Click to expand v1.13.18 details

[1.13.18] - 2026-01-03

Changed

  • Data Info Refactor: Simplified get_data_info function and improved architecture

    • Moved cache logic from function level to class level for better maintainability
    • Removed redundant cache lookup in get_data_info tool
    • Enhanced error handling and logging throughout data_info module
    • Improved code organization with clearer separation of concerns
  • Series Classes Enhancement: Converted to dataclass for better structure

    • Refactored StringSeries and NumericSeries to use @dataclass decorator
    • Added configurable decimal_places parameter for numeric precision control
    • Added string_keep_number parameter to control value list display
    • Improved property-based implementation with type annotations
  • Enriched Data Output: Enhanced get_data_info return structure

    • Added source field to overview section showing data file path
    • Added var_list to overview showing all variable names
    • Added info_config section with metrics, max_display, and decimal_places settings
    • Enhanced vars_detail with var field for each variable
    • Improved saved_path reporting for cache files

Added

  • Environment Variable Configuration: Added support for data_info customization

    • STATA_MCP_DATA_INFO_DECIMAL_PLACES: Control decimal precision (default: 3)
    • STATA_MCP_DATA_INFO_STRING_KEEP_NUMBER: Control string value display (default: 10)
  • Documentation: Updated get_data_info docstring with complete examples

    • Added detailed return value structure documentation
    • Added comprehensive examples showing string and numeric variable output
    • Improved clarity with full statistical output display

Technical

  • Configuration Management: Centralized settings with environment variable support
  • Code Quality: Improved type safety and code organization
  • Documentation: Enhanced inline documentation and examples
Click to expand v1.13.17 details

[1.13.17] - 2026-01-01

Added

  • Excel File Support: Complete support for Excel file formats (.xlsx, .xls) in get_data_info tool

    • New XlsxDataInfo class for handling Excel workbook metadata and statistics
    • Automatic detection and processing of Excel files with openpyxl integration
    • Support for both .xlsx and .xls file formats with comprehensive error handling
    • Enhanced data type detection for Excel-derived datasets
    • Improved file format validation for Excel workbooks
  • Enhanced Format Support: Extended data_info tool with additional delimiter-separated formats

    • Added TSV (Tab-Separated Values) file format support
    • Added PSV (Pipe-Separated Values) file format support
    • Unified CSV/TSV/PSV handling in CsvDataInfo with automatic delimiter detection
    • Extended file extension validation for new formats
    • Improved data processing pipeline for varied text-based formats

Changed

  • MCP Servers Update: Enhanced mcp_servers.py with comprehensive format support

    • Updated get_data_info tool to support Excel, TSV, and PSV formats
    • Improved file type detection and routing logic
    • Enhanced error messages for unsupported file formats
    • Better integration of new data format handlers
  • Data Info Architecture: Improved extensibility for additional file formats

    • Enhanced base data_info classes for better format handling
    • Streamlined file extension validation across all formats
    • Improved type detection for Excel and delimiter-separated files

Technical

  • New Dependencies: Added openpyxl>=3.1.5 for Excel file processing
  • Code Quality: Enhanced file format detection with cleaner separation of concerns
  • Type Safety: Improved type annotations for Excel and delimiter-separated file handling
Click to expand v1.13.16 details

[1.13.16] - 2025-12-31

Added

  • Help Command Cache: Implemented local file caching for Stata help command responses
    • Automatically checks for cached help files before calling Stata
    • Cache files saved with format help__{command}.txt in temporary directory
    • Significantly reduces response time for repeated help requests
    • Improves efficiency by avoiding redundant Stata executions

Changed

  • Centralized Cache Directory: Enhanced help system with centralized cache management

    • Added STATA_MCP_DIRECTORY constant for ~/.statamcp centralized directory
    • Help cache now stored in ~/.statamcp/help/ for better organization
    • Improved cache directory structure with dedicated help subdirectory
    • Better file management with centralized cache location
  • Help System Refactoring: Moved help implementation to dedicated module

    • Extracted help logic from mcp_servers.py to stata_help.py
    • Added Help class for better code organization and maintainability
    • Improved separation of concerns with modular help implementation
    • Enhanced code structure for easier maintenance and testing
  • Documentation Language: Updated help function documentation from Chinese to English

    • Translated Notes section in help function docstring to English
    • Improved international accessibility for English-speaking users
    • Consistent English documentation across the codebase
  • Platform Detection: Enhanced IS_UNIX detection with explicit platform check

    • Replaced SYSTEM_OS.lower() != "windows" with explicit platform check
    • More reliable platform detection across different operating systems
    • Improved code clarity and maintainability
  • Code Quality: Improved code formatting and style consistency

    • Applied linting rules to ensure consistent code style
    • Better code readability with proper formatting

Performance

  • Dramatically improved response times for repeated help command requests
  • Reduced redundant Stata help command executions
  • Optimized help system workflow with cache-first approach
Click to expand v1.13.15 details

[1.13.15] - 2025-12-30

Added

  • Enhanced Summary Statistics: Extended data info summary with three additional statistical measures
    • Added sample size (n) to indicate valid observation count for each variable
    • Added skewness (3rd moment) to measure distribution asymmetry
    • Added kurtosis (4th moment/excess kurtosis) to measure distribution tailedness
    • Provides more comprehensive statistical description for numerical variables
    • Updated docstring examples with real auto.dta dataset outputs

Changed

  • Updated get_data_info tool to return 7 statistics instead of 4
  • Enhanced docstring examples in both _base.py and mcp_servers.py
  • Improved statistical analysis capabilities for data exploration
Click to expand v1.13.14 details

[1.13.14] - 2025-12-27

Added

  • Help Command Cache: Implemented local file caching for Stata help command responses

    • Automatically checks for cached help files before calling Stata
    • Cache files saved with format help__{command}.txt in temporary directory
    • Significantly reduces response time for repeated help requests
    • Improves efficiency by avoiding redundant Stata executions
  • Data Info Content-Based Caching: Implemented smart caching mechanism for data information

    • Uses MD5 hash of file content to generate unique cache identifiers
    • Cache filename format: data_info__{name}_{ext}__hash_{hash}.json
    • Ensures same filename and content produce identical cache files
    • Checks cache before processing, returns cached result if available
    • Supports HASH_LENGTH environment variable to customize hash length (default: 12)
    • Proper exception handling for corrupted or missing cache files

Performance

  • Dramatically improved response times for repeated operations on same data files
  • Reduced redundant Stata help command executions
  • Optimized data info retrieval workflow with cache-first approach
Click to expand v1.13.13 details

[1.13.13] - 2025-12-25

Added

  • StataNow Support: Enhanced macOS StataFinder to support StataNow directory detection

    • Added StataNow to the feature name search list with priority over Stata
    • Improved multi-version Stata installation detection for better compatibility
    • Returns list of found Stata installations and selects highest version via max()
  • User Applications Directory: Extended Stata search paths to include user directory

    • Added ~/Applications to macOS search paths for user-installed Stata
    • Maintains priority: system /Applications > user ~/Applications
    • Better support for non-admin Stata installations

Changed

  • Logging System Optimization: Enhanced logging infrastructure with improved debug control

    • Added IS_DEBUG flag for better debug mode control
    • Moved log file to ~/.statamcp/stata_mcp_debug.log for centralized management
    • Improved path handling with expanduser() and absolute() for reliability
    • Added parent directory creation with proper error handling
    • Added project name logging when using custom working directory
  • MCP Server Initialization: Reorganized initialization order for better reliability

    • Moved MCP Server initialization after system checks
    • Removed Claude Code-specific client handling for cross-platform compatibility
    • Improved error message format with system information
Click to expand v1.13.12 details

[1.13.12] - 2025-12-23

Fixed

  • Icon Fetch Timeout Issue: Added error handling for FastMCP icon initialization to prevent server startup failures
    • Implemented try-except block to gracefully fallback when icon URL fetch times out
    • Ensures server can start successfully even with network connectivity issues
    • Maintains full functionality regardless of icon loading status

Improved

  • MCP Instructions Clarity: Enhanced server instructions for better LLM understanding
    • Simplified and optimized instructions text for clearer context
    • Emphasized do-file as the minimum operation unit
    • Clarified session management behavior (no session config)
Click to expand v1.13.11 details

[1.13.11] - 2025-12-17

Fixed

  • Critical macOS Compatibility Issue: Resolved MCP server startup failures for macOS users

    • Fixed resource decorator parameter mismatch by updating URI from help://stata/{cmd} to help://stata/{cmd}?is_save={is_save}
    • Resolved ValueError that prevented server initialization due to function signature mismatch
    • Restored full functionality for macOS users upgrading from v1.13.9 to v1.13.10
  • ADO Package Installation Logic: Improved platform-specific package management reliability

    • Replaced problematic try-except block with clean if-else platform separation
    • Removed complex exception handling that could cause silent failures or inconsistent error messages
    • Ensured stable behavior across Unix (macOS/Linux) and Windows platforms

Improved

  • Cross-Platform Path Handling: Enhanced file path consistency across operating systems

    • Replaced str(path) with path.as_posix() in functions returning file paths
    • Updated results_doc_path, write_dofile, and append_dofile functions for POSIX-style path consistency
    • Improved reliability of file operations across different platforms
  • Code Organization: Better structural organization for maintainability

    • Moved help class initialization inside IS_UNIX condition block for proper scoping
    • Removed unnecessary strict_mode parameter from write_dofile function
    • Enhanced code clarity and reduced potential configuration conflicts

Notes

  • This release focuses on fixing critical compatibility issues introduced in v1.13.10
  • All macOS users are strongly recommended to upgrade from v1.13.9 or earlier to this version
  • Windows users continue to benefit from the package installation improvements introduced in v1.13.10
Click to expand v1.13.10 details

[1.13.10] - 2025-12-17

Added

  • Help Function Enhancement: Added is_save parameter to help function for flexible help content management

    • New is_save: bool = True parameter allows users to control whether help content is saved to files
    • Help content is now automatically saved to tmp_base_path / f"help__{cmd}.txt" when is_save=True
    • Enhanced user experience with optional help content persistence for reference
  • Windows Platform Support for ADO Package Installation: Enabled cross-platform Stata package management

    • Moved ado_package_install function from Unix-only condition block to all platforms
    • Windows users can now install Stata packages from SSC, GitHub, and net sources
    • Added Windows-specific error handling with fallback do-file execution for improved reliability
    • Updated __all__ exports to include ado_package_install for all platform users
    • Enhanced return type annotation for better IDE support and code clarity

Changed

  • Code Simplification: Streamlined stata_do function log handling logic
    • Simplified conditional log content processing with ternary operator
    • Improved code readability without affecting business logic
    • Maintained identical functionality while reducing code complexity

Technical

  • Cross-Platform Compatibility: Enhanced Windows platform support while maintaining Unix/Linux functionality
  • Code Quality: Improved function parameter design with better type annotations and documentation
  • User Experience: Expanded feature availability to all supported platforms regardless of operating system
Click to expand v1.13.9 details

[1.13.9] - 2025-12-13

Changed

  • MCP Server Initialization: Simplified MCP server initialization and dependency management
    • Adjusted MCP version requirement from >=1.20.0 to >=1.16.0 for better compatibility
    • Removed version compatibility checks and complex error handling code
    • Cleaned up commented dependencies in pyproject.toml for cleaner configuration
    • Simplified FastMCP initialization with fixed icon configuration

Technical

  • Dependency Management: Streamlined MCP version requirements and compatibility handling
  • Code Simplification: Removed 53 lines of complex version checking and error handling code
  • Initialization Performance: Enhanced server startup performance through simplified initialization logic
Click to expand v1.13.8 details

[1.13.8] - 2025-12-06

Changed

  • Agent Architecture Modernization: Complete refactoring of agent mode with modern framework adoption

    • Implemented new REPLAgent using agents.as framework replacing deprecated LangChain-based implementation
    • Enhanced agent performance and reliability through modern agents.as integration
    • Updated CLI agent mode to leverage new REPLAgent for improved user experience
    • Removed 396 lines of deprecated code from langchain-based mode module
  • Code Quality Enhancement: Significant codebase cleanup and modernization

    • Removed deprecated langchain-based mode module including agent, prompt generator components
    • Eliminated legacy PMP (Prompt Management Package) system for streamlined architecture
    • Improved maintainability through removal of obsolete code patterns and dependencies
    • Enhanced code organization with modern agent framework adoption

Technical

  • Framework Migration: Transitioned from LangChain to agents.as framework for improved agent capabilities
  • Performance: Enhanced agent execution efficiency and resource utilization
  • Maintainability: Simplified codebase architecture with modern framework patterns
  • Reliability: Improved agent mode stability through contemporary framework adoption
Click to expand v1.13.7 details

[1.13.7] - 2025-12-05

Changed

  • System Detection Optimization: Enhanced system detection logic with IS_UNIX variable

    • Added IS_UNIX variable to replace repetitive SYSTEM_OS.lower() != "windows" checks
    • Optimized 4 conditional statements across the codebase for better performance
    • Improved code readability with simplified conditional logic
    • Enhanced maintainability with centralized system detection
  • Module Interface Enhancement: Added explicit all list for better module exports

    • Introduced comprehensive all list defining public module interface
    • Categorized exports: Core Functions (get_data_info, stata_do, write_dofile, append_dofile)
    • Categorized exports: Utilities (mk_dir, load_figure, read_file)
    • Conditional exports for Unix-specific functions (help, ado_package_install)
    • Improved IDE support and module discoverability

Technical

  • Performance: Reduced repetitive string operations with centralized system detection
  • Code Quality: Enhanced module organization with explicit public interface definition
  • Maintainability: Centralized system detection logic easier to modify and maintain
  • Developer Experience: Better IDE autocomplete and module navigation with explicit exports
Click to expand v1.13.6 details

[1.13.6] - 2025-12-03

Fixed

  • Windows Compatibility Issues: Critical fixes for Windows user experience and cross-platform support
    • Fixed environment variable name from STATA-MCP-CLIENT to STATA_MCP_CLIENT for proper Windows environment access
    • Disabled help functionality on Windows systems to prevent system crashes during help command execution
    • Disabled ado package installation on Windows systems to ensure stable operation
    • Enhanced cross-platform reliability with Windows-specific conditional code paths

Changed

  • Function Parameters: Added strict_mode parameter to write_dofile function for enhanced control
  • Code Quality: Fixed grammar typos and improved documentation clarity throughout code comments
  • Platform Detection: Improved operating system detection with better case-insensitive handling

Technical

  • Cross-Platform Architecture: Enhanced Windows support while maintaining functionality for macOS and Linux
  • Error Prevention: Proactive disabling of problematic features on Windows to prevent crashes
  • Documentation: Improved code comments and parameter documentation for better maintainability
Click to expand v1.13.5 details

[1.13.5] - 2025-11-26

Changed

  • Logging System: Enhanced logging infrastructure with rotating file handler

    • Replaced FileHandler with RotatingFileHandler for better log management
    • Added 10MB file size limit with 5 backup files for automatic log rotation
    • Improved log file handling and disk space management
  • Language Detection Optimization: Improved prompt language detection and configuration

    • Moved language detection logic from mcp_servers.py to utils/Prompt/init.py
    • Added STATA_MCP_PROMPT_LANGUAGE environment variable for manual language override
    • Enhanced system language detection with better fallback mechanisms
    • Improved code organization with centralized language management

Technical

  • Code Quality: Enhanced import organization and removed unused locale import
  • Configuration: Improved environment variable handling for better flexibility
  • Reliability: More robust logging system with automatic rotation and backup management
  • Maintainability: Better separation of concerns between logging and language detection
Click to expand v1.13.4 details

[1.13.4] - 2025-11-25

Fixed

  • Log File Path Resolution: Fixed FileNotFoundError when running stata-mcp from directories without "~" subdirectory
  • Path Configuration: Use Path.home() for log file path instead of hardcoded "~/.statamcp.log"
  • User Experience: Eliminates need to manually create "~" folder in current directory
Click to expand v1.13.3 details

[1.13.3] - 2025-11-24

Added

  • JSON Export Feature: Enhanced summary() method with saved_path parameter for exporting data summaries to JSON files
  • UTF-8 Encoding Support: JSON files are saved with proper UTF-8 encoding for international character support
  • File Path Tracking: Summary results now include the saved file path when export is used
  • New save_to_json Static Method: Dedicated method for reliable JSON file writing with error handling
  • Comprehensive Logging: Added detailed logging throughout the get_data_info function for better debugging and monitoring
  • Enhanced Documentation: Updated function docstrings with complete output examples and usage patterns

Changed

  • Core Function Refactoring: Complete restructure of get_data_info function implementation for better maintainability and performance
  • Improved Data Processing: Optimized data processing pipeline with better separation of concerns
  • Numerical Precision: Standardized to 3-decimal precision in summary outputs for consistency
  • Error Handling: Enhanced error handling for file operations with proper boolean return status
  • Documentation Examples: Added real data format examples in function documentation

Technical Improvements

  • Code Organization: Better separation of concerns with dedicated helper methods
  • Performance Enhancement: Optimized data processing pipeline for improved speed
  • Path Validation: Proper handling of both string and PathLike objects for file paths
  • Maintainability: Cleaner code structure for easier future development

Backward Compatibility

  • ✅ All changes maintain full backward compatibility
  • ✅ Existing code will continue to work without modifications
  • ✅ New features are opt-in through additional parameters
Click to expand v1.13.2 details

[1.13.2] - 2025-11-23

Added

  • Logging Control: Added controller for logging system
    • Environment variable control for flexible logging configuration
    • STATA_MCP_LOGGING_ON for complete logging enable/disable control
    • Separate handlers for console and file output with independent control
    • Improved user experience with customizable logging behavior
Click to expand v1.13.1 details

[1.13.1] - 2025-11-22

Added

  • Comprehensive Logging System: Implemented complete logging infrastructure throughout MCP server
    • Added comprehensive logging system to MCP server for enhanced debugging and monitoring
    • Added logging to all 8 core tool functions for better operation tracking
    • Improved StataDo constructor documentation for clearer usage guidance

Changed

  • Enhanced System Observability: Improved debugging capabilities with comprehensive logging coverage
    • Better visibility into MCP server operations and tool function executions
    • Enhanced error tracking and performance monitoring capabilities
    • Improved developer experience with detailed operation logs

Technical

  • Logging Infrastructure: Complete logging system integration with configurable log levels
  • Documentation: Enhanced constructor documentation for better developer understanding
  • Debugging: Improved troubleshooting capabilities with comprehensive operation logging
Click to expand v1.13.0 details

[1.13.0] - 2025-11-20

Added

  • Agent-as-Tools Framework: Complete framework for converting agents to MCP tools with seamless integration

    • New comprehensive agent conversion system for enhanced workflow automation
    • Flexible error handling and type safety throughout the agent-as-tools ecosystem
    • Enhanced module exports for improved discoverability and integration
  • ADO Package Installation Framework: Comprehensive Stata package management system

    • Complete framework for installing Stata packages from multiple sources
    • SSC (Statistical Software Components) archive integration with enhanced search capabilities
    • Direct GitHub repository installation support for custom packages
    • Net install functionality for additional package distribution methods
    • Extensible architecture supporting future package sources and installation methods
  • Multi-Provider API System: Enhanced model provider flexibility and management

    • New Provider class for flexible API provider management in set_model functionality
    • Support for multiple LLM providers with unified configuration interface
    • Improved API switching and configuration management for different provider environments

Security

  • Shell-Escape Protection: Critical security enhancement to prevent OS command execution
    • Added validation step to block Stata shell-escape directives (!cmd, shell cmd)
    • Comprehensive input validation before do-file execution to prevent malicious commands
    • Enhanced security posture for production environments (Contributed by @123mutouren321414)
    • Fixes security issue #20 with robust protection mechanisms

Changed

  • Pathlib Migration: Complete migration from os.path to pathlib.Path for enhanced cross-platform support

    • System-wide replacement of os.path operations with modern pathlib.Path interface
    • Improved cross-platform compatibility and path handling reliability
    • Enhanced type safety and better IDE support with path operations
    • More robust and maintainable path manipulation throughout the codebase
  • Enhanced Error Handling: Comprehensive type safety improvements and parameter design enhancements

    • Fixed get_data_info tool write type errors for improved data processing reliability
    • Resolved get_exp_cwd to properly return Path object instead of string
    • Fixed dict -> str function return type errors throughout the application
    • Updated default args in get_data_info tool for better parameter design
    • Improved type annotations and validation across core functionality
  • Code Architecture Enhancements: Improved maintainability and performance optimizations

    • Refactored help functionality into dedicated StataHelp class for better modularity
    • Enhanced log width issue resolution through terminal size environment configuration
    • Improved overall code organization with better separation of concerns
    • Enhanced performance and reliability through systematic code improvements

Fixed

  • Type Safety Issues: Resolved multiple type-related errors for improved application stability

    • Fixed function return type errors that could cause runtime issues
    • Enhanced parameter validation and type checking across core tools
    • Improved error handling for edge cases and invalid input scenarios
    • Better integration between different components with consistent type handling
  • Terminal and Logging Issues: Resolved display and logging problems for better user experience

    • Fixed log width issues by properly setting terminal size environment variables
    • Improved overall terminal output formatting and readability
    • Enhanced debugging capabilities with better error message formatting

Technical

  • Code Quality: Comprehensive improvements to code maintainability and extensibility

    • Enhanced type annotations throughout the application for better IDE support
    • Improved error handling patterns with comprehensive exception management
    • Better separation of concerns with modular architecture enhancements
    • Enhanced documentation and code examples for improved developer experience
  • Performance: Optimized application performance through systematic improvements

    • Faster startup times with optimized module loading and initialization
    • Improved memory usage patterns through better resource management
    • Enhanced overall application responsiveness and stability
    • Better integration efficiency between different system components
  • Security: Strengthened security posture with comprehensive protection mechanisms

    • Enhanced input validation and sanitization throughout the application
    • Improved protection against common web and CLI security vulnerabilities
    • Better error handling that prevents information leakage in production environments
    • Comprehensive security review and hardening of core functionality
Click to expand v1.12.1 details

[1.12.1] - 2025-11-02

Added

  • Linux Platform Support: Complete Linux platform Stata detection with intelligent directory search

    • New FinderLinux implementation with configurable search paths for Linux systems
    • Enhanced directory search in /usr/local/bin with automatic detection of Stata-related directories
    • Support for custom Stata installation locations through flexible path configuration
    • Full integration with existing StataFinder architecture maintaining cross-platform consistency
  • Enhanced StataEditionConfig: Advanced comparison logic with comprehensive priority system

    • Priority-based sorting system (mp > se > be > ic > default) with configurable edition preferences
    • Support for float version comparison (e.g., 19.5 > 19) within same edition type
    • Automatic path detection and version parsing from executable names and paths
    • Comprehensive docstring with practical examples for easy integration
    • Fallback priority handling for unknown editions with graceful degradation
  • Project Organization Improvements: Enhanced directory structure for better maintainability

    • Moved agent_examples directory to source/agent_examples for centralized documentation
    • Updated all documentation references to reflect new directory structure
    • Maintained file integrity through git rename operations preserving history
    • Improved project structure consistency with better separation of concerns

Changed

  • Documentation Synchronization: Ensured consistency across multilingual documentation

    • Updated Chinese README news section with English version content including StataFinder updates
    • Added newest research section with links to reports website for better user guidance
    • Enhanced environment variable configuration documentation with setup examples
    • Maintained consistency between English and Chinese documentation for better user experience
  • StataFinder Architecture: Enhanced cross-platform support with Linux integration

    • Enabled Linux platform in FINDER_MAPPING removing "Not Support now" limitation
    • Improved error handling with proper exception messages for missing Stata installations
    • Enhanced type annotations and documentation throughout the StataFinder system
    • Maintained backward compatibility while adding comprehensive Linux support

Fixed

  • Documentation Consistency: Resolved discrepancies between English and Chinese README files
    • Added missing StataFinder update notices with environment variable configuration guidance
    • Included newest research links that were present in English but missing in Chinese version
    • Ensured all news content is properly synchronized across supported languages
    • Improved documentation accuracy for better user guidance and setup experience

Technical

  • Code Quality: Enhanced type safety and error handling throughout Linux finder implementation
  • Performance: Optimized directory search with intelligent path validation and iteration
  • Compatibility: Maintained full backward compatibility with existing StataFinder functionality
  • Extensibility: Clean architecture allows easy addition of new platforms and search strategies
  • Documentation: Comprehensive docstrings and examples for enhanced developer experience
Click to expand v1.12.0 details

[1.12.0] - 2025-10-31

Added

  • Unified Priority System: Complete StataFinder architecture overhaul with intelligent version and edition comparison

    • New StataEditionConfig class with comprehensive version extraction and sorting capabilities
    • Priority system: MP > SE > BE > IC > default with configurable edition preferences
    • Automatic version detection from file paths, directory names, and executable names
    • Support for floating-point versions (e.g., 19.5 > 19) and reasonable version range validation (1-30)
    • Magic methods for easy data access (__str__, __int__, __float__) and path properties
  • Complete Windows Platform Support: Full implementation of FinderWindows with three-layer search strategy

    • Layer 1: Standard installation path search (Program Files, Program Files (x86))
    • Layer 2: Non-standard custom installation locations with drive scanning
    • Layer 3: Deep scan fallback for comprehensive discovery across all drives
    • Intelligent drive detection and depth-limited scanning for performance optimization
    • Skip pattern system to avoid redundant searching of standard directories in non-standard scans
  • Enhanced macOS Application Detection: Improved FinderMacOS with comprehensive app bundle support

    • /Applications directory scanning with version extraction from isstata.* files
    • Automatic edition detection from Stata app names (StataMP, StataSE, StataBE, StataIC)
    • Support for both /Applications/Stata unified directory and separate versioned applications
    • Robust executable path resolution within app bundles (Contents/MacOS/stata-{edition})

Fixed

  • Critical Empty List Handling: Prevents crashes when no Stata installations are found

    • Fixed max() calls on empty lists in both Windows and macOS finder methods
    • Proper empty list validation before attempting to find highest priority Stata executable
    • Graceful fallback behavior when search layers return no results
    • Enhanced error handling with meaningful exception messages
  • Platform-Specific Search Optimization: Improved search efficiency and reliability

    • Windows: Simple matching approach replaces overly strict regex filtering for broader compatibility
    • macOS: Better handling of Homebrew installations without version numbers (defaults to version 99)
    • Enhanced path validation and executable checking across all platforms
    • Improved exception handling for permission errors and inaccessible directories

Changed

  • Architecture Modernization: Complete StataFinder system redesign for better maintainability

    • Abstract FinderBase class with comprehensive documentation and type annotations
    • Platform-specific implementations following consistent design patterns
    • Enhanced finder.py integration with improved error handling and exception management
    • Updated utility modules (usable.py, installer.py, mcp_servers.py) for better integration
  • Enhanced Documentation and Type Safety: Improved code quality and developer experience

    • Comprehensive docstrings for all new classes and methods with examples
    • Full type annotations throughout the StataFinder system
    • Detailed abstract method documentation explaining platform-specific requirements
    • Clear separation of concerns between different search strategies and platform implementations

Technical

  • Performance: Three-layer search strategy balances speed with thoroughness
  • Reliability: Robust error handling prevents crashes across all search scenarios
  • Compatibility: Maintains backward compatibility while adding new functionality
  • Extensibility: Clean architecture allows easy addition of new platforms and search strategies
  • Testing: Comprehensive validation across different installation patterns and platforms
Click to expand v1.11.1 details

[1.11.1] - 2025-10-23

Fixed

  • Cross-Platform Initialization Error: Critical fix for Windows and Linux StataFinder initialization failure

    • Fixed AttributeError in src/stata_mcp/core/stata/stata_finder/finder.py:43
    • Updated finder initialization from finder_mapping.get(self.current_os)() to _os_finders.get(self.current_os, None)
    • Resolves RuntimeError on Windows and Linux systems during StataFinder initialization
    • Ensures consistent behavior across all supported platforms (macOS, Windows, Linux)
  • Platform Compatibility: Enhanced cross-platform stability and reliability

    • Proper None handling in StataFinder initialization prevents function call errors
    • Eliminates startup failures for Windows and Linux users
    • Maintains existing functionality for macOS users
    • Improved error prevention with defensive programming practices

Technical

  • Code Quality: Single-line critical fix with maximum impact and minimal risk
  • Testing: Comprehensive cross-platform verification completed
  • Compatibility: 100% backward compatible with existing installations
  • Stability: Enhanced system reliability for all supported operating systems
Click to expand v1.11.0 details

[1.11.0] - 2025-10-20

Added

  • Claude Code Client Mode: Added dedicated support for Claude Code client environment
    • New -c/--client CLI option for Claude Code client mode
    • Automatic detection and configuration for Claude Code environment
    • Enhanced working directory handling for client-specific workflows
    • Optimized MCP server integration for Claude Code platform

Changed

  • Code Architecture: Major refactoring to improve modularity and maintainability
    • Extracted MCP server initialization and tools from __init__.py to dedicated mcp_servers.py module
    • Updated main.py import path to use new modular structure
    • Streamlined package initialization with better separation of concerns
    • Improved code organization for enhanced development experience

Changed

  • Dependency Management: Optimized dependency structure for cleaner installation
    • Removed python-dotenv from active dependencies as it's no longer required
    • Updated uv.lock file to reflect dependency changes
    • Improved CLI import structure for better performance
    • Enhanced version import using importlib.metadata instead of package-level import

Changed

  • CLI Enhancements: Improved command-line interface with new client mode support
    • Restructured CLI imports for better loading performance
    • Added lazy loading patterns for non-critical components
    • Enhanced error handling and user feedback
    • Better separation between different CLI modes (agent, client, mcp)

Technical

  • Performance: Enhanced startup performance through optimized imports and modular architecture
  • Maintainability: Improved code organization with clear separation between server initialization and package metadata
  • Compatibility: Better support for different client environments and use cases
  • Dependencies: Streamlined dependency list with removal of unnecessary python-dotenv requirement
Click to expand v1.10.2 details

[1.10.2] - 2025-10-17

Added

  • AgentRunner Evaluation Method: Complete evaluation workflow implementation in AgentRunner class

    • New evaluate() method for seamless ScoreModel integration with automatic task execution and scoring
    • Type conversion handling for processer data (List[Dict] to String format) for ScoreModel compatibility
    • Optional result display with is_display parameter for immediate feedback and debugging
    • Automatic conversation history extraction and formatting for evaluation purposes
    • Direct parameter passing and type-safe integration between AgentRunner and ScoreModel
  • Enhanced Evaluation Integration: Streamlined ScoreModel connection with agent execution

    • Automatic task execution and result processing in a single method call
    • Built-in error handling and validation throughout the evaluation pipeline
    • Comprehensive fallback mechanisms for robust evaluation operations
    • Simplified evaluation workflow with reduced boilerplate code

Changed

  • Developer Experience: Improved evaluation workflow simplicity and usability

    • Single evaluate() call replaces multi-step evaluation process
    • Automatic handling of type conversions between AgentRunner and ScoreModel components
    • Optional display functionality for real-time monitoring and debugging
    • Enhanced error reporting and validation for evaluation scenarios
  • Type Compatibility: Enhanced data flow between evaluation components

    • Robust integration between different data structures (List[Dict] to String conversion)
    • Preserved conversation structure and context during type conversion
    • Maintained data integrity throughout the evaluation pipeline
    • Type-safe parameter handling for reliable evaluation workflows

Technical

  • Code Architecture: Enhanced AgentRunner with complete evaluation capabilities

    • Clean separation between task execution and evaluation logic
    • Modular design allowing for easy customization and extension
    • Comprehensive type annotations and documentation for evaluation methods
    • Improved error handling and validation throughout the evaluation framework
  • Backward Compatibility: Maintained full compatibility with existing evaluation workflows

    • All existing AgentRunner functionality remains unchanged
    • New evaluate() method is additive without disrupting existing code
    • Seamless integration with existing ScoreModel evaluation framework
    • Zero impact on current evaluation processes and tools
Click to expand v1.10.1 details

[1.10.1] - 2025-10-16

Added

  • AgentRunner Class: New comprehensive agent management system for simplified LLM evaluation workflows

    • OpenAI-compatible API integration with support for multiple providers (OpenAI, DeepSeek, etc.)
    • get_processer() static method for automatic conversation history extraction from agent results
    • get_final_result() static method for extracting final answers from agent outputs
    • Built-in error handling and graceful fallback mechanisms for robust operation
    • Full type annotations and comprehensive documentation with practical examples
  • Comprehensive Testing Framework: Complete test suite for AgentRunner functionality validation

    • Mock-based testing system for reliable validation without API dependencies
    • Real API testing with automatic fallback to mock tests when credentials unavailable
    • Comprehensive error handling validation and conversation structure verification
    • Integrity checks for method outputs and data format validation
    • Complete test coverage in tar.py with both mock and real API scenarios
  • Enhanced Documentation: Updated evaluation guide with AgentRunner integration examples

    • Step-by-step AgentRunner usage instructions with practical Stata analysis examples
    • Complete code examples for real-world evaluation scenarios including auto dataset analysis
    • Batch evaluation workflows for processing multiple tasks efficiently
    • Custom evaluation criteria and metrics implementation examples
    • Environment setup guides for different API providers (OpenAI, DeepSeek)

Changed

  • Module Organization: Enhanced evaluate module structure with better component integration

    • AgentRunner now properly exported in evaluate.__init__.py for direct imports
    • Cleaner module structure with improved separation of concerns
    • Better discoverability of evaluation components and enhanced import experience
    • Updated Evaluation.md documentation with comprehensive AgentRunner usage examples
  • Developer Experience: Streamlined evaluation workflow with simplified task execution

    • One-click conversation extraction and result processing through AgentRunner methods
    • Reduced boilerplate code for common evaluation scenarios and use cases
    • Better error messages and debugging information for improved development experience
    • Enhanced integration between agents and evaluation tools
  • Evaluation Framework: Improved evaluation workflow with better tool integration

    • Seamless integration between AgentRunner and existing ScoreModel functionality
    • Enhanced support for OpenAI Agents result processing and extraction
    • Better handling of complex conversation structures with multi-turn interactions
    • Improved role detection and content extraction for diverse agent response formats

Fixed

  • Conversation Processing: Enhanced handling of complex conversation structures in agent outputs

    • Better support for multi-turn conversations with tool interactions and role switching
    • Enhanced role detection and content extraction from various agent response formats
    • More robust parsing of agent response data with improved error resilience
    • Better handling of edge cases in conversation structure processing
  • Testing Reliability: Enhanced test stability and comprehensive error handling

    • Improved mock data structure for more realistic testing scenarios
    • Better exception handling in test environments with detailed error reporting
    • More comprehensive validation of method outputs and data integrity
    • Enhanced test reliability through better error recovery mechanisms

Technical

  • Dependencies: No new dependencies added for AgentRunner functionality

    • AgentRunner uses existing project dependencies (openai-agents, openai, langchain)
    • Lightweight implementation with minimal performance impact
    • Backward compatibility maintained for all existing features and workflows
  • Code Architecture: Enhanced evaluation module with improved component integration

    • Clean separation between agent execution and result processing logic
    • Modular design allows for easy extension and customization
    • Standardized evaluation criteria based on professional statistical standards
    • Improved error handling and fallback mechanisms throughout the framework
Click to expand v1.10.0 details

[1.10.0] - 2025-10-14

Added

  • LLM Evaluation Module Framework: Comprehensive evaluation system for Large Language Model performance assessment

    • New evaluate package with complete module structure (src/stata_mcp/evaluate/)
    • _model.py providing structured assessment framework and evaluation criteria
    • advice.py for evaluation advice generation and result analysis
    • score_it.py for automated LLM performance scoring and assessment
    • Full type annotations and comprehensive documentation for evaluation use
  • ScoreModel Evaluation System: Automated LLM performance assessment framework

    • Task completion accuracy evaluation based on reference answers
    • Response quality assessment against expected outcomes
    • Process analysis for LLM reasoning quality evaluation
    • Historical message processing for context assessment
    • Quantitative metrics for model comparison and benchmarking
  • Structured Evaluation Framework: Systematic approach to LLM performance evaluation

    • Task definition and reference answer management system
    • Process evaluation for analyzing LLM reasoning chains
    • Final answer scoring and validation mechanisms
    • Configurable evaluation parameters for different use cases
    • Extensible framework for custom evaluation criteria
  • Research Assessment Tools: Built-in evaluation capabilities for AI research workflows

    • Standardized evaluation methodology for reproducible research
    • Benchmarking framework for model performance comparison
    • Reference answer management for accuracy assessment
    • Process analysis capabilities for reasoning evaluation

Changed

  • Enhanced Research Capabilities: Integrated LLM evaluation into existing Stata-MCP functionality

    • Evaluation framework works seamlessly with current research workflows
    • Optional enhancement for AI performance assessment without disrupting existing functionality
    • Flexible configuration for different evaluation scenarios and research requirements
    • Multi-language support for evaluation feedback and assessment results
  • Documentation Updates: Enhanced user documentation with LLM evaluation features

    • Updated main README with LLM evaluation module announcement
    • Synchronized Chinese README with new evaluation capabilities
    • Added Evaluation.md documentation for LLM assessment workflows
    • Enhanced quick start guides with evaluation setup examples

Technical

  • Code Architecture: New evaluation module with clean separation of concerns

    • Modular design allows for easy extension and customization
    • Standardized evaluation criteria based on professional statistical standards
    • Configurable scoring parameters for different assessment requirements
    • Professional statistical standards integration for academic use
  • Dependencies: No new dependencies added for evaluation functionality

    • Evaluation module uses existing project dependencies
    • Lightweight implementation with minimal performance impact
    • Backward compatibility maintained for all existing features
Click to expand v1.9.1 details

[1.9.1] - 2025-10-12

Removed

  • WebUI Module: Completely removed Flask-based web interface and all related functionality

    • Removed Flask dependency and all web-related dependencies from pyproject.toml
    • Deleted webui module (src/stata_mcp/webui/) including templates, static assets, and utilities
    • Removed --webui CLI argument and related webui startup functionality
    • Deleted WEBUI.md documentation file
  • Config Module: Discontinued TOML-based configuration system

    • Removed config module (src/stata_mcp/config/) and all configuration management logic
    • Deleted Configuration.md documentation file
    • Removed example.toml configuration template
    • Simplified project to use environment variable-based configuration only

Changed

  • Project Structure: Major simplification to focus on core MCP functionality

    • Streamlined project structure by removing 17 files and 2299 lines of code
    • Reduced dependency footprint for faster installation and smaller package size
    • Improved startup performance by eliminating complex configuration loading
    • Enhanced code maintainability through reduced complexity
  • Dependency Management: Optimized dependency list for lightweight installation

    • Removed Flask and web-related dependencies
    • Commented out optional jupyter-related dependencies not currently used
    • Maintained all core dependencies for Stata-MCP functionality
    • Updated uv.lock to reflect new dependency structure
  • Configuration Simplification: Streamlined configuration approach

    • Now relies solely on environment variables for configuration
    • Maintained dotenv loading for essential settings
    • Removed complex TOML parsing and validation logic
    • Better defaults for improved out-of-the-box experience

Technical

  • Code Quality: Improved maintainability and focus

    • Reduced attack surface by removing web interface components
    • Fewer potential points of failure in initialization
    • Cleaner separation of concerns between CLI and core functionality
    • Better alignment with MCP protocol's primary use case
  • Performance: Enhanced startup and runtime performance

    • Faster initialization due to reduced module loading
    • Lower memory footprint from fewer loaded dependencies
    • Simplified error handling paths
    • Improved reliability through reduced complexity

Migration Notes

  • WebUI Users: Web interface no longer available - use CLI interface instead
  • Config File Users: TOML configuration no longer supported - migrate to environment variables
  • Minimal Impact: Most users unaffected as they were already using CLI-based workflow
  • Simple Migration: Straightforward migration path for affected users
Click to expand v1.9.0 details

[1.9.0] - 2025-10-11

Added

  • Agent as Tool Framework: Revolutionary multi-agent workflow support for Stata analysis

    • New StataAgent class with comprehensive ReAct (Reasoning-Action-Observation) framework
    • Professional Stata Data Analysis Expert role with economic research assistant capabilities
    • Seamless integration as a tool within other AI agents for complex workflows
    • Default comprehensive instructions covering data understanding, code generation, execution, and results interpretation
    • Configurable tool descriptions with clear capabilities and input/output specifications
  • Multi-Model Provider Support: Enhanced compatibility with various LLM providers

    • Extended type hints to support OpenAIChatCompletionsModel | Model union types
    • set_model() utility function for easy configuration of alternative providers (DeepSeek, etc.)
    • Native support for OpenAI ChatCompletionsModel with fallback to generic Model interface
    • Improved IDE support and code completion through enhanced type annotations
  • Comprehensive Documentation Suite: Complete bilingual documentation for Agent as Tool functionality

    • Detailed agent_as_tool.md guide with practical examples and use cases
    • Quick start guide for basic usage and advanced configuration examples
    • Integration patterns with existing agent frameworks (OpenAI Agents, LangChain)
    • Multi-provider setup examples with DeepSeek and other OpenAI-compatible models
  • Enhanced README Integration: Improved user onboarding with Agent as Tool examples

    • New "Agent as Tool" section in main README with working code examples
    • Synchronized Chinese README with all new features and examples
    • Updated news sections highlighting new multi-agent capabilities
    • Clear navigation to detailed documentation and quick start guides

Changed

  • Agent Architecture Enhancements: Modular and flexible agent design

    • Clean separation between agent logic and tool integration through as_tool property
    • Flexible MCP server configuration with environment variable support
    • Enhanced tracing control for performance optimization and debugging
    • Configurable agent behavior through custom instructions, models, and tools
  • Developer Experience Improvements: Enhanced usability and flexibility

    • Support for custom agent names, instructions, and tool descriptions
    • Adjustable max_turns parameter for complex analysis tasks
    • Configurable DISABLE_TRACING for performance optimization
    • Better error handling and connection management for MCP servers
  • Type Safety and IDE Support: Improved development experience

    • Enhanced type annotations throughout the agent framework
    • Support for union types (OpenAIChatCompletionsModel | Model)
    • Better IDE support with improved code completion and error detection
    • Reduced runtime errors through comprehensive type checking

Technical

  • New Dependencies: Added agents library for Agent as Tool functionality

    • Support for OpenAI Agents framework with seamless integration
    • Enhanced MCP server configuration and management
    • Improved error handling and connection stability
  • Code Organization: Enhanced module structure for agent functionality

    • New agent_as_tool module with StataAgent and set_model utilities
    • Clean separation of concerns between agent logic and tool integration
    • Improved maintainability and extensibility for future agent features
  • Configuration Flexibility: Enhanced customization options

    • Environment variable support for Stata CLI configuration
    • Customizable agent instructions and tool descriptions
    • Flexible model provider configuration with easy switching between providers
Click to expand v1.8.2 details

[1.8.2] - 2025-10-10

Added

  • URL-based DTA File Reading: Implemented support for reading Stata DTA files directly from HTTP/HTTPS URLs
    • Added URL detection and validation in DtaDataInfo class
    • Implemented memory-efficient reading using BytesIO for optimal performance
    • Support for both http:// and https:// protocols with comprehensive error handling
    • Seamless integration with existing local file functionality
    • Automatic URL format validation and file extension verification

Changed

  • Enhanced DtaDataInfo Architecture: Extended DtaDataInfo class to support both local and remote files

    • Unified _read_data() method handles both file sources without code duplication
    • Intelligent file path detection (URL vs local path) for appropriate processing
    • Streamlined DataInfoBase class by removing unnecessary abstract method _read_data_from_url()
    • Cleaner separation of concerns between local and remote operations
  • Documentation Updates: Enhanced API documentation and examples

    • Updated docstring examples in __init__.py with comprehensive output format examples
    • Added clear demonstration of remote data analysis capabilities
    • Improved error handling documentation for network operations

Fixed

  • URL Handling Conflicts: Resolved Path object conflicts when processing URLs as file paths

    • Fixed URL validation to properly parse and validate HTTP/HTTPS URLs
    • Corrected file extension checking for remote files using URL path parsing
    • Improved error messages to provide clearer feedback for URL-related issues
  • Network Error Handling: Enhanced error handling for network operations

    • Added comprehensive timeout configurations and status code validation
    • Improved error reporting for network failures, invalid URLs, and file format issues
    • Better exception handling with informative error messages for troubleshooting

Technical

  • New Dependencies: Added requests library for HTTP operations

    • Robust HTTP client with built-in error handling and retry mechanisms
    • Efficient content handling for binary DTA files with proper encoding
    • Support for HTTP/HTTPS protocols with TLS security
  • Memory Optimization: Implemented memory-efficient data processing

    • Direct loading into BytesIO eliminates temporary file overhead
    • Streaming content handling for large files with optimal memory usage
    • Zero intermediate file operations for URL-based data access
Click to expand v1.8.1 details

[1.8.1] - 2025-10-09

Fixed

  • MCP Version Compatibility: Enhanced MCP initialization logic for better version compatibility
    • Improved error handling for different MCP implementations (v1.16.0+)
    • Enhanced FastMCP initialization with fallback mechanisms
    • Better robustness when encountering validation errors
    • Streamlined version-specific initialization logic

Changed

  • Initialization Process: Reorganized FastMCP initialization sequence
    • Prioritized MCP v1.16.0+ configuration with proper icon array format
    • Improved fallback error handling with non-config initialization
    • Enhanced user guidance for MCP version upgrades

Technical

  • Code Robustness: Improved error handling and initialization reliability
  • Version Support: Better compatibility with MCP v1.16.0 and newer versions
Click to expand v1.8.0 details

[1.8.0] - 2025-10-09

Added

  • Enhanced Data Info Support: Added comprehensive multi-format data information functionality

    • New CsvDataInfo class for handling CSV file metadata and statistics
    • Enhanced DtaDataInfo class for Stata .dta file data information extraction
    • Improved DataInfoBase base class with kwargs support for extensibility
    • Enhanced get_data_info function with CSV and enhanced DTA file format support
    • Added save functionality with configurable output options
    • Implemented temporary directory management for data processing
    • Full type annotations and comprehensive documentation
  • Enabled Data Info Tool: Reactivated get_data_info functionality

    • Tool decorator re-enabled for production use
    • Support for multiple file formats: .dta, .csv, and Excel files
    • Improved error handling and user feedback
    • Enhanced data summary statistics and metadata extraction

Changed

  • MCP Version Upgrade: Updated MCP dependency from v1.15.0 to v1.16.0
    • Enhanced FastMCP initialization logic for better version compatibility
    • Improved error handling for different MCP implementations
    • Better robustness in initialization process
    • Streamlined dependency management

Technical

  • Code Architecture: Improved data info module structure with base classes
  • Type Safety: Enhanced type annotations across data info functionality
  • Module Organization: Better separation of concerns in data processing modules
Click to expand v1.7.4 details

[1.7.4] - 2025-10-09

Fixed

  • MCP Dependency Conflicts: Resolved version conflicts in MCP dependency chain
    • Fixed compatibility issues with different MCP implementations
    • Enhanced system stability through streamlined dependency management
    • Improved error handling for dependency-related edge cases

Technical

  • Dependency Optimization: Streamlined MCP dependencies for better stability
  • Version Update: Updated version from 1.7.3 to 1.7.4
Click to expand v1.7.3 details

[1.7.3] - 2025-10-06

Added

  • Enhanced Encoding Support: Added configurable encoding parameters to dofile functions
    • write_dofile now supports optional encoding parameter (default: utf-8)
    • append_dofile enhanced with configurable encoding for read/write operations
    • Better support for international character sets including Chinese, Japanese, Korean
    • Maintains full backward compatibility with existing code

Fixed

  • Issue #18: Resolved potential Chinese character encoding problems in dofile operations
    • Proactive fix for international character set support
    • Enables flexible encoding handling for various environments

Technical

  • Encoding Flexibility: Improved dofile encoding handling without breaking changes
  • Version Update: Updated version from 1.7.2 to 1.7.3
Click to expand v1.7.2 details

[1.7.2] - 2025-10-06

Added

  • Agent Mode Support: Added comprehensive agent mode functionality
    • New stata-mcp --agent command line option for interactive AI-driven analysis
    • StataAgent class with LangChain integration for AI-powered Stata operations
    • Support for GPT-5, DeepSeek, and other OpenAI-compatible models
    • ReAct (Reasoning + Acting) prompt template for enhanced AI reasoning
    • MultiServerMCPClient integration for seamless Stata command execution
    • Interactive workflow with data source and task input prompts
  • Agent Examples: Added complete agent implementation examples
    • LangChain and LangGraph integration examples
    • OpenAI-based agent implementation
    • Advanced prompt generation system for agent tasks
    • Comprehensive documentation and README files
  • Agent Startup Script: Added agent.sh automated startup script
    • Auto-detection of uv package manager with fallback to pip
    • Python 3.11+ version validation and environment checking
    • Interactive installation prompts for uv package manager
    • Automatic package installation and version validation
    • Seamless agent mode launch with proper error handling
    • Cross-platform compatibility with colored output for better UX

Changed

  • Jupyter Dependencies: Removed unused Jupyter-related dependencies from pyproject.toml
    • Commented out jupyter-client>=8.6.3 and stata-kernel>=1.12.2
    • Commented out notebook>=7.4.5 and jupyter>=1.1.1
    • Streamlined installation process and reduced package size
    • No impact on core Stata-MCP functionality

Technical

  • Dependency Optimization: Cleaned up unused dependencies for faster installation
  • Agent Mode Integration: Enhanced CLI with agent mode support via -a/--agent flag
  • Version Update: Updated version from 1.7.1 to 1.7.2
Click to expand v1.7.1 details

[1.7.1] - 2025-10-05

Changed

  • mk_dir Security: Re-enabled mk_dir tool with enhanced security using pathvalidate library
    • Added comprehensive path validation and sanitization
    • Implemented secure directory creation with proper permissions (0o755)
    • Added detailed error handling for invalid paths and permission issues
    • Improved function documentation with comprehensive parameter descriptions

Technical

  • Dependencies: Added pathvalidate>=3.3.1 for secure path validation
  • Version Update: Updated version from 1.7.0 to 1.7.1
Click to expand v1.7.0 details

[1.7.0] - 2025-10-4

Added

  • AI-Assisted Research: Added comprehensive AI-assisted empirical research report with latest findings
  • Prompt Engineering: Introduced comprehensive task prompt guide and examples for better AI interaction
  • Template System: Added prompt-generator template for standardized AI request formatting
  • Research Documentation: Added detailed research report on StataMCP usage for social science research
  • Prompt Examples: Added two practical examples for PromptGenerator usage
  • Load Figure: Added load_figure functionality for image handling
  • Sandbox Infrastructure: Added sandbox infrastructure for testing
  • Main Entry Point: Added main.py entry point for local development
  • Multilingual Documentation: Updated Chinese, French, and Spanish README files
  • Agent Mode Support: Added agent mode support documentation
  • China Users Guide: Added specialized documentation for China users
  • LLM Integration Guide: Added comprehensive LLM documentation for AI integration

Changed

  • MCP Protocol: Upgraded MCP from version 1.14 to 1.15 for latest features
  • Module Naming: Renamed StataFinder to stata_finder for snake_case consistency
  • Directory Structure: Improved code organization with better directory structure
  • Contributing Guide: Updated CONTRIBUTING.md documentation
  • Security Policy: Enhanced security policy with comprehensive privacy disclaimer
  • Git Standards: Updated CLAUDE.md with git push restrictions and standards
  • App Icon: Updated app icon to higher resolution image
  • Project Dependencies: Updated project dependencies and lock files

Disabled (Commented Out)

  • Directory Creation: mk_dir tool implemented but decorator commented out for safety considerations
  • Data Info Function: get_data_info tool implemented but decorator commented out

Fixed

  • ValueError Prevention: Fixed default instructions setting to avoid ValueError
  • macOS Compatibility: Fixed errors in StataFinder.macos
  • Citation Corrections: Fixed citation mistakes in research documentation
  • Environment Configuration: Fixed environment name errors in configuration
  • Debug Cleanup: Removed leftover debug print statements

Technical

  • Code Architecture: Improved code organization and maintainability
  • Function Safety: Temporarily disabled certain functions via decorator commenting for security
  • Development Environment: Enhanced development environment setup
  • Data Info Stability: Temporarily disabled get_data_info for stability considerations
Click to expand v1.6.3 details

[1.6.3] - 2025-09-12

Added

  • MCP Resource Support: Added @mcp.resource decorator for help function with URI help://stata/{cmd}
  • AI Coding Ability Report: Added comprehensive comparison chart of different AI models' Stata code generation capabilities in source documentation

Changed

  • Dependency Upgrade: Upgraded mcp[cli] from >=1.9.0 to >=1.13.0 for latest MCP protocol features
  • Version Updates: Updated version numbers across all documentation files and CITATION.cff

Technical

  • Enhanced MCP Support: Improved MCP protocol compatibility with resource URI support
Click to expand v1.6.2 details

[1.6.2] - 2025-08-15

Changed

  • CLI Architecture: Refactored CLI entry point from __init__.py to dedicated CLI module
    • Moved CLI functionality to stata_mcp/cli/_cli.py
    • Improved code modularity and separation of concerns
    • Updated entry point configuration in pyproject.toml
    • Enhanced maintainability following Python packaging best practices

Technical

  • Code Organization: Clean separation between package initialization and CLI execution
  • Entry Point: Updated to use dedicated CLI module instead of __init__.py
  • Module Structure: Reduced complexity in main module initialization
Click to expand v1.6.1 details

[1.6.1] - 2025-08-09

Fixed

  • Fixed Excel file reading issue in get_data_info function by adding missing openpyxl dependency
  • Resolved compatibility issues with Excel (.xlsx) file formats

Added

  • Added openpyxl>=3.1.5 to project dependencies for Excel file support

Security

  • Updated license from MIT to Apache License 2.0 for better legal protection and compatibility

Changed

  • License: Migrated from MIT License to Apache License 2.0
    • Updated LICENSE file to Apache 2.0 full text
    • Updated all documentation files (README, README-cn, README-fr, README-sp)
    • Updated CITATION.cff license field
    • Updated pyproject.toml license field
    • Updated Statement.md in all languages (中文, English, Français)
    • Updated all license badges from MIT to Apache 2.0
    • Ensured consistent Apache 2.0 licensing across entire project
Click to expand v1.6.0 details

[1.6.0] - 2025-06-28

Added

  • Initial release with core Stata-MCP functionality
  • Support for regression analysis via LLM integration
  • Multi-language documentation (English, Chinese, French, Spanish)
  • PyPI package distribution
  • Jupyter integration support
  • Web UI interface
  • Cross-platform support (macOS, Windows, Linux)

Features

  • Stata command execution via MCP protocol
  • Data analysis automation
  • Regression model building assistance
  • Statistical output interpretation
  • Code generation and debugging support