Commit Graph

798 Commits

Author SHA1 Message Date
github-actions[bot] 04b70c419f chore(release): version packages (#2522)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@upstash/context7-mcp@2.2.2
2026-04-29 00:18:11 +03:00
Fahreddin Özcan ff6c1bef4b chore(mcp): remove researchMode from query-docs tool params (#2524)
Hide the `researchMode` parameter from the MCP tool's input schema so
agents stop invoking it. The upstream `/api/v2/context` route still
accepts and serves the parameter; only the MCP-layer surface is
removed. Reasoning: several MCP clients hit per-request timeouts (60s
defaults in the SDK and in fetch-wrappers) on long-running research
calls in ways that can't all be solved server-side. Until the timeout
story is reliable across clients, agents shouldn't be able to call it
via MCP.

Updates:
- Drop the `researchMode` field from the `query-docs` input schema.
- Drop the workflow line in the tool description that referenced it.
- Stop forwarding `researchMode` to fetchLibraryContext; the field is
  optional on ContextRequest, so omitting it is equivalent to false.
2026-04-28 14:15:09 -07:00
Enes Gules 8274bd05ea feat(annotations): add missing tool annotations and enhance hints (#2521) 2026-04-28 16:38:40 +03:00
github-actions[bot] b4bf49f032 chore(release): version packages (#2518)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@upstash/context7-mcp@2.2.1
2026-04-27 17:58:50 +03:00
Enes Gules 1b0c211e66 feat(openai-apps): add OpenAI Apps SDK domain verification endpoint (#2517) 2026-04-27 17:52:40 +03:00
Enes Gules 8bf305b017 feat(metrics): add endpoint for retrieving library usage metrics (#2511) (#2516) 2026-04-27 17:34:13 +03:00
Enes Gules d4487448a3 feat(metrics): add endpoint for retrieving library usage metrics (#2511) 2026-04-27 13:16:45 +03:00
github-actions[bot] 5d284f2154 chore(release): version packages (#2489)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@upstash/context7-mcp@2.2.0 ctx7@0.4.0
2026-04-24 20:49:48 +03:00
Enes Akar 17b864f23f expose research mode through MCP and CLI (#2498)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: enesgules <abdullah.enes.gules@gmail.com>
2026-04-24 20:48:05 +03:00
Shannon Rumsey 4ed5db533e add author to power (#2497) 2026-04-22 10:55:41 -07:00
Shannon Rumsey 0b190c1b8d CTX7-1559: Update section titles and data safety content (#2491) 2026-04-22 00:54:31 +03:00
Fahreddin Özcan f056b14cde CTX7-1542: add uninstall command for Context7 setup (#2473)
* CTX7-1542: add uninstall command for Context7 setup

* CTX7-1542: refine uninstall mode flags

* CTX7-1542: rename uninstall command to remove

* CTX7-1542: rename remove command files and add tests

* CTX7-1542: show detected agents in remove prompt

* CTX7-1542: tighten remove detection and cleanup coverage

* CTX7-1542: add remove command changeset
2026-04-21 12:41:32 +03:00
Fahreddin Özcan 4feee1521e CTX7-1544: add CLI update notifications and upgrade command (#2477)
* CTX7-1544: add CLI update notifications and upgrade command

* CTX7-1544: stabilize upgrade output tests
2026-04-21 12:41:19 +03:00
Shannon Rumsey 051d4602f2 CTX7-1554: Update out-of-date security docs (#2487) 2026-04-21 10:12:35 +03:00
Elif Nur Deniz 648e5a2e06 chore: library refreshing docs (#2482) 2026-04-20 07:23:17 -07:00
Fahreddin Özcan a1a935cbe7 Update Kiro install config and docs (#2474)
* docs: update Kiro install config

* docs: update Kiro deeplink
2026-04-17 14:23:16 +03:00
Fahreddin Özcan abf293eddc Add Hermes Agent guide to MCP clients docs (#2462)
* Add Hermes Agent MCP guide

* Move Hermes guide after Gemini CLI
2026-04-17 11:33:36 +03:00
Shannon Rumsey 0627b71073 CTX7-1531: Create kiro power (#2456)
* add kiro power

---------

Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com>
2026-04-14 09:44:32 -07:00
github-actions[bot] c8506690ce chore(release): version packages (#2453)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ctx7@0.3.13
2026-04-14 10:51:17 +03:00
Astrazenith 3f6e310630 fix: skill installation path check compatibility for Windows (#2441)
* fix(cli): support Windows backslash in skill installation path check

* chore(cli): add changeset for Windows path check fix

* style(cli): format Windows path guard

---------

Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com>
2026-04-13 14:12:14 +03:00
github-actions[bot] c31528d0cd chore(release): version packages (#2433) @upstash/context7-mcp@2.1.8 ctx7@0.3.12 2026-04-13 03:20:32 +03:00
Fahreddin Özcan 33f2338092 Handle Codex CLI sandbox DNS failures in setup (#2449) 2026-04-12 17:10:53 -07:00
Fahreddin Özcan 00833f9262 fix(mcp): preserve default CAs with NODE_EXTRA_CA_CERTS (#2432)
* 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>
2026-04-10 13:05:02 +03:00
Enes Gules 09d05bca29 docs: add new integrations for Factory AI, Mastra, and Tembo with corresponding setup instructions and images (#2428) 2026-04-09 17:32:20 +03:00
github-actions[bot] 5f108ecf88 chore(release): version packages (#2425)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ctx7@0.3.11
2026-04-09 11:51:22 +03:00
Fahreddin Özcan bc8eaf11a6 Add all-agents option for ctx7 skills install (#2424)
* Add all-agents option for ctx7 skills install

* Update docs and add changeset for skills install flags
2026-04-09 11:44:56 +03:00
github-actions[bot] 36463ad6e3 chore(release): version packages (#2351)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ctx7@0.3.10 @upstash/context7-tools-ai-sdk@0.2.3 @upstash/context7-mcp@2.1.7
2026-04-06 20:41:52 +03:00
Enes Gules 83228794e4 docs: enhance library name guidelines in CLI and documentation (#2408) 2026-04-06 20:40:00 +03:00
Fahreddin Özcan fb29170d85 feat(cli): add Gemini CLI support to setup command (#2406)
* feat(cli): add Gemini CLI support to setup command

Adds Gemini CLI as a supported agent in `ctx7 setup`. Configures MCP
server in `.gemini/settings.json` using `httpUrl` (Gemini's HTTP
streaming transport), appends rules to `GEMINI.md`, and installs skills
to `.gemini/skills/`. Also adds a permission fix tip when skill
installation fails with EACCES.

* chore: add changeset for Gemini CLI setup
2026-04-06 15:13:45 +03:00
Enes Gules 42dedb3ab7 docs: add Policies section to on-premise documentation for public documentation access control (#2394) 2026-04-06 10:46:35 +03:00
Enes Gules 6cba6fb29b docs: update API guide and OpenAPI schema and reorder the api docs (#2388) 2026-04-02 11:51:57 +03:00
Fahreddin Özcan 89d4862ebd fix(cli): use GITHUB_TOKEN for skill downloads to avoid rate limits (#2370)
* fix(cli): use GITHUB_TOKEN for skill downloads to avoid rate limits

Closes #2363

* chore: add changeset for gh ratelimit fix

* fix(cli): fallback to gh auth token for skill downloads

Supports private repos and users with gh CLI but no env vars set.

Closes #2369

* feat(cli): support installing skills from private/unindexed repos

When the Context7 backend doesn't know about a repo, the CLI now falls
back to fetching the repo tree from GitHub directly, parsing SKILL.md
frontmatter locally, and downloading skill files. Uses GitHub API status
codes to differentiate non-existent repos from repos without skills.

Closes #2369
2026-04-02 11:25:49 +03:00
Enes Gules 2273d528bb docs: add website filters (#2333) 2026-03-30 13:24:01 +03:00
Fahreddin Özcan b4f77af910 docs: add server URL reference to README and all-clients page (#2347)
* docs: add server URL reference to README and all-clients page

The remote server URL was not easily discoverable in the docs.
This surfaces it in the README installation section and in the
all-clients page intro so users can find it without digging
through individual client configurations.

* docs: align all-clients intro with README wording

* docs: restore unlisted client fallback sentence
2026-03-30 12:15:53 +03:00
vincent 658ec6796e feat(mcp): add --version/-v flag to CLI (#2325)
* 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>
2026-03-28 17:35:32 +03:00
github-actions[bot] 3b9c9b2c44 chore(release): version packages (#2346)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ctx7@0.3.9
2026-03-28 00:33:21 +03:00
Fahreddin Özcan 6961bdd4fb fix(setup): remove already configured state from ctx7 setup (#2344)
* fix(setup): allow re-selecting already configured agents and overwrite existing MCP config

Previously, agents with existing Context7 MCP config were disabled in the
selection prompt with "(already configured)" and their config was never
updated. This made it impossible to reconfigure an agent (e.g. rotate API
key or fix a broken URL) without manually editing config files.

Now all agents are always selectable, existing config is overwritten with
fresh entries on re-setup, and TOML replacement correctly handles
sub-sections like http_headers.

* fix(setup): eliminate double file read and whitespace drift in TOML overwrite

Inline the server existence check into appendTomlServer to avoid reading
the file twice. Normalize whitespace around the replaced block so repeated
re-configurations do not accumulate blank lines.

* chore: add patch changeset for setup reconfiguration fix
2026-03-28 00:11:10 +03:00
github-actions[bot] d349240c11 chore(release): version packages (#2282)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ctx7@0.3.8 @upstash/context7-mcp@2.1.6
2026-03-27 14:23:20 +03:00
Fahreddin Özcan d739f9b97c fix(setup): resolve all OpenCode config variants for MCP setup (#2339)
* fix(setup): resolve all OpenCode config file variants for MCP setup

OpenCode supports 4 config file names (opencode.json, opencode.jsonc,
.opencode.json, .opencode.jsonc) but setup only checked opencode.json
and opencode.jsonc. Users with dotfile variants were never detected as
"already configured" and setup would create a duplicate opencode.json.

Changed mcp.projectPath/globalPath (single string) to
mcp.projectPaths/globalPaths (string[]) so agents can declare all valid
config paths. resolveMcpPath now takes the full candidates array and
returns the first existing file, falling back to the first entry.

Closes #2313

* chore: add patch changeset for OpenCode config variant fix
2026-03-27 14:11:52 +03:00
Fahreddin Özcan 4f13168535 feat(setup): install rules alongside skills, update rule/skill content for better trigger rates (#2320)
* refactor(setup): update rule template to be selective with examples

Based on eval benchmarks showing that selective rules with explicit
should/should-not examples achieve 98% recall with 0 false positives,
vs the previous broad rule.

Split RULE_CONTENT into MCP_RULE_CONTENT and CLI_RULE_CONTENT to
support both MCP and CLI setup modes with appropriate tool references.

* feat(setup): install CLI rule alongside skill in ctx7 setup --cli

Previously, CLI setup mode only installed the find-docs skill (66% trigger
rate). Now it also installs a rule file with ctx7 CLI instructions for each
selected agent, matching the MCP setup behavior.

Benchmarks show skill + rule achieves 96-98% trigger rate vs 66% skill-only.

* feat(find-docs): update skill description to improve trigger rate

Replace passive description with pushy version that explicitly names common
libraries and counters Claude's undertriggering tendency.

Eval results: 66% -> 98% clean recall, 72% -> 92% with-context recall.

* chore(setup): remove deprecated RULE_CONTENT export and alwaysApply frontmatter

alwaysApply is not a Claude Code feature (it's Cursor-specific). Claude Code
rules without paths frontmatter load unconditionally by default. Remove the
deprecated alias now that all callers use MCP_RULE_CONTENT or CLI_RULE_CONTENT.

* refactor(setup): fetch rules from GitHub, add alwaysApply for Cursor

- Rule source of truth in rules/context7-mcp.md and rules/context7-cli.md
- templates.ts fetches from GitHub raw (master then main)
- getRuleContent(mode, agent) adds alwaysApply frontmatter for Cursor
- CLI setup now logs rule install failures instead of silently swallowing

* refactor(setup): add Codex agent, remove needsAlwaysApply field, use shared installRule

- Add Codex agent config with AGENTS.md append support
- Remove needsAlwaysApply field (hardcoded cursor check in templates.ts)
- CLI setup uses shared installRule instead of inline CLI_RULE_PATHS
- installRule handles both file-based (Claude/Cursor/OpenCode) and
  append-based (Codex/AGENTS.md) rule installation

* refactor(setup): unify CLI setup with MCP agent picker, group output by agent

- CLI setup now uses the same agent picker as MCP setup (no auto-detection)
- Output grouped by agent instead of repeating find-docs for each path
- Removed unused promptForInstallTargets/getTargetDirs imports

* fix(setup): add branch fallback URL for rule fetch, show error on rule failure

* fix(setup): OpenCode uses AGENTS.md, fix append logic for existing files

- OpenCode rule changed from .opencode/rules/ to AGENTS.md (append type)
  since OpenCode reads AGENTS.md natively, not a rules directory
- Fixed append logic: proper spacing for empty/non-empty files, clean
  idempotent replacement on re-run, preserves existing content

* test(setup): add tests for rule install, MCP config, and AGENTS.md append

* chore(setup): remove unused mergeInstructions and instructionsGlob

* fix: lint formatting, add changeset

* fix(setup): Codex global rule goes to ~/.codex/AGENTS.md

* fix(setup): align CLI output format with MCP output

* feat(setup): add --codex flag for MCP and CLI setup

* docs(rules): align trigger language with skill, use npx ctx7@latest in CLI rule

* docs(rules): prefer ctx7 over web search for library docs

* docs(find-docs): prefer skill over web search in description

* docs(rules): consolidate trigger language, add selection criteria

* docs(rules): add query quality guidance and auth env var to CLI rule

* cleanup

* fix: remove branch URL, add offline fallback matching rule files exactly

* fix(setup): support opencode.jsonc, strip JSON comments, fix detect path

- readJsonConfig now strips // and /* */ comments before parsing (JSONC support)
- resolveMcpPath checks for .jsonc variant when .json is specified
- OpenCode detect paths include both opencode.json and opencode.jsonc
- Fixed OpenCode project path from .opencode.json to opencode.json

* fix(setup): fix JSONC comment stripping to preserve URLs in strings

The regex-based comment stripper was matching // inside string values
(e.g., https:// URLs), corrupting the JSON. Replaced with a character-
level parser that skips string literals before stripping comments.

* fix(setup): Codex uses TOML config.toml, detect .opencode.json variant

- Codex MCP writes to ~/.codex/config.toml using [mcp_servers.context7]
  TOML sections instead of JSON (matches Codex docs and add-mcp tool)
- OpenCode detection checks opencode.json, opencode.jsonc, and .opencode.json
- Added TOML server block writer with idempotent append
- stripJsonComments now handles URLs in strings correctly

* test(setup): add JSONC, TOML, and resolveMcpPath tests

12 new tests covering:
- JSONC: comment stripping preserves URLs, block comments, plain JSON
- resolveMcpPath: .jsonc resolution, .json fallback, non-json passthrough
- TOML: buildTomlServerBlock output, http_headers, readTomlServerExists,
  appendTomlServer (empty file, preserve existing, idempotent)

* fix(setup): Codex MCP needs type=http, fix checkbox disabled item selection

- Codex TOML entry now includes type = "http" (required by Codex)
- Checkbox cursor starts on first non-disabled item
- Checkbox navigation skips disabled items

* fix: address PR review feedback on rules and skill description

- Surface libraryId format (/org/project) in step 2 where selection happens
- Suggest retrying with alternate names/queries instead of just punctuation
- MCP rule: explicitly require resolve-library-id unless /org/repo provided
- Skill description: explicitly warn against relying on training data for APIs

* fix: consistent /org/project format in MCP rule

* fix: revert opencode detection paths to original
2026-03-27 11:47:08 +03:00
Shannon Rumsey dc1aa20013 CTX7-1426: Update malware detection wording (#2318) 2026-03-27 10:32:16 +03:00
Enes Gules a667712ae2 CTX7-1442 (#2334) 2026-03-27 10:21:53 +03:00
Enes Gules be1a39acb9 feat: enhance Context7 server configuration with website URL, description, and detailed usage instructions (#2319)
* 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>
2026-03-27 10:18:07 +03:00
Enes Gules 9dbec6fff6 docs: update openapi (#2332)
* docs: update openapi

* fix(docs): rename NotFoundError to SearchNotFoundError in openapi.json

* single not found ref
2026-03-26 16:08:12 +03:00
enesgules 1140adde11 Revert "docs: update openapi"
This reverts commit c90f9076a4.
2026-03-26 15:23:04 +03:00
enesgules c90f9076a4 docs: update openapi 2026-03-26 15:18:11 +03:00
Enes Gules 58a36cea87 feat: update stale docs (#2307) 2026-03-24 10:49:49 +03:00
dependabot[bot] 5d7e893a5a chore(deps-dev): bump @changesets/cli from 2.29.7 to 2.29.8 (#1938)
Bumps [@changesets/cli](https://github.com/changesets/changesets) from 2.29.7 to 2.29.8.
- [Release notes](https://github.com/changesets/changesets/releases)
- [Commits](https://github.com/changesets/changesets/commits)

---
updated-dependencies:
- dependency-name: "@changesets/cli"
  dependency-version: 2.29.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 11:00:31 +03:00
Shannon Rumsey 7f7b7268c3 reorganize security docs (#2293) 2026-03-21 22:26:50 -07:00
Enes Gules d93157965e docs: update stale MCP client docs (#2273) 2026-03-20 01:48:55 +03:00