Commit Graph

888 Commits

Author SHA1 Message Date
github-actions[bot] 98baa58d36 chore(release): version packages (#2878) ctx7@0.5.4 @upstash/context7-tools-ai-sdk@0.2.4 @upstash/context7-pi@0.1.1 @upstash/context7-mcp@3.2.3 2026-07-06 15:31:33 +03:00
Enes Gules 33229cb332 docs: enhance query descriptions for clarity and specificity (#2868)
* docs: enhance query descriptions for clarity and specificity

* update all propmts/skills

* format

* address pr review
2026-07-06 15:12:06 +03:00
Enes Gules dc967fa330 docs: document what Context7 indexes (parsed file types and source-code fallback) (#2881)
* docs: document parsed file types and source-code fallback (#2862)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: document Generate docs option for private repos

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 15:09:28 +03:00
OrbisAI Security 68a6c63f3c fix: documentation contains hardcoded api key exampl... in api-guide.mdx (#2841) 2026-07-06 10:59:20 +03:00
石岳峰 41878ecd18 fix(mcp): skip loopback and IPv6 private IPs in getClientIp (#2875)
* fix(mcp): skip loopback and IPv6 private IPs in getClientIp

Extract getClientIp into lib/client-ip.ts and extend the private/local
IP filter to cover 127.0.0.0/8, 169.254.0.0/16, ::1, fe80::/10, and
fc00::/7 when walking X-Forwarded-For. Proxies that prepend loopback or
health-check addresses no longer pollute mcp-client-ip analytics.

Fixes #2874

* fix(mcp): tighten private IP detection and add changeset

Anchor the fe80::/10 and fc00::/7 regexes to full 4-digit first hextets
so abbreviated hextets like fe8::1 or fc::1 are no longer misclassified
as private. Match IPv6 loopback in any textual form (0::1,
0:0:0:0:0:0:0:1), add CGNAT (100.64.0.0/10) to the skip list, and add a
patch changeset.

---------

Co-authored-by: syf2211 <syf2211@users.noreply.github.com>
Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com>
2026-07-06 10:09:48 +03:00
石岳峰 84620bd483 fix(cli): align find-docs skill with context7-cli rule guidance (#2863)
Fixes #2860

- Use npx ctx7@latest as the canonical CLI invocation in find-docs SKILL.md
- Add official library naming guidance matching rules/context7-cli.md
- De-emphasize global npm install as the primary workflow
- Add regression tests to keep skill and rule guidance aligned

Co-authored-by: syf2211 <syf2211@users.noreply.github.com>
2026-07-03 11:33:46 +03:00
vadim s. sabinich c8cbf3ea87 Add AnythingLLM to all-clients.mdx (#2859) 2026-07-03 10:57:18 +03:00
Enes Gules b1fb8b5232 docs: update Docker MCP Toolkit to remote server (fixes #790) (#2839)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 13:24:24 +03:00
Enes Gules 0647bb3451 add new attribute to docs (#2828) 2026-06-25 12:17:26 +03:00
Fahreddin Özcan a914a86934 docs: configure GitHub Enterprise Server host from the UI (#2823)
Document setting the GitHub Enterprise host before creating the App or token, so the App flow targets the on-prem server instead of github.com. Note the GITHUB_URL env var as a deploy-time alternative.
2026-06-24 12:27:13 +03:00
Fahreddin Özcan 74dc6ba95c CTX7-1760: Document GitOps for on-premise (#2816)
* CTX7-1760: document GitOps for on-premise

Add the GitOps page under the On-Premise docs: how reconciliation works, the
manifest format and fields, dashboard configuration, webhooks, disaster
recovery, and the REST API. Includes a dashboard screenshot.

* CTX7-1760: clarify GitOps webhook requirements (reachable host, push subscription)

* CTX7-1760: call out webhook caveat for pre-existing GitHub Apps

* CTX7-1760: add a Before you start prerequisites section to GitOps docs

* CTX7-1760: add GitHub Integration page; trim GitOps prerequisites to reference it

* CTX7-1760: group on-prem feature pages under a Features nav section

* CTX7-1760: move GitHub docs under an Integrations group, add setup screenshots

* Remove accidentally-staged docs/enterprise/integrations/github-actions.mdx

* CTX7-1760: use an admin API key example for the reconcile endpoint instead of a session cookie

* CTX7-1760: use connected-state GitHub App screenshot; split setup into create + install steps

* CTX7-1760: add Verify the App configuration section with permissions and webhook screenshots
2026-06-24 11:33:07 +03:00
Fahreddin Özcan 518bc98d21 docs(enterprise): add OIDC SSO guide (#2814)
Documents generic OIDC SSO setup for Context7 On-Premise, with dashboard
screenshots and a troubleshooting section. Adds the page to the On-Premise
Security nav group.
2026-06-24 11:32:54 +03:00
Fahreddin Özcan 8a6c029f65 docs(enterprise): add on-premise API reference (#2810)
* docs(enterprise): add on-premise API reference

Adds interactive API reference pages for the on-premise instance covering authentication, library search, documentation context, and all parse endpoints.

* docs(enterprise): remove duplicate openapi spec

* docs(enterprise): remove em dashes

* docs(enterprise): simplify authentication page

* docs(enterprise): add API key screenshots to authentication page

* docs(enterprise): link bearer auth description to authentication page
2026-06-23 11:22:52 +03:00
github-actions[bot] 18e6d4727b chore(release): version packages (#2808)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@upstash/context7-mcp@3.2.2
2026-06-22 12:44:24 +03:00
Fahreddin Özcan 2253765b3f feat(mcp): Enterprise-Managed Auth (id-jag) validation + Okta docs (#2798)
* feat(mcp): Enterprise-Managed Auth (id-jag) validation + Okta docs

* docs(enterprise): clarify Okta connection is client-side org config, drop wrong client JSON

* docs(enterprise): remove em dashes

* docs(enterprise): group Entra and Okta under Enterprise-Managed Auth, redirect old azure-apim path

* refactor docs

---------

Co-authored-by: enesgules <abdullah.enes.gules@gmail.com>
2026-06-22 11:55:06 +03:00
Enes Gules 73542b72d5 docs(library-owners): clarify folders/excludeFolders priority (#2799)
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-06-19 16:55:53 +03:00
Fahreddin Özcan c97570227d docs(azure-apim): add auto-provision from Entra security group section (#2793)
Adds Part 4 Step 3 covering Microsoft Graph permissions (GroupMember.Read.All
+ User.ReadBasic.All), the WIF federated credential setup (issuer, subject,
audience values copied from the dashboard), group creation, dashboard config,
and "Sync now" verification. Updates the Step 2 roadmap note and adds a
troubleshooting entry for the most common pitfall: missing User.ReadBasic.All
returns 0 members synced even when the group has members.
2026-06-18 13:26:22 +03:00
Fahreddin Özcan cd12120f40 docs: on-premise library import/export (#2789)
Document the offline library transfer flow: export libraries from Context7
Cloud, import the bundle into an airgapped on-premise install (snippets are
re-embedded locally). Adds the page under Enterprise > On-Premise.
2026-06-17 15:09:28 +03:00
github-actions[bot] 9256fdfb9c chore(release): version packages (#2787) ctx7@0.5.3 2026-06-17 13:24:19 +03:00
Enes Gules acd0d4640e fix(cli): surface GitHub API error details when skill download fails (#2786)
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-06-17 13:22:29 +03:00
Fahreddin Özcan 0ab0597649 docs(azure-apim): document vscode.dev/redirect URI + manifest CLI fallback (#2784)
Adds the redirect URI registration step that VS Code with GitHub Copilot
requires, plus troubleshooting entries for AADSTS500113 and AADSTS50011.
Also notes the CLI alternative when the Manifest UI silently fails to
persist requestedAccessTokenVersion.
2026-06-17 12:26:27 +03:00
Enes Gules 195357db70 feat(docs): enhance documentation with improved titles, descriptions, and structured steps for clarity (#2778) 2026-06-17 10:18:21 +03:00
Fahreddin Özcan b692be18bf docs: backup and restore guide for on-premise (#2758)
* docs: backup and restore guide for on-premise

* docs: add dashboard restore flow and Keep all retention

* docs: use ctx7:restore in the local restore command

* docs: use consistent library/index vocabulary in backup-restore
2026-06-16 18:27:07 +03:00
Enes Gules 98fc4b814c fix(docs): update terminology and improve clarity across multiple documentation filestur (#2777) 2026-06-16 18:26:37 +03:00
github-actions[bot] dec6cf361c chore(release): version packages (#2763)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@upstash/context7-mcp@3.2.1
2026-06-13 19:25:39 +03:00
mehmet turac 8123b519ed fix: restore Node 18 support for context7 mcp (#2762)
* fix: restore Node 18 support for context7 mcp

* chore: add changeset for Node 18 fix

---------

Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com>
2026-06-13 19:24:02 +03:00
Enes Gules 574fc642ab feat(docs): add VS Code extension documentation and update all clients reference (#2757) 2026-06-12 16:39:14 +03:00
Enes Gules e35cb61068 feat(copilot-plugin): pass CONTEXT7_API_KEY from environment to MCP server (#2752)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 17:56:01 +03:00
Enes Gules 8bcad1372f update test library for redirection (#2751) 2026-06-11 17:43:32 +03:00
Enes Gules 75361160c7 feat: update plugin version to 1.0.2 and add API key usage instructions in documentation (#2749) 2026-06-11 17:13:55 +03:00
github-actions[bot] 0c53c6fb3e chore(release): version packages (#2731)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@upstash/context7-sdk@0.3.1 ctx7@0.5.2 @upstash/context7-mcp@3.2.0
2026-06-11 16:33:50 +03:00
Fahreddin Özcan c921c8becf feat(mcp): switch anonymous sign-in nudge to elicitation (#2716)
* feat(mcp): switch anonymous sign-in nudge to elicitation

Replace the in-result markdown nudge with an MCP `elicitation/create`
form request. The previous text-injection approach instructed the
assistant to relay the message to the user, which some agents flagged
as prompt injection. Elicitations are delivered out-of-band to the
client UI, bypassing that surface entirely.

- `maybeElicitAuthSignIn` fires after each tool response when the
  backend has set `ctx.shouldPrompt` (via `X-Context7-Auth-Prompt: 1`)
  and the caller is anonymous.
- Gated on the client advertising the `elicitation` capability;
  no-op otherwise.
- Includes a "Don't show this again" checkbox; opting out suppresses
  further nudges for the lifetime of the MCP process, keyed per
  session id / client IP.
- Fire-and-forget: the elicitation never blocks or fails the
  surrounding tool response.

* feat(mcp): two-option choice in sign-in elicitation

Replace the "Don't show this again" checkbox with a single-select
radio between "I'll run the command to sign in" and "Continue
anonymously with smaller limits". The radio makes the user's intent
explicit and softens the protocol-fixed Accept/Decline labels —
Accept now just submits the choice.

Picking "Continue anonymously" (or declining/cancelling outright)
suppresses further nudges for the lifetime of the MCP process.
The command itself stays in the dialog message for the user to
copy; the server does not attempt to drive the client to execute it.

* fix(mcp): use plain enum schema for choice radio

Switch the elicitation's choice field from `oneOf` with separate
`const`/`title` entries to the simpler `enum: [...]` shape. Cursor's
elicitation UI does not render the `oneOf`-with-titles pattern
correctly — it falls back to a plain text input with the const string
as the default value. The flat enum form is rendered as a proper
dropdown / radio across the clients we tested.

The user-facing strings are now also the enum const values, so the
elicitation response surfaces the chosen label directly. Suppression
logic compares against the same string constants.

* refactor(mcp): drop in-memory suppression, let backend own prompt frequency

The MCP server no longer keeps a per-session suppression set. It fires the
elicitation whenever X-Context7-Auth-Prompt is present; the backend now emits
that header at most once per MCP session.
2026-06-11 16:32:10 +03:00
Yui(ゆい) 43e410645c docs: document Docker MCP Toolkit stdio transport (#2734) 2026-06-11 11:43:29 +03:00
Enes Gules c10f116765 feat: add Context7 Codex plugin with installation instructions and documentation (#2748) 2026-06-11 11:41:36 +03:00
Enes Gules 1f6212baa8 trigger the Test workflow only when they touch packages/** or the root files that affect the toolchain (#2747) 2026-06-10 14:33:00 +03:00
Enes Gules 06843a6b84 fix copilot cli plugin compatability (#2743) 2026-06-10 13:29:14 +03:00
Enes Gules cc011a4707 feat: add Codex client documentation and update OAuth flow details for existing clients (#2742) 2026-06-09 15:51:14 +03:00
Fahreddin Özcan eb1bc852e1 chore: remove changeset check workflow (#2741) 2026-06-09 15:01:12 +03:00
Fahreddin Özcan 0807914d91 ci: update GitHub Actions to current major versions (#2739)
- actions/setup-node v4 -> v6 (test, release, canary-release, mcp-registry)
- actions/github-script v7 -> v8 (changeset-check)
- aws-actions/configure-aws-credentials v5 -> v6 (ecr-deploy)

All move to the node24 runtime (runner >= v2.327.1, satisfied by
GitHub-hosted runners). No workflow config changes required.

Combines #1698 (by @pgoslatara) and #2062.
2026-06-09 13:23:19 +03:00
Fahreddin Özcan cb6aee187e chore(deps): combined dependabot dependency updates (#2737)
* chore(deps): bump dependencies (combined dependabot updates)

Combines the safe dependabot dependency bumps into a single change:

- @modelcontextprotocol/sdk 1.25.2 -> 1.29.0 (mcp)
- undici 6.26.0 -> 8.3.0 (mcp)
- zod 4.3.5 -> 4.4.3 (mcp, tools-ai-sdk)
- commander 13.1.0 -> 15.0.0 (cli)
- ora 9.0.0 -> 9.4.0 (cli)
- dotenv 17.2.3 -> 17.4.2 (sdk, tools-ai-sdk, pi)
- @earendil-works/pi-coding-agent 0.75.5 -> 0.78.0 (pi)

eslint 9 -> 10 (#2703) is excluded: it is incompatible with the
pinned typescript-eslint v8 and breaks lint.

Verified: build, typecheck, lint, and tests pass.

* chore: add changesets for runtime dependency bumps

* fix(deps): pin undici to 7.x for Node 20 compatibility

undici 8 requires Node >=22.19.0 (it calls worker_threads.markAsUncloneable
unconditionally at module load), but CI and the release pipeline run Node 20,
which crashed the mcp test suite with 'markAsUncloneable is not a function'.
undici 7.27.0 guards that call and supports Node >=20.18.1.
2026-06-09 13:21:58 +03:00
Enes Gules dbc4c78cca fix: update references from Windsurf to Devin Desktop in documentation and templates (#2736) 2026-06-09 12:48:42 +03:00
Fahreddin Özcan f327589a9a fix(sdk): avoid raw SyntaxError on non-JSON error responses (#2732)
* fix(sdk): avoid raw SyntaxError on non-JSON error responses

Wrap res.json() in the error path with .catch(() => ({})) so non-JSON
error bodies (HTML 502s, plain-text 429s, Cloudflare challenge pages)
fall through to res.statusText and always surface as a typed
Context7Error instead of a native SyntaxError.

Closes #1964

* chore: add changeset for sdk non-JSON error fix

* test(cli): pin home dir via HOME env instead of mocking os builtin

The storage-paths and auth-utils tests mocked the `os` module to fix
homedir, but that mock resolves inconsistently across Node versions and
worker pooling, leaking the real homedir on CI (/home/runner) and
failing 6 tests. os.homedir() reads $HOME first on POSIX, so stub HOME
(and clear XDG_* vars) for deterministic, order-independent paths with
no builtin-module mock. Also make the device-auth body assertion parse
client_id rather than matching the exact string, since hostname is
appended best-effort and varies by machine.
2026-06-09 11:47:14 +03:00
Fahreddin Özcan 428af3e067 fix(cli): recover library ID mangled by Git Bash on Windows (#2733)
* fix(cli): recover library ID mangled by Git Bash on Windows

Git Bash rewrites a leading-slash argument like /facebook/react into a
Windows path under the Git install dir (C:/Program Files/Git/facebook/react),
so "ctx7 docs" rejected it as an invalid library ID. This mainly affected
users running ctx7 through Claude Code.

Detect and undo the conversion before validation, and point users at the
//owner/repo escape for install layouts that aren't auto-detected.

* chore: add changeset
2026-06-08 16:42:10 +03:00
vincent 88c5b29e99 feat(cli): add -v short flag for version command (#2314)
Co-authored-by: liwenjun-dev <liwenjun.dev@gmail.com>
Co-authored-by: Enes Gules <101020733+enesgules@users.noreply.github.com>
2026-06-08 15:56:52 +03:00
Javier Gómez c03bc9c95b fix(cli): use XDG dirs for context files (#2678)
* fix(cli): use XDG dirs for context files

* fix(cli): harden XDG migration and cover previews dir

- Move `generate` previews to $XDG_CACHE_HOME/context7/previews (was the
  last writer recreating ~/.context7)
- Make legacy->XDG migration best-effort and fall back to reading the
  legacy file so loadTokens/readUpdateState never throw or silently log out
- Split update-check read (legacy fallback) from write (always XDG target)
- Ignore relative/empty XDG_* values per the spec
- Fix non-hermetic XDG_STATE_HOME test that moved the real ~/.context7
  cli-state into a temp dir; add storage-paths tests and a migration-failure
  fallback test

* chore: add changeset for XDG directories

* fix(cli): enforce 0o600 on credentials after migration

rename preserves the legacy file's mode, so a credentials file that was
group/world-readable in ~/.context7 stayed readable after migrating to the
XDG path. chmod the target to 0o600 on migrate, and re-assert it after every
write (writeFileSync's mode is ignored when the file already exists).

---------

Co-authored-by: Fahreddin Özcan <ozcanfahrettinn@gmail.com>
2026-06-08 15:19:23 +03:00
Fahreddin Özcan fcdc36e245 fix(mcp): add no-op prompts/list and resources/list handlers (#2534)
* fix(mcp): add no-op prompts/list and resources/list handlers

Some MCP clients (e.g. opencode) call prompts/list and resources/list
unconditionally and treat -32601 Method not found as fatal, rather than
honoring the negotiated capabilities. Advertise empty prompts/resources
capabilities and register no-op handlers so those clients can load the
server.

* remove explanatory comments

* fix(mcp): add no-op resources/templates/list handler

Advertising the resources capability invites clients to probe
resources/templates/list as well; without a handler that method
returned -32601, reintroducing the fatal-error behavior the
prompts/resources no-op handlers were added to avoid.
2026-06-08 14:18:15 +03:00
Enes Akar 7dde3382b0 docs: add Policies and Rules How To pages (#2724)
Add the page files for the Policies and Rules dashboard tabs, which the
nav (docs.json) already references. Policies covers source-type access
and library filters; Rules covers global and library-specific teamspace
rules.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 16:39:37 +03:00
enesakar 0a6ecdcaf2 docs pages 2026-06-05 16:13:38 +03:00
github-actions[bot] d82bcc9c9c chore(release): version packages (#2721)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ctx7@0.5.1
2026-06-05 11:03:36 +03:00
Fahreddin Özcan ea91d7dc75 feat(cli): device-code flow is now the default for ctx7 login (#2720)
The localhost-callback path is gone. Every install — laptop, SSH,
Codespace, Docker, CI — goes through the same boxed prompt and
verification page. Three reasons to make this the default:

- The localhost flow was broken anywhere the browser couldn't reach
  127.0.0.1:52417 (SSH, Docker, Codespaces). Auto-detection via
  SSH_CONNECTION / $DISPLAY was a half-fix that depended on env
  vars users don't always set.
- Device flow works everywhere, has no random port-binding behavior,
  and still ends in the same long-lived ctx7sk- API key.
- One UX path is simpler to support than two.

Drops the --device flag (it was the opt-in for what's now the
default). Older CLI versions (<= 0.5.0) continue to work against the
unchanged auth endpoints, so pinned installs are unaffected.

The legacy localhost machinery in utils/auth.ts is left in place
for now — nothing imports it from commands/auth.ts anymore, and a
follow-up can delete it once we're confident no rollback is needed.
2026-06-04 15:31:45 +03:00