context7

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package context7 integrates the Context7 MCP server (https://github.com/upstash/context7) as an auto-discovered built-in plugin. Context7 provides up-to-date library documentation for LLMs, eliminating API hallucinations from stale training data.

When the CONTEXT7_API_KEY environment variable is set, the MCP server at https://mcp.context7.com/mcp is automatically registered. Without the key, the feature is silently unavailable — agents fall back to their training data.

A free API key can be obtained at https://context7.com/dashboard.

Index

Constants

View Source
const EnvVar = "CONTEXT7_API_KEY"

EnvVar is the environment variable that carries the API key.

View Source
const HeaderKey = "CONTEXT7_API_KEY"

HeaderKey is the HTTP header used to pass the API key.

View Source
const ServerURL = "https://mcp.context7.com/mcp"

ServerURL is the Context7 hosted MCP endpoint.

Variables

This section is empty.

Functions

func Spec

func Spec() (plugin.Spec, bool)

Spec returns a plugin.Spec for the Context7 MCP server when an API key is configured, or (Spec{}, false) when the key is absent. The server is always enabled when a key is present — there is no per-project opt-out because the MCP tools are only called when the agent explicitly invokes them.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL