Skip to main content

MCP server for reading and writing .env variables (email/SMTP and custom keys)

Project description

nlp2env

AI Cost Tracking

PyPI Version Python License AI Cost Human Time Model

  • 🤖 LLM usage: $0.4415 (2 commits)
  • 👤 Human dev: ~$300 (3.0h @ $100/h, 30min dedup)

Generated on 2026-06-08 using openrouter/qwen/qwen3-coder-next


MCP server do odczytu i zapisu pliku .env — w tym profilu SMTP/email dla workflow send_email (nlp2dsl-worker).

Instalacja

cd ~/github/semcod/nlp2env
pip install -e ".[mcp]"

Uruchomienie MCP

export NLP2ENV_ENV_FILE=~/github/wronai/todomat/.env   # opcjonalnie
nlp2env-mcp

Narzędzia MCP

Tool Opis
nlp2env_interfaces Metadane, ścieżka .env, profile
nlp2env_list Lista kluczy (sekrety zamaskowane)
nlp2env_get Odczyt kluczy (comma-separated)
nlp2env_set Zapis z JSON {"SMTP_HOST":"..."}
nlp2env_set_email Zapis profilu SMTP (host, user, password, …)
nlp2env_apply_text Parsuj bloki KEY=value z tekstu
nlp2env_backup Kopia .env.nlp2env/backups/
nlp2env_email_status Czy SMTP jest kompletny

Profil email (nlp2dsl)

Klucze zgodne z nlp2dsl worker:

SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_TLS, SMTP_FROM, SMTP_TIMEOUT

Po zapisie zrestartuj worker:

docker compose -f ~/github/wronai/nlp2dsl/docker-compose.yml restart worker

Cursor (mcp.json)

{
  "mcpServers": {
    "nlp2env": {
      "command": "nlp2env-mcp",
      "env": {
        "NLP2ENV_ENV_FILE": "/home/tom/github/wronai/todomat/.env"
      }
    }
  }
}

uri2env

Pakiet uri2env (w src/uri2env/) mapuje URI env:// na plik .env — używany przez nlp2uri do adresowania konfiguracji:

pip install -e ".[mcp,nlp2uri]"
uri2env materialize --uri 'env://nlp2env/smtp?dest=./.env'

W nlp2uri: resolve_env()env://…materialize_env().

Testy

pip install -e ".[dev]"
pytest
make examples              # szybkie e2e
make examples-multilang    # 26 promptów LLM/Ollama (16 języków)
make examples-all          # oba

prompts-multilang.txt (examples/write/smtp-email/) — 26 wielojęzycznych promptów NL testujących ścieżkę LLM → MCP → .env; uruchamiane przez make examples-multilang. Opis: examples/write/smtp-email/README.md.

Przykłady NL → .env (Docker + README): examples/README.md.

License

Licensed under Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nlp2env-0.1.3.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nlp2env-0.1.3-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file nlp2env-0.1.3.tar.gz.

File metadata

  • Download URL: nlp2env-0.1.3.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for nlp2env-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b5b7335379654ffe56c91640bc22dd7a183be48e868d89e874a40544cfca2969
MD5 6d96eb2b6247244fd42fc8b341a3ac14
BLAKE2b-256 9a51806d8b868878dcd67b7c327f5e973f9cc3fdca3c139cab01223b6f75c020

See more details on using hashes here.

File details

Details for the file nlp2env-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: nlp2env-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for nlp2env-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6762235bd73fb3eabd2ec0b577e6bb2fca32f79eeba0c303a6fcd21d807b42dc
MD5 1ba240fbd8ac3c6f7bac075ec8b811d8
BLAKE2b-256 efecac8c4b86c1b5af63795842f908888a579364d12a3ac847ee7a752c21ab00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page