### Run SOAP demo end to end Source: https://github.com/bvenkata/legacy2mcp/blob/main/examples/README.md Install the package and start the demo SOAP service, then inspect the generated tools. ```bash pip install -e ".[dev]" # terminal 1 - start the demo SOAP service python examples/soap/run_mock_calculator.py # terminal 2 - discover the tools generated from its WSDL legacy2mcp inspect --config examples/soap/config.calculator.yaml ``` -------------------------------- ### Run legacy2mcp init interactively Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Starts the interactive setup wizard, which prompts for the target type (WSDL URL, REST API URL, website, or GitHub repo/local path) and writes a starting config.yaml. The displayed output shows the interactive menu choices. ```bash legacy2mcp init ``` ```text What do you want to point legacy2mcp at? 1) WSDL URL (SOAP service) 2) REST API URL (tries OpenAPI/Swagger discovery) 3) A website with no API docs at all (crawls it for forms/content) 4) GitHub repo URL or a local path to its source code Choice [1-4]: ``` -------------------------------- ### Development setup commands Source: https://github.com/bvenkata/legacy2mcp/blob/main/CONTRIBUTING.md Clone the repository, install with dev extras, and run the test suite. The [dev] extra installs pytest, pytest-asyncio, flask, and lxml. Tests run against in-process mocks, requiring no external services. ```bash git clone https://github.com/bvenkata/legacy2mcp.git cd legacy2mcp pip install -e ".[dev]" pytest tests/ -v ``` -------------------------------- ### Run SOAP demo with Docker Source: https://github.com/bvenkata/legacy2mcp/blob/main/examples/README.md Start the demo SOAP service via Docker Compose and run legacy2mcp inspect inside a container. ```bash docker compose up demo-soap-service -d docker compose run --rm legacy2mcp legacy2mcp inspect \ --config examples/soap/config.calculator.docker.yaml ``` -------------------------------- ### Set up SOAP Orders demo locally Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/clients.md Clones the repo, installs dev dependencies, and starts a local mock Orders service on http://127.0.0.1:8124/orders. Provides orders_GetOrder, orders_ListOrders, and orders_GetInventory; CreateOrder and CancelOrder stay hidden until allow_write_operations is true. ```bash git clone https://github.com/bvenkata/legacy2mcp.git && cd legacy2mcp ``` ```bash pip install -e ".[dev]" ``` ```bash python examples/soap/mock_orders_service.py & # http://127.0.0.1:8124/orders ``` -------------------------------- ### Install development dependencies and run tests Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Install the package with development dependencies and run the test suite. Tests use an in-process mock SOAP service and SQLite-backed stand-in for the DB adapter, requiring no network or real database instances. ```bash pip install -e ".[dev]" pytest tests/ -v ``` -------------------------------- ### Install and initialize legacy2mcp for REST, WSDL, and webpage targets Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Install the package and run one of three init commands against live public demo targets. Each command writes config.yaml, opens a local test-chat page, and prints a connection snippet for AI clients. No API key is required. ```bash pip install legacy2mcp ``` ```bash # REST API -- tries OpenAPI/Swagger discovery legacy2mcp init --rest-url "https://petstore3.swagger.io/api/v3" ``` ```bash # WSDL / SOAP service -- zeep introspects it live, no scan needed legacy2mcp init --wsdl-url "http://www.dneonline.com/calculator.asmx?WSDL" ``` ```bash # A website with no API docs at all -- crawls it for forms/content legacy2mcp init --webpage-url "https://legacy2mcp.com/" ``` -------------------------------- ### Install legacy2mcp with pip Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Install the package. The full install with the [ai] extra is recommended, though the core package is identical and scan-only ready. AI-assisted init requires an API key at runtime. ```bash # Full install (recommended) pip install "legacy2mcp[ai]" # Or the identical, scan-only-ready core -- AI-assisted `legacy2mcp init` # needs no extra package either way, just an API key at runtime; `[ai]` # above installs nothing extra today, it's just a stable, familiar name pip install legacy2mcp # or: uv tool install legacy2mcp · pipx install legacy2mcp ``` -------------------------------- ### Initialize config for REST API Source: https://github.com/bvenkata/legacy2mcp/blob/main/examples/README.md Use legacy2mcp init to generate a starting config for a REST API, then inspect it. The init command can also target WSDL URLs, GitHub repos, or local paths. ```bash legacy2mcp init --rest-url https://api.example.com --out config.yaml # or: --wsdl-url ... / --github-url ... --scan-only (skip AI assist) # review config.yaml -- especially base_url, auth, and any TODOs it left legacy2mcp inspect --config config.yaml ``` -------------------------------- ### Install VHS and record demo Source: https://github.com/bvenkata/legacy2mcp/blob/main/demo/README.md Install VHS (pulls in ttyd and ffmpeg) and record the demo as GIF and MP4 from the repo root. Requires the package to be importable, e.g., via `pip install -e ".[dev]"` or the repo's ./.venv. ```bash brew install vhs # one-time (pulls in ttyd + ffmpeg) # from the repo root, with the package importable pip install -e ".[dev]" # or rely on this repo's ./.venv vhs demo/demo.tape ``` -------------------------------- ### Initialize or demo from an existing contract Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Use these commands to build a config or start a demo server from an existing contract.yaml. init --from-contract generates config.yaml; demo --from-contract starts a server, saves chat.html, and prints client JSON. demo requires the command to keep running (Ctrl+C to stop) for the page to work. ```bash legacy2mcp init --from-contract contract.yaml --out config.yaml ``` ```bash legacy2mcp demo --from-contract contract.yaml ``` -------------------------------- ### Install and run legacy2mcp CLI commands Source: https://github.com/bvenkata/legacy2mcp/blob/main/llms.txt Install the legacy2mcp package via pip, then use the init, inspect, and run commands to generate a config from a REST URL (or WSDL/GitHub URL), review the generated tools, and start the MCP server over stdio. ```bash pip install legacy2mcp legacy2mcp init --rest-url "https://your-api.example.com" --out config.yaml # or --wsdl-url / --github-url legacy2mcp inspect --config config.yaml # review the generated tools legacy2mcp run --config config.yaml # start the MCP server (stdio) ``` -------------------------------- ### Inspect and run the generated MCP server Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md After reviewing the generated config, inspect the tools it exposes and then start the MCP server. The inspect command is for review; run starts the server. ```bash legacy2mcp inspect --config config.yaml # review the generated tools ``` ```bash legacy2mcp run --config config.yaml # start the MCP server ``` -------------------------------- ### Install legacy2mcp with database adapter Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Install the package with the PostgreSQL adapter. Replace 'db-postgres' with 'db-mssql' or 'db-oracle' for other databases. ```bash pip install "legacy2mcp[db-postgres]" # or db-mssql / db-oracle ``` -------------------------------- ### Install legacy2mcp Source: https://github.com/bvenkata/legacy2mcp/blob/main/skill/legacy2mcp/SKILL.md Install the legacy2mcp package via pip. Confirm the installation with `legacy2mcp --help` or `pip show legacy2mcp` if there is any doubt. ```bash pip install legacy2mcp ``` -------------------------------- ### Run demo without recording Source: https://github.com/bvenkata/legacy2mcp/blob/main/demo/README.md Starts the bundled mock SOAP service, runs the same commands as the recorded demo, and cleans up afterward. ```bash ./demo/demo.sh ``` -------------------------------- ### Install and run legacy2mcp with uvx Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/registry-submissions.md Command to install and run legacy2mcp using uvx with a config file. Used in registry and awesome-list submissions. ```bash uvx legacy2mcp run --config config.yaml ``` -------------------------------- ### Print legacy2mcp version Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Displays the installed legacy2mcp version. ```bash legacy2mcp --version ``` -------------------------------- ### Inspect WSDL by URL without cloning Source: https://github.com/bvenkata/legacy2mcp/blob/main/examples/README.md Download the public WSDL config and inspect it directly from the raw GitHub URL. Tools can be listed but not called because the WSDL's bound address is local. ```bash curl -O https://raw.githubusercontent.com/bvenkata/legacy2mcp/main/examples/soap/config.orders.public-wsdl.yaml legacy2mcp inspect --config config.orders.public-wsdl.yaml ``` -------------------------------- ### Install legacy2mcp skill for AI coding agents Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Run this command to write legacy2mcp instructions into the current repo's agent context files, including a Claude Code slash command, a Cursor rule, and sections in AGENTS.md, GEMINI.md, and .github/copilot-instructions.md. It is idempotent and safe to re-run after upgrades. ```bash legacy2mcp install-skill ``` -------------------------------- ### Inspect discovered tools Source: https://github.com/bvenkata/legacy2mcp/blob/main/AGENTS.md See the real discovered tools before trusting anything; no server is started. ```bash legacy2mcp inspect --config config.yaml ``` -------------------------------- ### Record with asciinema Source: https://github.com/bvenkata/legacy2mcp/blob/main/demo/README.md Alternative to VHS: record the demo as a .cast file and optionally upload it to asciinema for web playback. Requires asciinema to be installed. ```bash brew install asciinema asciinema rec demo/legacy2mcp.cast -c './demo/demo.sh' asciinema upload demo/legacy2mcp.cast # or embed the .cast with asciinema-player ``` -------------------------------- ### Run MCP server Source: https://github.com/bvenkata/legacy2mcp/blob/main/AGENTS.md Start the MCP server. An MCP client normally launches this itself; running by hand just blocks waiting for a client over stdio. ```bash legacy2mcp run --config config.yaml ``` -------------------------------- ### Set password and run legacy2mcp inspect/run commands Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Exports the SERVICE_PASSWORD environment variable, then reviews the generated tools with legacy2mcp inspect and starts the MCP server (stdio) with legacy2mcp run. Both commands use the same config.yaml file. ```bash export SERVICE_PASSWORD=... legacy2mcp inspect --config config.yaml # review the generated tools legacy2mcp run --config config.yaml # start the MCP server (stdio) ``` -------------------------------- ### Scan GitHub repo or local codebase Source: https://github.com/bvenkata/legacy2mcp/blob/main/AGENTS.md Scan a GitHub repo or local codebase for a SOAP client, ORM model, or routes. Use --scan-only to avoid starting a server. ```bash legacy2mcp init --github-url https://github.com/you/your-api --scan-only --out config.yaml ``` ```bash legacy2mcp init --local-path ./path/to/repo --scan-only --out config.yaml ``` -------------------------------- ### Demo config or contract in chat page Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Tries a config or contract in a chat page immediately, without a separate init step. ```bash legacy2mcp demo --from-contract contract.yaml ``` ```bash legacy2mcp demo --config config.yaml ``` -------------------------------- ### Download Petstore REST config Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/clients.md Downloads the public Swagger Petstore config for a zero-setup demo. No credentials needed; provides four read tools and hides delete_pet because it is a write. ```bash curl -O https://raw.githubusercontent.com/bvenkata/legacy2mcp/main/examples/rest/config.petstore.yaml ``` -------------------------------- ### Run legacy2mcp init non-interactively with --github-url and --scan-only Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Non-interactive init for a GitHub repo or local path, using static analysis only (skips the optional LLM refinement). Writes the generated config to config.yaml. ```bash legacy2mcp init --github-url https://github.com/you/your-api --scan-only --out config.yaml ``` -------------------------------- ### Initialize from live WSDL Source: https://github.com/bvenkata/legacy2mcp/blob/main/AGENTS.md Point at a live WSDL; no API key needed, zeep introspects it live. ```bash legacy2mcp init --wsdl-url "https://service.example.com/Legacy?wsdl" --out config.yaml ``` -------------------------------- ### Initialize from website with no API docs Source: https://github.com/bvenkata/legacy2mcp/blob/main/AGENTS.md Crawls the site for forms/content; every operation lands confidence=low/needs_review=true, so review before trusting. ```bash legacy2mcp init --webpage-url "https://your-legacy-app.example.com/some-page" --out config.yaml ``` -------------------------------- ### Initialize from live REST API Source: https://github.com/bvenkata/legacy2mcp/blob/main/AGENTS.md Point at a live REST API; tries OpenAPI/Swagger discovery, no API key needed. ```bash legacy2mcp init --rest-url "https://api.example.com" --out config.yaml ``` -------------------------------- ### Generate config with legacy2mcp init Source: https://github.com/bvenkata/legacy2mcp/blob/main/skill/legacy2mcp/SKILL.md Generate the configuration file `config.yaml` and a human-readable `config.html` report. The exact command depends on the source type; see `references/sources.md` for the full command per source type. ```bash legacy2mcp init --out config.yaml ``` -------------------------------- ### Configure database adapter in config.yaml Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Define a database adapter with tables and queries. The LLM can only call select_ / insert_
for listed tables, or query_ tools with SQL you wrote. Columns are introspected from the live schema at startup. ```yaml # config.yaml adapters: - id: orders type: db config: dialect: postgres # postgres | mssql | oracle dsn_env: "ORDERS_DB_DSN" # connection string, read from the environment allow_write_operations: false # insert_
/ write: true queries stay hidden tables: - name: orders operations: [select] columns: [id, status, total, created_at] # column allowlist filterable_columns: [status] # equality filters on select_orders max_rows: 200 queries: - name: orders_by_status_since sql: "SELECT id, status, total FROM orders WHERE status = :status AND created_at >= :since" params: - { name: status, type: string, required: true } - { name: since, type: string, required: true } ``` -------------------------------- ### Set DSN and inspect generated tools Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Export the database connection string and run the inspect command to review the generated tools. ```bash export ORDERS_DB_DSN=... legacy2mcp inspect --config config.yaml # review the generated tools ``` -------------------------------- ### Generate config from website with no API docs Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Crawls a website to generate a config when no API documentation exists. ```bash legacy2mcp init --webpage-url "https://your-legacy-app.example.com" --out config.yaml ``` -------------------------------- ### Show one exact tool name Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Displays only the specified tool name. ```bash legacy2mcp inspect --config config.yaml --tool legacy_get_order ``` -------------------------------- ### Initialize from GitHub repo or local codebase with legacy2mcp init --scan-only Source: https://github.com/bvenkata/legacy2mcp/blob/main/skill/legacy2mcp/references/sources.md Clones (for `--github-url`) or reads (for `--local-path`) the repo and statically scans Python source with `ast`; nothing is executed. Detects `zeep.Client(...)`, SQLAlchemy/Flask-SQLAlchemy models, or Flask/FastAPI route decorators to pick the `soap`/`db`/`rest` adapter. `--scan-only` skips AI assistance and needs no API key. Without it, pass `--llm-api-key-env` naming an env var with an OpenAI-compatible key; only ambiguous fragments are sent to the LLM. For private repos, use `--github-token-env` to name an env var holding a GitHub token, never a raw token. ```bash legacy2mcp init --github-url https://github.com/you/your-api --scan-only --out config.yaml # or, for an already-checked-out repo: legacy2mcp init --local-path ./path/to/repo --scan-only --out config.yaml ``` -------------------------------- ### Run legacy2mcp with uvx Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/clients.md Command to launch the legacy2mcp stdio MCP server. Use an absolute path for --config because clients launch the server from their own working directory; relative paths usually fail unless the config is project-scoped. ```bash uvx legacy2mcp run --config /absolute/path/to/config.yaml ``` -------------------------------- ### awesome-mcp-servers entry for legacy2mcp Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/registry-submissions.md Markdown entry for awesome-mcp-servers lists, matching the live README format. Includes link and description. ```markdown - [bvenkata/legacy2mcp](https://github.com/bvenkata/legacy2mcp) - Turn a legacy SOAP/WSDL service, database, or REST API into a safe, typed, audit-logged MCP server. Schema-validated inputs, read-only by default. ``` -------------------------------- ### Discover legacy interfaces with legacy2mcp discover Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Use these commands to generate a Legacy Interface Contract (contract.yaml) from a Postman collection, OpenAPI spec, HAR capture, stored-procedure catalog, or queue configuration. Each command writes a contract with confidence levels and needs_review flags. In a real terminal, discover also writes config.yaml, opens a test-chat page, and prints MCP client JSON unless --no-chat or --no-write-config is passed. ```bash legacy2mcp discover --postman-file my-collection.json --out contract.yaml ``` ```bash legacy2mcp discover --openapi-file spec.yaml --out contract.yaml ``` ```bash legacy2mcp discover --har-file traffic.har --out contract.yaml ``` ```bash legacy2mcp discover --stored-procs --db-dialect postgres --db-dsn-env LEGACY_DB_DSN --out contract.yaml ``` ```bash legacy2mcp discover --queue-config queues.yaml --out contract.yaml ``` -------------------------------- ### Generate config with AI-assisted refinement Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Uses AI to refine ambiguous parameter types and read-vs-write decisions. ```bash legacy2mcp init --github-url https://github.com/you/your-api --llm-api-key-env OPENAI_API_KEY --out config.yaml ``` -------------------------------- ### MCP client configuration for legacy2mcp Source: https://github.com/bvenkata/legacy2mcp/blob/main/skill/legacy2mcp/SKILL.md Add an entry to the client's MCP server config (e.g., Claude Desktop, Cursor, Claude Code, VS Code). Always use an absolute path to `config.yaml` because the client may launch the process from a different working directory. ```json { "mcpServers": { "": { "command": "legacy2mcp", "args": ["run", "--config", "/absolute/path/to/config.yaml"] } } } ``` -------------------------------- ### CI/CD WSDL drift check with legacy2mcp inspect Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Use in CI/CD to verify the WSDL still generates valid MCP tools. Loads config, contacts WSDL, builds schemas, and exits non-zero on failure. Exit code 1 indicates config/source/runtime errors; exit code 2 indicates invalid command-line arguments. ```yaml - name: Check the WSDL still generates valid MCP tools env: SERVICE_PASSWORD: ${{ secrets.SERVICE_PASSWORD }} run: | pip install legacy2mcp legacy2mcp inspect --config config/legacy.yaml > tools.json git diff --exit-code --no-index tools/legacy.snapshot.json tools.json # optional: pin the contract ``` -------------------------------- ### Cursor MCP Server Configuration Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/clients.md Configure the legacy2mcp MCP server in Cursor by creating a .cursor/mcp.json file in your project or ~/.cursor/mcp.json for all projects. ```json { "mcpServers": { "legacy2mcp": { "command": "uvx", "args": ["legacy2mcp", "run", "--config", "/absolute/path/to/config.yaml"] } } } ``` -------------------------------- ### Verify published package and registry entry Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/releasing.md Check the published PyPI version and search the MCP Registry for the server. Use these commands after the release workflow completes. ```bash pip index versions legacy2mcp curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.bvenkata/legacy2mcp" ``` -------------------------------- ### Print tool list as JSON Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Outputs the tool list as JSON for scripting or CI diff checks. ```bash legacy2mcp inspect --config config.yaml > tools.json ``` -------------------------------- ### Tag and push a release Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/releasing.md After bumping the version in pyproject.toml and server.json, create a v* tag and push it to trigger the release workflow. The workflow publishes to PyPI and the MCP Registry. ```bash git tag v0.1.0 git push origin v0.1.0 ``` -------------------------------- ### VS Code MCP Server Configuration Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/clients.md Configure the legacy2mcp MCP server in VS Code by creating a .vscode/mcp.json file with the server definition. ```json { "servers": { "legacy2mcp": { "type": "stdio", "command": "uvx", "args": ["legacy2mcp", "run", "--config", "/absolute/path/to/config.yaml"] } } } ``` -------------------------------- ### MCP client configuration for legacy2mcp Source: https://github.com/bvenkata/legacy2mcp/blob/main/AGENTS.md Wire the generated server into an MCP client by adding this to its config. Use an absolute path to config.yaml. ```json {"mcpServers": {"": {"command": "legacy2mcp", "args": ["run", "--config", "/absolute/path/to/config.yaml"]}}} ``` -------------------------------- ### REST adapter configuration in config.yaml Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Explicit endpoint configuration for the REST adapter. Requires a base URL, optional bearer token authentication via environment variable, and a list of endpoints. Write operations are hidden unless allow_write_operations is true. Review write flags before use against real backends. ```yaml # config.yaml adapters: - id: orders type: rest config: base_url: "https://api.example.com" auth: type: bearer token_env: "ORDERS_API_TOKEN" allow_write_operations: false endpoints: - name: get_order method: GET path: "/orders/{order_id}" params: - { name: order_id, location: path, type: integer, required: true } - name: create_order method: POST path: "/orders" write: true # stays hidden unless allow_write_operations: true params: - { name: total, location: body, type: number, required: true } ``` -------------------------------- ### Claude Desktop MCP Server Configuration Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/clients.md Configure the legacy2mcp MCP server in Claude Desktop's config file. Edit the JSON file at the specified path and restart Claude Desktop after saving. ```json { "mcpServers": { "legacy2mcp": { "command": "uvx", "args": ["legacy2mcp", "run", "--config", "/absolute/path/to/config.yaml"], "env": { "SERVICE_PASSWORD": "set-if-your-config-uses-password_env" } } } } ``` -------------------------------- ### Manual publishing fallback Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/releasing.md Fallback commands to publish manually when the automated workflow is not used. Requires a PyPI token for twine and an interactive device flow for mcp-publisher. ```bash python -m build twine upload dist/* # needs a PyPI token mcp-publisher login github # interactive device flow mcp-publisher publish ``` -------------------------------- ### Tag a release Source: https://github.com/bvenkata/legacy2mcp/blob/main/ci/README.md Creates and pushes a tag to trigger the release workflow. The version in pyproject.toml and server.json must match the tag. ```bash # bump version in pyproject.toml AND server.json (both must match the tag) git tag v0.1.1 && git push origin v0.1.1 ``` -------------------------------- ### Enable release workflow Source: https://github.com/bvenkata/legacy2mcp/blob/main/ci/README.md Moves the staged release workflow into place and commits it. Run from a checkout with push rights. ```bash git mv ci/github-actions-release.yml .github/workflows/release.yml git commit -m "Enable release workflow" git push ``` -------------------------------- ### Discover contract from Postman collection Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Reviews a source (Postman collection, OpenAPI file, HAR capture, stored-procedure catalog, or queue description) before generating anything. ```bash legacy2mcp discover --postman-file my-collection.json --out contract.yaml ``` -------------------------------- ### SOAP adapter configuration in config.yaml Source: https://github.com/bvenkata/legacy2mcp/blob/main/README.md Defines a SOAP adapter for a legacy WSDL service. The password is read from the environment variable SERVICE_PASSWORD, never stored in the file. Write operations are hidden by default unless allow_write_operations is set to true; include_operations restricts exposed operations. Audit logging is enabled with a specified log path. ```yaml # config.yaml server: name: my-legacy-mcp adapters: - id: legacy type: soap config: wsdl_url: "https://service.example.com/LegacyService?wsdl" auth: type: basic username: "svc-account" password_env: "SERVICE_PASSWORD" # value read from the environment, never the file allow_write_operations: false # Create*/Update*/Delete*/… stay hidden include_operations: ["GetRecord", "GetRecordDetails", "SearchRecords"] security: audit: enabled: true path: "./legacy-mcp-audit.log" ``` -------------------------------- ### Hand-written db adapter config with allowlisted tables Source: https://github.com/bvenkata/legacy2mcp/blob/main/skill/legacy2mcp/references/sources.md Use when no ORM models are available to scan. The table list is hand-written, but columns are introspected live from the real schema at runtime. `dsn_env` must reference an environment variable holding the connection string; never write a real DSN in YAML. `insert` operations require both `allow_write_operations: true` and explicit listing per table. ```yaml adapters: - id: legacy type: db config: dialect: postgres # or mssql, oracle dsn_env: LEGACY_DB_DSN # set this env var to the real connection string allow_write_operations: false tables: - name: orders operations: [select] ``` -------------------------------- ### MCP Inspector Validation Command Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/clients.md Run the MCP Inspector to validate the legacy2mcp server configuration. Opens a local web UI to connect, confirm tools, and run a read-only tool, checking the audit log. ```bash npx @modelcontextprotocol/inspector uvx legacy2mcp run --config /absolute/path/to/config.yaml ``` -------------------------------- ### Claude Code MCP Server Registration Source: https://github.com/bvenkata/legacy2mcp/blob/main/docs/clients.md Register the legacy2mcp MCP server with Claude Code using the CLI. Pass secrets with -e and add --scope project to write a shared .mcp.json for your team. ```bash claude mcp add legacy2mcp -- uvx legacy2mcp run --config /absolute/path/to/config.yaml ```