Skip to main content
Glama
Om-Shree-0709

GitHub MCP TypeScript SDK Server

cursor-setup.mdโ€ข3.9 kB
a# Connecting GitHub MCP Server to Cursor This guide shows you how to connect your GitHub MCP server to Cursor IDE so you can use all GitHub tools directly within Cursor. ## ๐Ÿš€ Quick Setup ### Step 1: Find Your Cursor MCP Configuration Cursor stores its MCP configuration in different locations depending on your OS: **Windows:** ``` %APPDATA%\Cursor\User\globalStorage\cursor.mcp\config.json ``` **macOS:** ``` ~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/config.json ``` **Linux:** ``` ~/.config/Cursor/User/globalStorage/cursor.mcp/config.json ``` ### Step 2: Create or Update Configuration Create/edit the config file with your GitHub MCP server: ```json { "mcpServers": { "github-mcp": { "command": "node", "args": ["E:/Github MCP Ts-SDK/dist/server.js"], "env": { "GITHUB_TOKEN": "your_github_token_here", "GITHUB_USERNAME": "your_username_here" } } } } ``` ### Step 3: Update with Your Actual Paths Replace the paths with your actual values: 1. **Server Path**: Update `E:/Github MCP Ts-SDK/dist/server.js` to your actual server path 2. **GitHub Token**: Use the token from your `.env` file 3. **Username**: Use your GitHub username ### Step 4: Restart Cursor After updating the configuration, restart Cursor for the changes to take effect. ## ๐Ÿ”ง Alternative: Using Environment File If you prefer to use your `.env` file instead of hardcoding values: ```json { "mcpServers": { "github-mcp": { "command": "node", "args": ["E:/Github MCP Ts-SDK/dist/server.js"], "cwd": "E:/Github MCP Ts-SDK" } } } ``` This will automatically load your `.env` file since we added dotenv support. ## ๐ŸŽฏ Using GitHub Tools in Cursor Once connected, you can use GitHub tools in Cursor: ### Available Commands: - `@github get my info` - Get your GitHub profile - `@github get repo info microsoft/vscode` - Get repository details - `@github search repositories language:typescript` - Search repositories - `@github list issues facebook/react` - List repository issues - `@github get user stats octocat` - Get user statistics ### Natural Language Queries: - "Show me information about the VS Code repository" - "What are the open issues in the React repository?" - "Search for TypeScript repositories with more than 1000 stars" - "Get my GitHub statistics" ## ๐Ÿ› ๏ธ Troubleshooting ### Server Not Found If Cursor can't find your server: 1. Make sure the path to `dist/server.js` is correct 2. Ensure you've run `npm run build` to create the dist folder 3. Check that Node.js is in your PATH ### Authentication Errors If you get authentication errors: 1. Verify your GitHub token is valid 2. Make sure the token has the required scopes (repo, user, read:org) 3. Check that the token is properly set in the config ### Server Won't Start If the server fails to start: 1. Run `npm run simple-test` to verify the server works 2. Check the Cursor developer console for error messages 3. Ensure all dependencies are installed (`npm install`) ## ๐Ÿ“‹ Complete Configuration Example Here's a complete example configuration file: ```json { "mcpServers": { "github-mcp": { "command": "node", "args": ["E:/Github MCP Ts-SDK/dist/server.js"], "cwd": "E:/Github MCP Ts-SDK", "env": { "GITHUB_TOKEN": "ghp_your_token_here", "GITHUB_USERNAME": "your_username" } } } } ``` ## ๐ŸŽ‰ You're Ready! After following these steps, you'll have access to all 10 GitHub tools directly in Cursor: 1. โœ… get_my_info 2. โœ… get_repo_info 3. โœ… list_repo_issues 4. โœ… list_repo_prs 5. โœ… list_repo_commits 6. โœ… search_repositories 7. โœ… get_user_info 8. โœ… list_user_repos 9. โœ… get_my_repos 10. โœ… get_github_stats Plus resources and natural language prompts! **Happy coding with GitHub integration in Cursor! ๐Ÿš€**

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Om-Shree-0709/Github-MCP-Ts-SDK'

If you have feedback or need assistance with the MCP directory API, please join our Discord server