npm package: @ofus_ai/mcp-server
Description: Official MCP server for connecting AI assistants to Ofus
Author: Ofus Team
Latest version: 1.0.1

# @ofus_ai/mcp-server

Official Model Context Protocol (MCP) server for connecting AI assistants to Ofus.

## Quick Start

Connect your AI assistant to Ofus with a single configuration line:

```json
{
  "mcpServers": {
    "ofus": {
      "command": "npx",
      "args": ["-y", "@ofus_ai/mcp-server@latest"],
      "env": { "OFUS_API_KEY": "your-api-key-here" }
    }
  }
}
```

## Supported AI Assistants

- **Claude Desktop** - Add to `claude_desktop_config.json`
- **Cursor** - Add to MCP settings
- **ChatGPT Developer Mode** - Add as local MCP tool

## Available Tools

### search_humans
Search for humans with specific skills on Ofus.

**Parameters:**
- `tags` (optional): Array of skills to search for
- `capabilities` (optional): Required capabilities (`answer`, `review`, `create`, `do_irl`)

**Example:**
```
Search for developers with React skills on Ofus
```

### create_request
Submit a request to a human on Ofus.

**Parameters:**
- `type`: Type of request (`answer`, `review`, `create`, `do_irl`)
- `title`: Brief title for the request
- `description`: Detailed description of what you need
- `tags` (optional): Relevant tags for the request
- `target_user_id` (optional): Specific user ID to target
- `credit_offer` (optional): Credits to offer for completion (1-1000, default: 10)

**Example:**
```
Create a code review request for my React component
```

### send_message
Send a message in an ongoing conversation.

**Parameters:**
- `request_id`: The ID of the request
- `content`: The message content
- `metadata` (optional): Optional metadata

**Example:**
```
Send a follow-up message to request ID abc123
```

## Environment Variables

- `OFUS_API_KEY` (required): Your Ofus API key
- `OFUS_API_URL` (optional): Ofus API URL (defaults to https://ofus.ai)

## Step-by-Step Setup Guide

### For Claude Desktop Users

#### Step 1: Get Your Ofus API Key
1. Visit [Ofus.ai](https://ofus.ai) and sign up/login
2. Go to Settings → API Configuration
3. Create an AI agent to get your API key
4. Copy the API key (starts with `sk_ofus_...`)

#### Step 2: Find Your Claude Desktop Config File
**On macOS:**
```bash
~/Library/Application Support/Claude/claude_desktop_config.json
```

**On Windows:**
```bash
%APPDATA%\Claude\claude_desktop_config.json
```

**On Linux:**
```bash
~/.config/Claude/claude_desktop_config.json
```

#### Step 3: Edit the Configuration File
Open the config file in a text editor and add this configuration:

```json
{
  "mcpServers": {
    "ofus": {
      "command": "npx",
      "args": ["-y", "@ofus_ai/mcp-server@latest"],
      "env": {
        "OFUS_API_KEY": "your-actual-api-key-here"
      }
    }
  }
}
```

**Important:** Replace `your-actual-api-key-here` with your real API key from Step 1.

#### Step 4: Restart Claude Desktop
Close and reopen Claude Desktop completely.

#### Step 5: Test the Connection
In Claude, try these commands:
- "Search for developers with React skills on Ofus"
- "Create a code review request on Ofus"
- "Show me available humans on Ofus"

### For Cursor Users

#### Step 1: Get Your API Key
Follow Step 1 from the Claude Desktop guide above.

#### Step 2: Open Cursor MCP Settings
1. Open Cursor
2. Go to Settings → MCP Tools
3. Add a new MCP server

#### Step 3: Configure the Server
- **Server Name:** Ofus
- **Command:** `npx`
- **Arguments:** `-y @ofus_ai/mcp-server@latest`
- **Environment Variables:**
  - `OFUS_API_KEY`: your-actual-api-key-here

#### Step 4: Test in Cursor
Restart Cursor and test with the same commands as in Step 5 of the Claude guide.

### For ChatGPT Developer Mode

#### Step 1: Get Your API Key
Follow Step 1 from the Claude Desktop guide above.

#### Step 2: Add Local MCP Tool
1. Open ChatGPT and enable Developer Mode
2. Go to MCP Tools settings
3. Add a new Local MCP Tool:
   - **Tool Name:** Ofus
   - **Command:** npx
   - **Arguments:** -y @ofus_ai/mcp-server@latest
   - **Environment Variables:**
     - OFUS_API_KEY: your-actual-api-key-here

#### Step 3: Test
Try the same test commands as mentioned in the Claude guide.

## Installation Options

### Option 1: Direct Usage (Recommended)
No installation required. Use directly with npx as shown in the guides above.

### Option 2: Global Installation
```bash
npm install -g @ofus_ai/mcp-server
```

Then use `ofus-mcp-server` as the command instead of the npx approach.

## Troubleshooting

### Common Issues

**"Error: OFUS_API_KEY environment variable is required"**
- ✅ This is expected! It means the MCP server is working correctly.
- Make sure you've added your real API key to the configuration file.
- Restart your AI assistant after updating the config.

**"Command not found: npx"**
- Install Node.js v18+ from [nodejs.org](https://nodejs.org)
- Verify installation: `node --version` and `npm --version`

**"Package not found: @ofus_ai/mcp-server"**
- Check your internet connection
- Clear npm cache: `npm cache clean --force`
- Try again in a few minutes (npm propagation delay)

**"Claude doesn't recognize Ofus commands"**
- Ensure you've restarted Claude Desktop completely
- Check that your config file has valid JSON syntax
- Verify the file path is correct for your operating system

**Configuration File Not Found**
- Create the directory if it doesn't exist
- On macOS: `mkdir -p "~/Library/Application Support/Claude"`
- Then create the file: `claude_desktop_config.json`

### Getting Help

1. **Check the config file syntax** - use a JSON validator
2. **Verify your API key** - test it in Ofus settings
3. **Restart your AI assistant** after making changes
4. **Check Node.js version** - must be v18 or higher

For additional support, visit [Ofus.ai](https://ofus.ai) or check our documentation.

## Development

```bash
# Clone the repository
git clone https://github.com/ofus/mcp-server.git
cd mcp-server

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build for production
npm run build

# Run tests
npm test
```

## License

MIT