Skip to content

feat: Add --api-key CLI flag (extends PR #37) #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

zboyles
Copy link

@zboyles zboyles commented Jun 3, 2025

This PR adds the --api-key CLI flag as an optional alternative to the TAVILY_API_KEY environment variable.

Justification

A lot of new clients are springing up and this minor update allows tavily-mcp support with those which don't support passing environmental variables or are more strict about how to add MCP Servers.

Changes

  • Added --api-key CLI argument support for both stdout and streamable HTTP/SSE modes
  • Updated README.md with usage examples and CLI options documentation

Context

This builds on PR #37 which adds Streamable HTTP and SSE support, adding the missing feature to pass the API key via command line argument.

ycjcl868 and others added 5 commits May 28, 2025 00:05
- Add optional --api-key flag as alternative to TAVILY_API_KEY env var
- Works in both stdio and SSE/HTTP server modes
- Update README with usage examples and CLI options documentation
@zboyles
Copy link
Author

zboyles commented Jun 3, 2025

@ycjcl868 - I was planning to create a branch off main but was happy to see your PR #37. I've wanted streamable HTTP with this server and you already had the work done, thanks!

@ycjcl868
Copy link

ycjcl868 commented Jun 4, 2025

Thank you very much. Passing the API key through the header at runtime would greatly facilitate tavily-mcp becoming a public foundational service!

Ref: github/github-mcp-server#472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants