RedPlanetHQ / RedPlanetHQ/core

New Integration: Context7 MCP

Open
#536 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue integration new-feature new-integration
Dominant language
TypeScript
Stars
2k
Forks
194
Avg merge
12m
Merged PRs (30d)
2

Description

Description

Add Context7 MCP integration to provide up-to-date, version-specific code documentation and examples directly into CORE via the Model Context Protocol.

Reference Implementations

Existing Integrations (use as templates)
  • integrations/github/ - Developer tooling integration
  • integrations/linear/ - For reference
  • integrations/slack/ - For reference
Required Files Structure
integrations/context7-mcp/
├── src/
│   ├── index.ts          # Main entry, MCP/API spec
│   ├── schedule.ts       # Sync logic
│   ├── utils.ts          # Context7 API utilities
│   ├── account-create.ts # Auth setup
│   └── create-activity.ts # Activity formatting (optional)
├── package.json
├── tsup.config.ts
└── README.md

Context7 MCP API Integration

OAuth Setup
  • Use API Key or OAuth 2.0 (MCP OAuth specification)
  • Context7 supports both:
    • API Key: Free key from https://context7.com/dashboard for higher rate limits
    • OAuth 2.0: MCP OAuth spec via /mcp/oauth endpoint
  • MCP Server Endpoint: https://mcp.context7.com/mcp
  • OAuth Endpoint: https://mcp.context7.com/mcp/oauth
  • NPX-based local server: npx -y @upstash/context7-mcp
Key Endpoints / MCP Tools

Context7 operates as an MCP (Model Context Protocol) server and exposes tools rather than traditional REST endpoints:

  • resolve-library-id - Search for a library by name and get its Context7-compatible ID
  • get-library-docs - Fetch up-to-date documentation for a specific library using its Context7 ID
HTTP API (if applicable)
  • POST /mcp - MCP protocol endpoint (JSON-RPC)
  • POST /mcp/oauth - OAuth-authenticated MCP endpoint

Events to Track

  1. Documentation Queries

    • Library documentation lookups
    • Library search queries
    • Version-specific doc retrievals
  2. Library Activity

    • New libraries indexed
    • Documentation updates detected
    • Popular libraries tracked
  3. Usage Patterns

    • Frequently queried libraries
    • Documentation coverage gaps
    • Query patterns and trends

Implementation Tasks

  • Set up basic integration structure following integrations/github/src/index.ts pattern
  • Implement API Key or MCP OAuth flow in account-create.ts
  • Create Context7 MCP client utilities in utils.ts
  • Implement sync logic in schedule.ts for documentation retrieval
  • Convert Context7 responses to CORE activity format
  • Add error handling and rate limiting
  • Create integration documentation
  • Add to integrations/README.md

Technical Notes

  • Context7 is built by Upstash and functions as an MCP (Model Context Protocol) server.
  • The MCP protocol uses JSON-RPC over HTTP or stdio transport.
  • Context7 fetches documentation from official sources in real-time, ensuring up-to-date content.
  • Free tier has rate limits; an API key from context7.com/dashboard provides higher limits.
  • The server can run locally via npx -y @upstash/context7-mcp or be accessed remotely at https://mcp.context7.com/mcp.
  • Integration should support both remote HTTP and local stdio transports.
  • Context7 is primarily a read-only service (fetching docs), so write operations are minimal.
  • The MCP protocol is still evolving; keep dependencies updated for compatibility.
  • Available as a Docker container, VS Code extension, and npm package.

Resources

Labels

enhancement, integration, new-feature

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading integrations/github/src/index.ts and the reference integrations in integrations/linear/ and integrations/slack/. Then define the Context7 MCP client, authentication, remote HTTP and local stdio behavior across src/index.ts, schedule.ts, utils.ts, and account-create.ts. Done means the integration structure, documentation, activity conversion, error handling, rate limiting, and integrations/README.md entry are complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.