secrets command helps you set up and manage API keys required for MCPKit to function.
Usage
Subcommands
Run the interactive setup wizard to configure or update your API keys.
Display your current configuration (without revealing full API keys).
Examples
Initial Setup
Run the interactive setup wizard:-
Browserbase API Key
-
LLM Provider
-
LLM API Key
Your secrets are now configured and saved to
~/.mcpkit/secrets.jsonView Current Configuration
Check what’s currently configured:Configuration Details
Storage Location
Your secrets are stored in a JSON file at:- macOS/Linux
- Windows
Never commit
secrets.json to version control. This file contains sensitive
API keys.File Format
The secrets file has this structure:Supported LLM Providers
MCPKit supports multiple LLM providers for AI-powered action discovery:Google Gemini (Recommended)
Google Gemini
Best balance of speed, quality, and cost. Free tier available.
gemini-2.0-flash-exp(recommended)gemini-1.5-progemini-1.5-flash
OpenAI
OpenAI
High quality but more expensive. Good for complex websites.
gpt-4ogpt-4o-minigpt-4-turbo
Anthropic
Anthropic
Excellent reasoning capabilities for complex page analysis.
claude-3-5-sonnet-20241022claude-3-opus-20240229
Azure OpenAI
Azure OpenAI
Enterprise option with compliance and data residency.
Browserbase Configuration
MCPKit uses Stagehand and Browserbase for serverless browser automation.Get a Browserbase API Key
1
Sign up
Create a free account at browserbase.com
2
Navigate to settings
Go to your dashboard and click on Settings
3
Copy API key
Find your API key in the API Keys section
4
Configure mcpkit
Run
mcpkit secrets and paste your API key when promptedBrowserbase Pricing
- Free tier: 100 hours/month of browser time
- Perfect for development and testing
- Upgrade for production use
Updating Secrets
To update your configuration, simply run the setup wizard again:Manual Configuration
You can also manually edit the secrets file:- macOS/Linux
- Windows
Make sure the JSON is valid after manual edits, or MCPKit may fail to read the
configuration.
Environment Variables
You can also configure secrets via environment variables (useful for CI/CD):Troubleshooting
Invalid API Key
Invalid API Key
If you get “Invalid API key” errors:
- Verify the key - Make sure you copied it correctly
- Check provider - Ensure you’re using the right provider
- Test the key directly with the provider’s API
- Regenerate - Create a new API key if needed
Secrets File Not Found
Secrets File Not Found
If MCPKit can’t find your secrets:
-
Run setup again:
-
Check file permissions:
-
Create directory manually:
Rate Limits or Quota Errors
Rate Limits or Quota Errors
If you hit rate limits:
- Check your usage on the provider’s dashboard
- Upgrade your plan if needed
- Switch providers temporarily:
JSON Parse Error
JSON Parse Error
If your secrets file is corrupted:
-
Backup the file:
-
Delete and recreate:
-
Validate JSON:
Security Best Practices
Protect Your API Keys
Your API keys provide access to paid services. Follow these practices to keep
them secure:
- ✅ Never commit secrets files to git
- ✅ Use environment variables in CI/CD
- ✅ Rotate keys regularly
- ✅ Use separate keys for development and production
- ✅ Set spending limits on provider dashboards
- ❌ Don’t share secrets files
- ❌ Don’t expose keys in logs or screenshots
- ❌ Don’t use production keys in public repositories