Skip to content

Configuration

Logging

The server writes logs to:

~/.mcp-api-testing/logs/mcp-api-test.log

Logs are useful for debugging failed requests or tracing tool calls. The log file is automatically created on first run.

Note

The log directory is excluded from the source distribution and should not be committed to version control.

Environment variables

The server loads a .env file via python-dotenv on startup. This is useful for storing API keys, base URLs, and other configuration without hardcoding them in prompts.

Create a .env file in your project root:

API_BASE_URL=https://api.example.com
API_KEY=your-api-key-here

These variables are available to the server at runtime and can be referenced in your API tests.

Warning

Never commit .env files containing secrets to version control. Add .env to your .gitignore.