mcpField
M
Mcp_client_server

Mcp_client_server

Local
github.com/devmadniVersion Control0Updated 78w ago

About Mcp_client_server

Mcp_client_server is a Node.js command-line app for GitHub operations and OpenAI queries informed by GitHub context. It combines repository commands with an interactive interface for asking GitHub-related questions.

Key features

  1. 01Create GitHub repositories
  2. 02List repositories and API endpoints
  3. 03Query OpenAI with GitHub context
  4. 04Interactive command-line interface
  5. 05Environment-variable API key setup

Use cases

  1. 01Creating a GitHub repository from the CLI
  2. 02Listing repositories and API endpoints
  3. 03Asking how to perform GitHub tasks

MCP support

It runs the GitHub MCP server and uses its context for GitHub operations and OpenAI queries. The README identifies `@modelcontextprotocol/server-github` as the server used.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

OpenAI MCP Client for GitHub This is a Node.js command-line application that integrates with GitHub via the Model Context Protocol (MCP) server and OpenAI's API. It allows users to perform GitHub operations (e.g., creating repositories, listing repositories) and query OpenAI for GitHub-related information using context from an MCP server. Features

GitHub Operations: Create new repositories. List all repositories. List GitHub API endpoints.

OpenAI Integration: Query OpenAI with GitHub context from an MCP server for detailed answers (e.g., "How to create a pull request").

Interactive CLI: Simple command-line interface for entering commands.

Secure Configuration: Uses environment variables for API keys.

Prerequisites

Node.js: Version 14 or higher (recommended: latest LTS). npm: Comes with Node.js. GitHub Personal Access Token: Required for GitHub API access. OpenAI API Key: Required for OpenAI queries. Git: For version control and pushing to GitHub.

Installation

Clone the Repository: git clone https://github.com/[your-username]/tessst.git cd tessst

Install Dependencies: npm install

This installs axios and dotenv (added below).

Set Up Environment Variables:

Create a .env file in the project root:touch .env

Add your API keys:OPENAI_API_KEY=your_openai_api_key GITHUB_PERSONAL_ACCESS_TOKEN=your_github_personal_access_token

Note: Never commit .env to GitHub. It’s ignored by .gitignore.

Install MCP Server:

The script uses @modelcontextprotocol/server-github. It’s installed on-demand via npx, so no additional setup is needed.

Usage

Run the Application: node openai-mcp-client.js

This starts the interactive CLI.

Available Commands:

Create a new repository:create new repo named my-repo

List all repositories:list all repositories

List GitHub API endpoints:list github api

Query OpenAI:how to create a pull request

Exit:exit

Example Interaction:

create new repo named test-repo Successfully created new repository: https://github.com/[your-username]/test-repo list all repositories Your repositories:

how to create a pull request OpenAI's response: To create a pull request on GitHub:

  1. Push your changes to a branch...

Project Structure

openai-mcp-client.js: Main script with CLI and GitHub/OpenAI logic. .gitignore: Ignores node_modules/, .env, logs, and system files. .env: Stores API keys (not tracked by Git). package.json: Defines dependencies and scripts.

Dependencies

axios: For HTTP requests to GitHub and OpenAI APIs. dotenv: For loading environment variables from .env.

To update package.json with dotenv: npm install dotenv

Security Notes

API Keys: Store OPENAI_API_KEY and GITHUB_PERSONAL_ACCESS_TOKEN in .env, not in the code. GitHub Token: Generate a token at https://github.com/settings/tokens with repo scope. OpenAI Key: Obtain from https://platform.openai.com/account/api-keys.

Troubleshooting

"Failed to start GitHub MCP server": Ensure GITHUB_PERSONAL_ACCESS_TOKEN is valid and has repo scope. Check internet connectivity.

"Error querying OpenAI": Verify OPENAI_API_KEY is correct.

node_modules in Git: Ensure .gitignore includes node_modules/ and run:git rm -r --cached node_modules git commit -m "Remove node_modules"

Command not recognized: Use exact phrasing (e.g., "create new repo named my-repo") or check the script’s handleGitHubOperation function.

Contributing

Fork the repository. Create a feature branch (git checkout -b feature/your-feature). Commit changes (git commit -m "Add your feature"). Push to the branch (git push origin feature/your-feature). Open a pull request.

License MIT License. See LICENSE for details. Contact For issues or suggestions, open an issue on GitHub or contact [your-username].

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.