* fix(mcp): support NODE_EXTRA_CA_CERTS for enterprise MITM proxies
When NODE_EXTRA_CA_CERTS is set, reads the CA certificate file and
injects it into undici's global dispatcher. This fixes fetch failures
behind enterprise transparent SSL intercept proxies (Zscaler, etc.)
where the default TLS context does not trust the corporate CA.
The CA certs are also passed through when an explicit HTTPS_PROXY is
configured, so both proxy modes work with custom certificates.
Fixes#2268
This contribution was developed with AI assistance (Claude Code).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: add changeset for NODE_EXTRA_CA_CERTS support
* fix(mcp): preserve default CAs with NODE_EXTRA_CA_CERTS
* chore: add changeset for CA trust fix
* chore: remove superseded changeset
* fix(mcp): lint test files with test tsconfig
* fix(mcp): use explicit test file path
* fix(mcp): support older Node TLS CA APIs
* test(mcp): run certificate test with vitest
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* docs: add CLAUDE.md with Context7 integration guidelines
Add documentation for Claude Code integration including:
- Quick setup instructions
- Usage examples with popular libraries
- Auto-trigger rules for NestJS, Prisma, SvelteKit, etc.
- Best practices for library documentation queries
Closes#2272
* feat(mcp): add --version/-v flag to CLI
Add version flag support using Commander.js .version() method.
Uses existing SERVER_VERSION constant from package.json.
Fixes#2284
* chore: remove unrelated CLAUDE.md from PR
* chore: add changeset for mcp version flag
---------
Co-authored-by: liwenjun-dev <liwenjun.dev@gmail.com>
Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com>
* feat: enhance Context7 server configuration with website URL, description, and detailed usage instructions
* run format
* add changeset
* feat: align MCP server instructions with eval-proven trigger language
Based on invocation routing benchmarks (60 queries, clean + mid-session):
- Named specific libraries to counter confidence skip
- Added 'even when you think you know the answer' override
- Added 'prefer over web search' to catch WebSearch fallback
- Unified trigger paragraph to match client rule format
- Added explicit 'do not use for' negatives
---------
Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com>
* fix(mcp): support NODE_EXTRA_CA_CERTS for enterprise MITM proxies
When NODE_EXTRA_CA_CERTS is set, reads the CA certificate file and
injects it into undici's global dispatcher. This fixes fetch failures
behind enterprise transparent SSL intercept proxies (Zscaler, etc.)
where the default TLS context does not trust the corporate CA.
The CA certs are also passed through when an explicit HTTPS_PROXY is
configured, so both proxy modes work with custom certificates.
Fixes#2268
This contribution was developed with AI assistance (Claude Code).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: add changeset for NODE_EXTRA_CA_CERTS support
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com>
* fix: reject GET requests on MCP endpoints to eliminate idle SSE timeouts
Stateless MCP server does not send server-initiated notifications, so
GET SSE streams sit idle until NGINX proxy_read_timeout (3600s) kills them.
Humio data shows ~4M GET timeouts vs 69 actual POST tool calls over 2 days,
accounting for 99.997% of all 5XX errors.
Returning 405 is spec-compliant per MCP StreamableHTTP (2025-03-26).
* chore: add changeset for MCP GET rejection fix
* refactor: move GET rejection into handleMcpRequest and fix error code
- Consolidate GET check into handleMcpRequest to avoid duplication
- Fix JSON-RPC error code from -32601 (method not found) to -32000 (server error)
* feat: context7 vercel ai sdk tools package
* ci: remove master target condition on test action
* ci: manual actions trigger for test
* ci: always run all tests
* update tests and imports
* ci: typecheck command
* fix: tests
* docs: add readme
* update folder structure and tool descriptions
* tests: fix test env vars
* ci: bump pnpm version
* update ai sdk step count api
* Add stopWhen to docstring examples
* update tests
* update prompt name
* update context7 agent name
* update tool description var to description
* make context7agent config optional
* ci: add changeset
* make context7-sdk peer deps
* update pnpm-lock.yaml
* update package name to @upstash/context7-tools-ai-sdk
* remove check workflow
* update pnpm lock
* make the agent a class instead of function
* replace all name instances
* add agent generate test
* simplify agent config
* fix refs