Skip to main content

Manage Policies

Control which sources and libraries your teamspace can access
3 min read

Policies let you control exactly which documentation your teamspace can pull from Context7. Configure them from the policies tab of your dashboard, or programmatically through the Policies API.

Every search and MCP request made with one of the teamspace's API keys is filtered through these policies, so they apply to all members at once.

Note
Policies are scoped to a teamspace. Only owners and admins can change them; developers have read-only access.

Source Type Access#

The Source Type Access card toggles entire categories of sources on or off. Disabling a type removes all of its content from results for the whole teamspace.

GroupSource TypeWhat it covers
Public SourcesPublic RepositoriesPublic GitHub repositories
Public SourcesWebsitesIndexed documentation websites
Public SourcesLLMs.txtllms.txt sources
Connected SourcesConfluenceAtlassian Confluence workspace pages
Connected SourcesUploaded FilesUploaded OpenAPI specs and PDFs
Connected SourcesNotionConnected Notion pages
Connected SourcesPrivate SourcesPrivately parsed repositories

Library Filters#

The Library Filters card decides which public libraries are accessible. Choose one of two modes:

Filter by Quality#

Allow any public library that clears the quality bar you set. Available filters:

FilterOptions
VerificationAll · Verified Only
Trust scoreAll · Medium (4+) · High (7+)
FreshnessAll · 30 days · 90 days · 1 year
Repo starsAll · 100+ · 1,000+ · 10,000+
Website backlinksAll · 500+ · 2,500+ · 5,000+
Referring domainsAll · 100+ · 500+ · 1,000+
Organic trafficAll · 100+ · 1,000+ · 10,000+

The filters you enable are combined with AND semantics: a library must clear every threshold you set — verification, trust score, freshness, and so on — to be eligible. Leaving a filter on All skips that check entirely, and setting more filters narrows the pool.

Repo star and license thresholds apply only to public GitHub repositories; websites and other non-repo sources pass through those checks. Likewise, backlink, referring-domain, and organic-traffic thresholds apply only to websites. You can also restrict public repositories to an allowlist of licenses (SPDX identifiers such as MIT or Apache-2.0) — a repository under any other license fails the quality check.

You can also maintain two override lists in quality mode:

  • Blocked libraries — always excluded, even if they pass every filter.
  • Excepted libraries — always allowed, even if they fail the filters. Excepted libraries act as wildcards over the entire configuration: they also bypass the blocked list and the source type access settings.

Select Manually#

Ignore the quality bar entirely and grant access only to a hand-picked list of libraries. Anything not on the list is inaccessible.

Note
The card shows the number of libraries currently accessible under your settings, so you can see the impact before saving.

Managing Policies via API#

The same configuration is available over the REST API using a teamspace API key:

  • Get PoliciesGET /api/v2/policies returns the current configuration and accessible library count.
  • Update PoliciesPATCH /api/v2/policies applies an incremental update; only the fields you include are changed.

See the API Guide for request and response details.