Skip to content

Context7 as a VS Code MCP Server Extension #434

@sandy081

Description

@sandy081

Hello Context7 Team,

I'm reaching out from the VS Code team to explore the possibility of making the Context7 MCP Server available as a VS Code extension.

Context7 serves as a useful developer tool for providing AI models with access to current documentation. Currently, users need to manually configure it as an MCP server in their editor to use it.

VS Code's Extensions Marketplace offers a robust ecosystem with built-in support for versioning, automatic updates, and centralized governance. To better serve the developer community, we recently introduced the MCP Server Provider API, which enables extensions to register as MCP servers documentation here.

Publishing Context7 as a VS Code extension would provide several benefits:

  • Enhanced discoverability through the Extensions Marketplace
  • Simplified installation for end users
  • Automatic updates and version management
  • Broader adoption within the VS Code developer ecosystem

Converting your existing MCP server into a VS Code extension is straightforward and requires minimal changes:

  1. Add MCP Server contribution and context7 npm package dependency in package.json
"contributes": {
    "mcpServerDefinitionProviders": [
      {
        "id": "context7",
        "label": "Context7"
      }
    ]
  },
"dependencies": {
    "@upstash/context7-mcp": "1.0.14"
  }
  1. Register the MCP Server provider during extension activation
import path from 'path';
import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {
    context.subscriptions.push(vscode.lm.registerMcpServerDefinitionProvider('context7', {
        provideMcpServerDefinitions(): vscode.McpServerDefinition[] {
            return [
                new vscode.McpStdioServerDefinition(
                    'context7',
                    'node',
                    [
                        path.join(__dirname, '..', 'node_modules', '@upstash', 'context7-mcp', 'dist', 'index.js'),
                    ]
                )
            ];
        }
    }));
}

// This method is called when your extension is deactivated
export function deactivate() { }

We believe this would be a valuable addition to the VS Code ecosystem and would be happy to provide guidance throughout the development and publishing process. If you're interested in pursuing this opportunity, please let us know, and we can discuss any technical questions or requirements.

Thank you for considering this request, and we look forward to your thoughts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions