Metadata-Version: 2.4
Name: 1up-mcp
Version: 0.1.0
Summary: MCP server for the 1up knowledge management platform — connect AI assistants to your 1up workspace
Project-URL: Homepage, https://www.1up.ai
Project-URL: Repository, https://gitlab.com/1upai/mcp_server
Author-email: "1up.ai" <support@1up.ai>
License: Copyright (c) 2025–2026 1up.ai. All rights reserved.
        
        PROPRIETARY SOFTWARE LICENSE
        
        This software and associated documentation files (the "Software") are the
        proprietary property of 1up.ai.
        
        Permission is hereby granted to any person who obtains a copy of this Software
        to use it solely for the purpose of accessing and interacting with the 1up
        platform, subject to the following conditions:
        
        1. You may NOT redistribute, sublicense, sell, or otherwise transfer copies of
           the Software to any third party.
        
        2. You may NOT modify, adapt, merge, or create derivative works based on the
           Software.
        
        3. You may NOT reverse engineer, decompile, or disassemble the Software, except
           to the extent that such activity is expressly permitted by applicable law.
        
        4. You may NOT use the Software to build a competing product or service.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
        FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1UP.AI BE LIABLE
        FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
        TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
        THE USE OR OTHER DEALINGS IN THE SOFTWARE.
License-File: LICENSE
Keywords: 1up,ai,knowledge-management,mcp,model-context-protocol
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: pydantic<3,>=2.0
Requires-Dist: python-dotenv>=1.0.0
Description-Content-Type: text/markdown

# 1up MCP Server

MCP (Model Context Protocol) server for the [1up](https://www.1up.ai) knowledge management platform. Enables AI coding assistants to interact with your 1up workspace — manage questionnaires, Q&A libraries, knowledge bases, and more — directly from the terminal.

## Installation

```bash
# With pip
pip install 1up-mcp

# With pipx (isolated install, recommended for CLI tools)
pipx install 1up-mcp

# With uvx (zero-install, runs directly)
uvx 1up-mcp auth login
```

**Requires Python 3.10+**

## Authentication

```bash
1up-mcp auth login       # Opens browser for SSO login
1up-mcp auth status      # Show current auth status
1up-mcp auth logout      # Remove cached credentials
```

Credentials are cached locally in `~/.1up/credentials.json` and automatically refreshed.

## Configuration

### Claude Code

Add to your `.claude.json` or `~/.claude.json`:

```json
{
  "mcpServers": {
    "1up": {
      "command": "1up-mcp"
    }
  }
}
```

### Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "1up": {
      "command": "uvx",
      "args": ["1up-mcp"]
    }
  }
}
```

### Cursor / Windsurf

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "1up": {
      "command": "1up-mcp"
    }
  }
}
```

## Environment Variables

These are optional — credentials from `1up-mcp auth login` are used by default.

| Variable | Description |
|----------|-------------|
| `ONEUP_AUTH_TOKEN` | Bearer token (overrides cached credentials) |
| `ONEUP_API_URL` | API base URL |
| `ONEUP_WORKSPACE_ID` | Workspace ID to use |

## Available Tools

Q&A Library (6 tools)

| Tool | Description |
|------|-------------|
| `ask_question` | Query the knowledge base with optional filters |
| `search_qa_library` | Search Q&A pairs with pagination |
| `get_qa_pair` | Get a specific Q&A pair by ID |
| `create_qa_pair` | Create a new Q&A pair |
| `update_qa_pair` | Update an existing Q&A pair |
| `delete_qa_pair` | Archive a Q&A pair |

Questionnaires (11 tools)

| Tool | Description |
|------|-------------|
| `upload_questionnaire` | Upload XLSX/DOCX/PDF/CSV questionnaire files |
| `list_questionnaires` | List questionnaires with status/search filters |
| `get_questionnaire` | Get full questionnaire details |
| `get_questionnaire_questions` | Get questions with answers |
| `update_questionnaire_answer` | Edit a specific answer |
| `approve_question` | Mark an answer as approved |
| `bulk_approve_questions` | Approve multiple questions at once |
| `regenerate_answer` | Regenerate AI answer for a question |
| `assign_question` | Assign a question to a team member |
| `add_question_comment` | Add a comment to a question |
| `request_questionnaire_export` | Export as XLSX/DOCX/CSV |

Knowledge Base (4 tools)

| Tool | Description |
|------|-------------|
| `list_kb_items` | List items with search/source filters |
| `get_kb_item` | Get KB item details |
| `upload_kb_document` | Upload PDF/DOCX/XLSX/CSV documents |
| `delete_kb_item` | Delete a KB item |

Knowledge Groups (5 tools)

| Tool | Description |
|------|-------------|
| `list_knowledge_groups` | List all groups |
| `get_knowledge_group` | Get group with its documents and Q&A pairs |
| `create_knowledge_group` | Create a new group |
| `add_items_to_knowledge_group` | Add documents/Q&A pairs to a group |
| `remove_items_from_knowledge_group` | Remove items from a group |
| `delete_knowledge_group` | Delete a group (items are ungrouped, not deleted) |

Workspace (4 tools)

| Tool | Description |
|------|-------------|
| `list_workspaces` | List accessible workspaces |
| `get_workspace_info` | Get workspace details, plan, limits, usage |
| `switch_workspace` | Switch active workspace |
| `get_audit_events` | Get audit events with pagination |

## Available Resources

16 read-only resources for workspace context, questionnaire data, Q&A library, knowledge base items (with source text tracing), and knowledge groups.

## Development

```bash
# Clone and install in dev mode
git clone https://gitlab.com/1upai/mcp_server.git
cd mcp_server
python3.10 -m venv .venv
source .venv/bin/activate
pip install -e .

# Run directly
python -m oneup_mcp
```

## License

Proprietary. Copyright (c) 2025-2026 1up.ai. All rights reserved. See [LICENSE](LICENSE) for details.
