MCP.so
Sign In
Servers

MCP Server for TypeScript SDK Context

@DotNaos

This project implements a Model Context Protocol (MCP) server designed to provide context about the modelcontextprotocol/typescript-sdk repository and its documentation.

Features

  • Fetches File Content: Retrieves the content of specific files directly from the modelcontextprotocol/typescript-sdk GitHub repository (latest version on the default branch).
  • Searches Repository: Allows searching for code within the modelcontextprotocol/typescript-sdk repository using the GitHub API.
  • Searches Documentation (Placeholder): Includes a placeholder for searching the official modelcontextprotocol.io documentation website (requires integration with an external search tool like Bing Search).

Setup

  1. Install Dependencies:
    npm install
    
  2. Configure Environment:
    • Create a .env file in the project root.
    • Add your GitHub Personal Access Token:
      GITHUB_TOKEN=YOUR_GITHUB_TOKEN_HERE
      
      (Ensure the token has permissions to read public repositories)
  3. Build the Server:
    npm run build
    

Running the Server

  • Directly:
    npm start
    
  • Via MCP Client (e.g., VS Code): Configure your MCP client to use the settings in .vscode/mcp.json. This typically involves specifying the server name (typescript-sdk-context) and the launch command (node dist/index.js).

How it Works

The server listens for MCP requests over standard input/output (stdio). When a client requests a tool execution:

  1. The server identifies the requested tool (getGithubFileContent, searchGithubRepo, searchDocumentationWebsite).
  2. It uses the @octokit/rest library (authenticated with your GITHUB_TOKEN) to interact with the GitHub API for file fetching and code search.
  3. For website search, it currently returns a placeholder message (integration with a search API like Bing is needed for full functionality).
  4. The results are formatted as MCP content and sent back to the client.

More from Memory & Knowledge