
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@rightnow/forge-mcp-server
Advanced tools
MCP server for Forge GPU kernel optimization — generate and optimize Triton/CUDA kernels on real H100/A100 GPUs from any AI coding agent
Swarm agents that turn slow PyTorch into fast CUDA/Triton kernels, from any AI coding agent.
Installation · Tools · Resources · Prompts · Security · Development
Forge transforms PyTorch models into production-grade CUDA/Triton kernels through automated multi-agent optimization. Using 32 parallel AI agents with inference-time scaling, it achieves up to 14x faster inference than torch.compile(mode='max-autotune-no-cudagraphs') while maintaining 100% numerical correctness.
This MCP server connects any MCP-compatible AI coding agent to Forge. Your agent submits PyTorch code, Forge optimizes it with swarm agents on real datacenter GPUs, and returns the fastest kernel as a drop-in replacement.
torch.compile(max-autotune)All optimization and benchmarking runs on datacenter-grade hardware:
| GPU | Architecture |
|---|---|
| B200 | Blackwell |
| H200 | Hopper |
| H100 | Hopper |
| L40S | Ada Lovelace |
| A100 | Ampere |
| L4 | Ada Lovelace |
| A10 | Ampere |
| T4 | Turing |
| Client | Status |
|---|---|
| Claude Code | Fully supported |
| Claude Desktop | Fully supported |
| OpenCode | Fully supported |
| Cursor | Fully supported |
| Windsurf | Fully supported |
| VS Code + Copilot | Fully supported |
| Any MCP client | Fully supported via stdio |
claude mcp add forge-mcp -- npx -y @rightnow/forge-mcp-server
Add to your claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"forge": {
"command": "npx",
"args": ["-y", "@rightnow/forge-mcp-server"]
}
}
}
%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"forge": {
"command": "npx",
"args": ["-y", "@rightnow/forge-mcp-server"]
}
}
}
Add to your .vscode/mcp.json (workspace) or user settings:
{
"servers": {
"forge": {
"command": "npx",
"args": ["-y", "@rightnow/forge-mcp-server"]
}
}
}
Add to your Cursor MCP settings (~/.cursor/mcp.json):
{
"mcpServers": {
"forge": {
"command": "npx",
"args": ["-y", "@rightnow/forge-mcp-server"]
}
}
}
Add to your Windsurf MCP configuration:
{
"mcpServers": {
"forge": {
"command": "npx",
"args": ["-y", "@rightnow/forge-mcp-server"]
}
}
}
Add to your opencode.json:
{
"mcp": {
"forge": {
"command": "npx",
"args": ["-y", "@rightnow/forge-mcp-server"]
}
}
}
forge_authAuthenticate with the Forge service. Opens your browser to sign in via the RightNow dashboard. Required before using any other tool.
force (boolean, optional): Force re-authentication even if valid tokens existforge_optimizeSubmit PyTorch code for GPU kernel optimization. 32 swarm agents generate optimized Triton or CUDA kernels, evaluate them on real datacenter GPUs, and return the best result with speedup metrics.
The agent will automatically use this tool when it detects:
PyTorch custom operations (torch.autograd.Function, custom forward/backward)
Manual CUDA kernels that could be faster
Performance-critical tensor operations (attention, convolution, normalization, softmax)
Code with comments like "slow", "bottleneck", "optimize"
torch.compile() targets or triton.jit kernels
Any nn.Module with significant compute in forward()
Matrix multiplication, reduction, or scan operations
Custom loss functions with reduction operations
Fused operation opportunities (e.g., LayerNorm + activation)
Inputs:
pytorch_code (string, required): Complete PyTorch code to optimize. Max 500 KB.kernel_name (string, required): Short name for the kernel (e.g., "flash_attention")output_format (enum, optional): "triton" (default) or "native_cuda"target_speedup (number, optional): Target speedup multiplier. Default 2.0max_iterations (number, optional): Max optimization iterations (1-100). Default 10gpu (enum, optional): Target GPU. Default "H100". Options: B200, H200, H100, L40S, A100, L4, A10, T4user_prompt (string, optional): Guidance for the optimizer (e.g., "focus on memory bandwidth")Returns: Optimized kernel code, speedup metrics, latency comparison, iteration history
forge_generateGenerate an optimized GPU kernel from scratch based on a natural-language specification. Forge creates a PyTorch baseline, then optimizes it into Triton or CUDA.
operation (string, required): Operation name (e.g., "fused_attention", "softmax")description (string, required): Detailed description of what the kernel should doinput_shapes (number[][], required): Input tensor shapes (e.g., [[8, 512, 768]])output_shape (number[], optional): Expected output shapedtype (string, optional): Data type. Default "float16"output_format (enum, optional): "triton" (default) or "native_cuda"target_speedup (number, optional): Target speedup. Default 2.0max_iterations (number, optional): Max iterations (1-100). Default 10gpu (enum, optional): Target GPU. Default "H100"user_prompt (string, optional): Additional guidanceforge_creditsCheck your current Forge credit balance.
forge_statusCheck the status of a running or completed optimization job.
session_id (string, required): Session ID from forge_optimize or forge_generateforge_cancelCancel a running optimization job.
session_id (string, required): Session ID of the job to cancelforge_sessionsList past optimization sessions with results.
limit (number, optional): Number of sessions to return (1-100). Default 10status (enum, optional): Filter by status: "all", "completed", "failed", "running". Default "all"| Tool | Read-only | Idempotent | Destructive |
|---|---|---|---|
forge_auth | No | Yes | No |
forge_optimize | No | No | No |
forge_generate | No | No | No |
forge_credits | Yes | Yes | No |
forge_status | Yes | Yes | No |
forge_cancel | No | No | Yes |
forge_sessions | Yes | Yes | No |
| URI | Description |
|---|---|
forge://auth/status | Current authentication state (authenticated, token expiry, has refresh token) |
forge://credits | Credit balance, usage, and plan information |
forge-optimizeGuided workflow for optimizing a GPU kernel. Instructs the agent to:
forge_optimize with appropriate parametersforge-analyzeTeaches the agent to scan a codebase for GPU optimization opportunities, ranked by expected impact:
| Priority | Pattern |
|---|---|
| HIGH | Custom autograd functions, attention mechanisms, fused operations |
| MEDIUM | Standard nn.Module compositions, normalization + activation fusion |
| LOW | Element-wise operations, simple reductions |
┌──────────────┐ stdio ┌──────────────────┐ HTTPS ┌──────────────────┐
│ AI Agent │ ──────────────>│ Forge MCP │ ──────────────>│ Forge API │
│ (Claude, │ │ Server │ │ (RightNow AI) │
│ Cursor, │<──────────────│ │<──────────────│ │
│ etc.) │ MCP result │ - OAuth + PKCE │ SSE stream │ - 32 swarm │
└──────────────┘ │ - SSE streaming │ │ agents │
│ - Token mgmt │ │ - Real GPU │
└──────────────────┘ │ benchmarking │
└──────────────────┘
forge_auth, which opens your browser. Sign in once, tokens are stored locally at ~/.forge/tokens.json and auto-refresh.forge_optimize. The MCP server POSTs to the Forge API and streams SSE events in real time.Each optimization costs 1 credit. Credits are only charged for successful runs (speedup >= 1.1x). Failed runs and cancelled jobs are not charged.
No API keys needed. The server uses OAuth 2.0 with PKCE for secure browser-based authentication:
forge_authdashboard.rightnowai.co~/.forge/tokens.json (mode 0600)Forge uses a pay-as-you-go credit system. Each optimization or generation run costs 1 credit.
| Credits | Price | Per Credit |
|---|---|---|
| 1-9 | $15.00 each | $15.00 |
| 10+ | 25% off | $11.25 |
| 50 | $562.50 | $11.25 |
| Enterprise | Custom volume pricing | Contact us |
Free trial: optimize 1 kernel, no credit card required.
100% refund guarantee: if Forge doesn't beat torch.compile, you get your credit back.
Purchase credits at dashboard.rightnowai.co.
End-to-end latency on NVIDIA B200. Forge vs torch.compile(mode='max-autotune-no-cudagraphs'):
| Model | torch.compile | Forge | Speedup |
|---|---|---|---|
| Llama-3.1-8B | 42.3ms | 8.2ms | 5.16x |
| Qwen2.5-7B | 38.5ms | 9.1ms | 4.23x |
| Mistral-7B | 35.2ms | 10.4ms | 3.38x |
| Phi-3-mini | 18.7ms | 6.8ms | 2.75x |
| SDXL UNet | 89.4ms | 31.2ms | 2.87x |
| Whisper-large | 52.1ms | 19.8ms | 2.63x |
| BERT-large | 12.4ms | 5.1ms | 2.43x |
See the full benchmarks at rightnowai.co/forge.
~/.forge/tokens.json with file mode 0600 (owner read/write only)max_iterations: 1-100)dashboard.rightnowai.co and forge-api.rightnowai.co~/.forge/tokens.jsongit clone https://github.com/RightNow-AI/forge-mcp-server.git
cd forge-mcp-server
npm install
npm run build
npm run dev
npm run typecheck
npx @modelcontextprotocol/inspector node dist/index.js
This opens a web UI where you can invoke each tool, inspect inputs/outputs, and debug the server interactively.
forge-mcp-server/
├── src/
│ ├── index.ts # Entry point (McpServer + StdioServerTransport)
│ ├── server.ts # Registers all tools, resources, prompts
│ ├── constants.ts # URLs, client IDs, timeouts, limits
│ ├── types.ts # TypeScript interfaces + type guards + sanitization
│ ├── auth/
│ │ ├── oauth-client.ts # PKCE flow, token refresh, access token management
│ │ └── token-store.ts # ~/.forge/tokens.json read/write/clear
│ ├── api/
│ │ ├── forge-client.ts # HTTP client for all Forge API endpoints
│ │ └── sse-consumer.ts # SSE stream parser via native fetch + ReadableStream
│ ├── tools/ # 7 MCP tools
│ ├── resources/ # 2 MCP resources
│ └── prompts/ # 2 MCP prompts
├── .github/workflows/
│ ├── ci.yml # Typecheck + build on push/PR
│ └── release.yml # npm publish on version tags
├── package.json
├── tsconfig.json
└── tsup.config.ts
Contributions are welcome. Please open an issue first to discuss what you'd like to change.
git checkout -b feature/my-feature)npm run typecheck and npm run buildPart of the RightNow AI ecosystem. Member of the NVIDIA Inception Program.
FAQs
MCP server for Forge GPU kernel optimization — generate and optimize Triton/CUDA kernels on real H100/A100 GPUs from any AI coding agent
The npm package @rightnow/forge-mcp-server receives a total of 46 weekly downloads. As such, @rightnow/forge-mcp-server popularity was classified as not popular.
We found that @rightnow/forge-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.