npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@chinchillaenterprises/mcp-chatgpt

v1.0.0

Published

MCP server for ChatGPT/OpenAI integration - collaborate between Claude and ChatGPT

Downloads

7

Readme

MCP ChatGPT - AI Collaboration Server

NPM Version License: MIT

Enable seamless collaboration between Claude and ChatGPT through the Model Context Protocol

🚀 Features

  • Multi-Conversation Management: Create and manage multiple ChatGPT conversations
  • Model Selection: Choose between GPT-4, GPT-4 Turbo, and GPT-3.5 Turbo
  • Specialized Analysis: Code review, security analysis, performance optimization
  • Approach Comparison: Compare different solutions side-by-side
  • Conversation History: Full access to conversation history and context
  • System Prompts: Set custom system prompts for specialized contexts

📋 Prerequisites

🛠️ Installation

Quick Install for Claude Code

# Install globally for all projects
claude mcp add chatgpt -s user -e OPENAI_API_KEY=your_api_key -- npx @chinchillaenterprises/mcp-chatgpt

# Or install for specific project
claude mcp add chatgpt -s project -e OPENAI_API_KEY=your_api_key -- npx @chinchillaenterprises/mcp-chatgpt

Manual Installation

  1. Install the package:

    npm install -g @chinchillaenterprises/mcp-chatgpt
  2. Configure Claude Code (~/.claude.json):

    {
      "mcpServers": {
        "chatgpt": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@chinchillaenterprises/mcp-chatgpt"],
          "env": {
            "OPENAI_API_KEY": "your_openai_api_key_here"
          }
        }
      }
    }

🎯 Quick Start

  1. Start a conversation:

    Use chatgpt_start_conversation with title "Code Review Session" and model "gpt-4"
  2. Send a message:

    Use chatgpt_send_message with "Can you help me optimize this Python function?"
  3. Analyze code:

    Use chatgpt_analyze_code with the code and focus on "performance"
  4. Compare approaches:

    Use chatgpt_compare_approaches to compare two different implementations

🔧 Available Tools

Conversation Management

| Tool | Description | Parameters | |------|-------------|------------| | chatgpt_start_conversation | Start a new ChatGPT conversation | title: string, model?: string, system_prompt?: string | | chatgpt_send_message | Send a message in active conversation | message: string, system_prompt?: string | | chatgpt_list_conversations | List all conversations | None | | chatgpt_get_conversation | Get full conversation history | conversation_id: string | | chatgpt_switch_conversation | Switch to different conversation | conversation_id: string | | chatgpt_delete_conversation | Delete a conversation | conversation_id: string | | chatgpt_clear_conversation | Clear messages but keep conversation | None |

Specialized Tools

| Tool | Description | Parameters | |------|-------------|------------| | chatgpt_analyze_code | Analyze code with specific focus | code: string, focus?: enum, language?: string | | chatgpt_compare_approaches | Compare two different approaches | problem: string, approach1: string, approach2: string, criteria?: string[] | | chatgpt_get_models | Get available OpenAI models | None |

📊 Usage Examples

Basic Conversation

// Start a new conversation
await chatgpt_start_conversation({ 
  title: "Python Development", 
  model: "gpt-4",
  system_prompt: "You are a Python expert"
})

// Send a message
await chatgpt_send_message({ 
  message: "How do I implement async generators in Python?" 
})

Code Analysis

// Analyze code for security issues
await chatgpt_analyze_code({
  code: `
def login(username, password):
    query = f"SELECT * FROM users WHERE username='{username}' AND password='{password}'"
    return db.execute(query)
  `,
  focus: "security",
  language: "python"
})

Compare Approaches

// Compare two sorting algorithms
await chatgpt_compare_approaches({
  problem: "Sort a large list of integers",
  approach1: "Use Python's built-in sorted() function",
  approach2: "Implement quicksort from scratch",
  criteria: ["performance", "maintainability", "memory usage"]
})

🎨 Code Analysis Focus Options

  • performance - Optimization, complexity analysis, bottlenecks
  • security - Vulnerabilities, input validation, authentication
  • best practices - Style, patterns, maintainability
  • bugs - Logic errors, edge cases, error handling
  • general - Comprehensive analysis of all aspects

🔍 Example Outputs

Conversation List

[
  {
    "id": "conv_1234567890_abc123",
    "title": "Python Development",
    "model": "gpt-4",
    "messageCount": 5,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:45:00Z",
    "isActive": true
  }
]

Code Analysis Response

Based on my security analysis of your Python login function:

**Critical Security Issues:**
1. **SQL Injection Vulnerability**: The code uses string formatting to build SQL queries, making it vulnerable to SQL injection attacks.
2. **Plain Text Passwords**: The code appears to compare passwords directly, suggesting passwords are stored in plain text.

**Recommendations:**
1. Use parameterized queries or prepared statements
2. Implement password hashing with bcrypt or similar
3. Add input validation and sanitization
...

⚙️ Configuration

Environment Variables

| Variable | Description | Required | |----------|-------------|----------| | OPENAI_API_KEY | Your OpenAI API key | ✅ Yes |

Available Models

  • gpt-4 - Most capable, best for complex tasks
  • gpt-4-turbo-preview - Faster GPT-4 with 128k context
  • gpt-3.5-turbo - Fast and cost-effective

🚨 Error Handling

The server handles common errors gracefully:

  • Missing API Key: Clear error message with setup instructions
  • API Rate Limits: Passes through OpenAI error messages
  • Invalid Model: Lists available models in error
  • Network Issues: Descriptive connection errors

🧪 Development

Local Development Setup

# Clone the repository
git clone https://github.com/ChinchillaEnterprises/ChillMCP.git
cd ChillMCP/mcp-chatgpt

# Install dependencies
npm install

# Build the project
npm run build

# Test locally
claude mcp add chatgpt-local -s user -e OPENAI_API_KEY=your_key -- node $(pwd)/dist/index.js

Testing

# Run unit tests
npm test

# Run with coverage
npm run test:coverage

# Watch mode for development
npm run test:watch

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Commit your changes: git commit -m 'Add amazing feature'
  5. Push to the branch: git push origin feature/amazing-feature
  6. Open a pull request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Links

🆘 Support


Built with ❤️ by Chinchilla Enterprises for AI collaboration