Prompt Forge MCP server for secure LLM gateway access
Project description
Prompt Forge MCP Server
Python MCP server that exposes Prompt Forge secure gateway tools over the Model Context Protocol.
Works with any MCP-compatible AI CLI: Claude Code, Claude Desktop, Gemini CLI, OpenAI Codex CLI, or any custom MCP client.
Install
pip install promptforge-mcp
Quick Start
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"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
claude mcp add promptforge -- promptforge-mcp
Then export the required environment variables in your shell before launching Claude Code.
Gemini CLI
Add to ~/.gemini/settings.json:
{
"mcpServers": {
"promptforge": {
"command": "promptforge-mcp",
"args": [],
"env": {
"PROMPTFORGE_API_KEY": "your-api-key",
"PROMPTFORGE_ORG_ID": "your-org-id",
"PROMPTFORGE_ADMIN_TOKEN": "your-admin-token"
}
}
}
}
OpenAI Codex CLI
Add to ~/.codex/config.json:
{
"mcpServers": {
"promptforge": {
"command": "promptforge-mcp",
"args": [],
"env": {
"PROMPTFORGE_API_KEY": "your-api-key",
"PROMPTFORGE_ORG_ID": "your-org-id",
"PROMPTFORGE_ADMIN_TOKEN": "your-admin-token"
}
}
}
}
Run directly (stdio)
Any MCP client that launches a subprocess can use this directly:
export PROMPTFORGE_API_KEY="your-api-key"
export PROMPTFORGE_ORG_ID="your-org-id"
export PROMPTFORGE_ADMIN_TOKEN="your-admin-token"
promptforge-mcp
Run as HTTP/SSE server
For clients that connect over HTTP instead of spawning a subprocess:
promptforge-mcp --http
# or
MCP_TRANSPORT=http MCP_PORT=8765 promptforge-mcp
Then point your MCP client at http://localhost:8765/sse.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
PROMPTFORGE_API_KEY |
Yes (for gateway) | — | API key for gateway requests |
PROMPTFORGE_ADMIN_TOKEN |
Yes (for admin tools) | — | JWT token for secure mode, billing, providers, and audit tools |
PROMPTFORGE_ORG_ID |
Yes (for admin tools) | — | Default organization ID |
PROMPTFORGE_API_BASE |
No | https://api.secureprompt.tech |
API base URL |
PROMPTFORGE_GATEWAY_URL |
No | {API_BASE}/v1/gateway/requests |
Gateway endpoint override |
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
Gateway
| Tool | Description |
|---|---|
promptforge.secure_generate |
Send a request through the secure LLM gateway |
promptforge.list_gateway_requests |
List gateway request logs for an org (metadata only) |
Secure Mode
| Tool | Description |
|---|---|
promptforge.redact_and_tokenize |
Tokenize sensitive entities in text |
promptforge.detokenize |
Restore tokenized text using a vault reference |
promptforge.list_secure_mode_entities |
List valid entity types for redaction |
promptforge.get_secure_mode_config |
Get org's Secure Mode configuration |
Policies
| Tool | Description |
|---|---|
promptforge.policy_dry_run |
Evaluate a policy decision without executing a call |
Audit
| Tool | Description |
|---|---|
promptforge.audit_query |
Query audit logs (admin-only) |
Billing
| Tool | Description |
|---|---|
promptforge.get_billing_status |
Get billing status and usage metrics for an org |
promptforge.list_billing_plans |
List available billing plans |
Providers
| Tool | Description |
|---|---|
promptforge.list_providers |
List configured LLM providers for an org |
promptforge.test_provider |
Test a provider connection and validate credentials |
Docker
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 --http
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file promptforge_mcp-0.2.0.tar.gz.
File metadata
- Download URL: promptforge_mcp-0.2.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62cb1b19e08f4c52801d8dcd9d8d1c1d4449b0e22d4702950fd27c3312131e8e
|
|
| MD5 |
60c7580f4855ab6b107475d4761a4f8d
|
|
| BLAKE2b-256 |
fb1efb5df404738b97cf135c2860ee6eb8672dbc00a5a1a3733a379130533119
|
File details
Details for the file promptforge_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: promptforge_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b52fbe4a2ff22f343f76f5311ae02ac987a0e7f1552198206502d59780a2743
|
|
| MD5 |
410c77a2711e36f8caeac2addd3565f5
|
|
| BLAKE2b-256 |
5ab40e0d27f71d7e9dea8dd64faab15f53e7ea5af8643e2b00d999146ace6110
|