Skip to content

Proposal: Replace Context7 with open-source alternatives (GitMCP / MCPDoc) #2431

Description

@sandydy-au

Summary

The current context7.instructions.md skill hardcodes Context7 (Upstash-hosted service) as the documentation retrieval MCP. This creates a dependency on a proprietary, externally hosted service whose backend index, parsing, ranking, and ingestion infrastructure are not open source. This issue proposes either replacing or making the skill tool-agnostic so it works equally well with open-source, self-hostable alternatives.


Problem

Context7's MCP server code is open source (upstash/context7), but its hosted platform (the documentation index, ingestion, parsing, ranking, and retrieval backend) is proprietary and operated by Upstash. This means:

  • All documentation queries are sent to an external third-party service.
  • There is no self-hosted option for the full backend.
  • Enterprise/privacy-sensitive environments cannot use it safely for internal or confidential codebases.
  • Teams with niche or private libraries get limited value from the pre-built public index.

Recommended open-source alternatives

Tool Type Best for
GitMCP Open source, self-hostable Any public GitHub repository; converts repo docs/README/llms.txt into an MCP source
MCPDoc (langchain-ai/mcpdoc) Open source, self-hostable Documentation sites publishing llms.txt; developer-controlled and auditable
ContextMCP Open source, self-hostable Enterprise/internal knowledge bases with custom ingestion, chunking, and indexing
open-context7 Open source, self-hostable Privacy-first Context7 pattern without sending data to external servers

Proposed change

Option A — Make the skill tool-agnostic: Rewrite context7.instructions.md to describe the intent (retrieve authoritative, version-specific documentation before writing code) and the tool workflow pattern, without naming a specific MCP service. Agents can be configured with Context7, GitMCP, MCPDoc, or any compliant documentation MCP depending on their environment.

Option B — Offer parallel skills: Keep context7.instructions.md as-is for those using the hosted service, and add:

  • gitmcp.instructions.md for GitMCP-based workflows
  • mcpdoc.instructions.md for MCPDoc-based workflows

Token efficiency note

Context7's newer architecture reportedly reduced retrieved documentation from ~9.7k to ~3.3k tokens average (65% reduction). Any replacement skill should preserve the efficiency guidance:

  • Narrow task-specific queries only
  • Retrieve minimal surrounding context
  • Limit resolve-library-id and query-docs equivalent calls per turn
  • Skip external retrieval for local refactors and language fundamentals

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions