Metadata-Version: 2.4
Name: promptforge-mcp
Version: 0.1.0
Summary: Prompt Forge MCP server for secure LLM gateway access
Project-URL: Homepage, https://secureprompt.tech
Project-URL: Documentation, https://docs.secureprompt.tech
Project-URL: Repository, https://github.com/promptforge/promptforge-mcp
Project-URL: Issues, https://github.com/promptforge/promptforge-mcp/issues
Author-email: Prompt Forge <support@secureprompt.tech>
License: MIT License
        
        Copyright (c) 2026 Prompt Forge
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        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 THE
        AUTHORS OR COPYRIGHT HOLDERS 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: gateway,llm,mcp,promptforge,security
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp<1.0,>=0.9.1
Requires-Dist: uvicorn>=0.27.0
Provides-Extra: dev
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.2.0; extra == 'dev'
Description-Content-Type: text/markdown

# Prompt Forge MCP Server

Python MCP server that exposes [Prompt Forge](https://secureprompt.tech) secure gateway tools over the [Model Context Protocol](https://modelcontextprotocol.io/).

## Install

```bash
pip install promptforge-mcp
```

## Quick Start

### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "promptforge": {
      "command": "promptforge-mcp",
      "env": {
        "PROMPTFORGE_API_KEY": "your-api-key",
        "PROMPTFORGE_ORG_ID": "your-org-id",
        "PROMPTFORGE_ADMIN_TOKEN": "your-admin-token"
      }
    }
  }
}
```

### Claude Code

```bash
claude mcp add promptforge -- promptforge-mcp
```

Then set environment variables in your shell before launching.

### Run directly (stdio)

```bash
export PROMPTFORGE_API_KEY="your-api-key"
promptforge-mcp
```

### Run as HTTP/SSE server

```bash
promptforge-mcp --http
# or
MCP_TRANSPORT=http MCP_PORT=8765 promptforge-mcp
```

## Environment Variables

| Variable | Required | Default | Description |
|---|---|---|---|
| `PROMPTFORGE_API_KEY` | Yes (for gateway) | — | API key for gateway requests |
| `PROMPTFORGE_ADMIN_TOKEN` | Yes (for admin tools) | — | Token for secure mode and audit tools |
| `PROMPTFORGE_ORG_ID` | Yes (for admin tools) | — | Organization ID |
| `PROMPTFORGE_API_BASE` | No | `https://api.secureprompt.tech` | API base URL |
| `PROMPTFORGE_GATEWAY_URL` | No | `{API_BASE}/v1/gateway/requests` | Gateway endpoint |
| `PROMPTFORGE_TIMEOUT` | No | `30` | Request timeout in seconds |
| `PROMPTFORGE_MCP_TOOLS_PATH` | No | — | Override path for tool definitions JSON |
| `MCP_RATE_LIMIT_PER_MINUTE` | No | `60` | Rate limit per minute |
| `MCP_TRANSPORT` | No | `stdio` | Transport mode (`stdio` or `http`) |
| `MCP_HOST` | No | `0.0.0.0` | SSE server host |
| `MCP_PORT` | No | `8765` | SSE server port |

## MCP Tools

| Tool | Description |
|---|---|
| `promptforge.secure_generate` | Send a request through the secure LLM gateway |
| `promptforge.redact_and_tokenize` | Tokenize sensitive entities using Secure Mode |
| `promptforge.policy_dry_run` | Evaluate an egress policy without executing a call |
| `promptforge.audit_query` | Query audit logs (admin-only) |
| `promptforge.detokenize` | Detokenize content with a token vault reference |

## Docker

```bash
docker build -t promptforge-mcp .
docker run -p 8765:8765 \
  -e PROMPTFORGE_API_KEY=your-key \
  -e PROMPTFORGE_ORG_ID=your-org \
  -e PROMPTFORGE_ADMIN_TOKEN=your-token \
  promptforge-mcp
```

## License

MIT
