Forge Workspace MCP Server
A deliberately narrow, approval-gated workspace server that safely reads and writes files and runs allowlisted commands only inside one configured workspace, requiring visible approval for every write, process execution, and file read, with stale-overwrite protection and symlink-escape rejection.
README
Forge Product Agent
Forge is a local, interactive Python agent that helps turn an idea into a maintainable product. It starts with brainstorming, records an agreed product brief, proposes a small design, plans vertical slices, implements with tests, and verifies the result before calling it done.
The default configuration tries Groq first and automatically retries quota or rate-limit failures (HTTP 402/429) against the local LM Studio model identified as forge-local. The fallback remains active for the rest of that Forge process; restart Forge to try Groq again. Other provider errors remain visible so authentication and configuration mistakes are not hidden.
Its tools use the Model Context Protocol (MCP). The workspace server is deliberately narrow: it can only operate inside one configured workspace, hides common secret files, refuses stale overwrites, never invokes a shell, limits command families, and asks you to approve every write or process execution.
Forge also includes a separate read-only research MCP server. It can fetch bounded text from public HTTPS pages, inspect public GitHub repositories, and optionally search through Perplexity. Every network request shows its exact arguments and requires approval. The research process receives no model-provider credential and has no workspace tools.
Important: rotate the keys shared in chat
API keys pasted into a chat should be treated as exposed. Revoke the Groq and Hugging Face credentials previously shared, create replacements, and use only the replacements below. This repository contains no real key and does not load .env files.
Install on Windows
Forge requires Python 3.11 or newer.
py -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements-windows.lock
.\.venv\Scripts\python.exe -m pip install -e . --no-deps
$secret = Read-Host "Paste your NEW Groq API key" -AsSecureString
$env:GROQ_API_KEY = [System.Net.NetworkCredential]::new("", $secret).Password
.\.venv\Scripts\forge-agent.exe
To include optional Langfuse tracing, install requirements-windows-tracing.lock instead of the base lock file.
The default workspace is product_workspace. Forge creates it on first run.
Useful commands in the chat:
/helpshows commands./statusshows the provider, model, workspace, and session size./toolsshows the MCP tools and which ones require approval./save optional-namewrites a local session snapshot under.forge_agent/sessions./newclears the conversation after confirmation./quitexits.
For a one-off prompt:
.\.venv\Scripts\forge-agent.exe --message "Help me explore an idea for a meal planning app."
To check configuration without sending data to a model:
.\.venv\Scripts\forge-agent.exe --doctor
Local OpenAI-compatible endpoints
For another local service such as Ollama, add a provider section and select it:
[agent]
provider = "local"
model = "your-local-model"
[providers.local]
base_url = "http://127.0.0.1:11434/v1"
api_key_env = ""
Provider fallback is configured in [agent]:
provider = "groq"
model = "openai/gpt-oss-120b"
fallback_providers = ["local"]
[providers.local]
base_url = "http://127.0.0.1:1234/v1"
api_key_env = ""
model = "forge-local"
LM Studio must be running when fallback is needed. Forge announces each fallback in the terminal.
Interactive responses are labeled with the provider and API model identifier that actually produced them, for example forge [local/forge-local]>. The host also injects these runtime facts into every model request because a model's unsupported claims about its own identity are not reliable. Use /status for the authoritative provider and execution location.
Only loopback HTTP is allowed. Non-local providers must use HTTPS.
Safe public research
Direct URL and public GitHub research work without another API key. Ask Forge to research a public URL or repository; before any request leaves the computer, Forge displays the exact tool arguments and requires you to type yes.
Optional general web search uses Perplexity's Search API. It is disabled at call time until you provide a dedicated key:
$secret = Read-Host "Enter your Perplexity API key" -AsSecureString
$env:PERPLEXITY_API_KEY = [System.Net.NetworkCredential]::new("", $secret).Password
The token is passed only to the isolated research subprocess and only to https://api.perplexity.ai/search. Perplexity search is a paid external service; direct URL and public GitHub research remain available without it. To remove search from the tool entirely, use:
[research]
search_provider = "none"
To restrict direct page fetching to selected sites, configure an allowlist. Subdomains are included:
[research]
allowed_domains = ["python.org", "github.com"]
Research controls include HTTPS port 443 only, DNS resolution pinned to validated public addresses, private/local/reserved address rejection, redirect revalidation, response and timeout limits, an explicit content-type allowlist, no compression, no cookies, no JavaScript, and no browser or login state. HTML scripts, styles, templates, SVG, and other active content are removed before text reaches the model.
Optional privacy-first Langfuse tracing
Langfuse tracing is disabled by default and does not affect normal Forge operation. When enabled, Forge records one trace per user turn, groups turns into a session, and adds child observations for model generations and tool decisions. The default capture_content = false records only provider/model identity, local-or-remote execution, timing, token counts when supplied by the model endpoint, tool names, approval outcomes, and error types. It does not send prompts, responses, file contents, tool arguments, or tool results.
Install the pinned optional dependency snapshot:
.\.venv\Scripts\python.exe -m pip install -r requirements-windows-tracing.lock
.\.venv\Scripts\python.exe -m pip install -e . --no-deps
Set all three values only in the current PowerShell process. Use the base URL for the Langfuse region where the project was created:
$publicKey = Read-Host "Langfuse public key"
$secretKey = Read-Host "Langfuse secret key" -AsSecureString
$env:LANGFUSE_PUBLIC_KEY = $publicKey
$env:LANGFUSE_SECRET_KEY = [System.Net.NetworkCredential]::new("", $secretKey).Password
$env:LANGFUSE_BASE_URL = "https://us.cloud.langfuse.com"
Then set enabled = true under [tracing] in forge.toml and run forge-agent.exe --doctor. Allowed cloud destinations are pinned in tracing.allowed_hosts; remote HTTP, URL credentials, query strings, fragments, and unlisted hosts are rejected. The Langfuse client uses a private OpenTelemetry provider, is never exposed as an MCP tool, and its credentials are never passed to either MCP subprocess. Forge flushes traces on exit and continues working if tracing cannot initialize or export.
Setting capture_content = true is an explicit privacy tradeoff. A defense-in-depth masker redacts common credential fields and token formats, but it cannot guarantee removal of every sensitive value. Keep metadata-only mode for normal use.
What “safe MCP” means here
- Only the two bundled, reviewed stdio servers are loaded. There is no one-click installation of registry servers or remote MCP transport.
- Both MCP subprocesses get intentionally small environments. Neither receives a model-provider API key; the research process may receive only
PERPLEXITY_API_KEYwhen explicitly configured. - Langfuse is an optional host-side observer, not an MCP server. It receives metadata only by default and never receives Forge's model-provider keys.
- Only eight exact tool names reach the model. Server descriptions and descriptive schema annotations are discarded; the host supplies short, trusted descriptions.
- All results are treated as untrusted data. Writes, commands, and every outbound research request require an exact, visible approval each time. A remote model also needs approval before reading each workspace file.
- Existing files can be changed only after reading them and supplying their current SHA-256 digest.
- File access is rooted, symlink escapes are rejected, and common credential paths and key formats are denied.
- Commands use an argument array with
shell=False. Safe mode permits Python syntax compilation and read-only Git inspection, but blocks project tests, linters, build tools, and npm scripts.
Safe mode is the default:
[workspace]
allow_project_code_execution = false
For a project you have personally reviewed and trust, setting this to true enables the allowlisted test commands. This is not an operating-system sandbox: enabled tests execute with your user permissions. Use a disposable VM or container for untrusted repositories. See SECURITY.md for the threat model.
Design choices
Forge borrows the productive parts of the Superpowers workflow—Socratic brainstorming, explicit design approval, small plans, test-first implementation, review, and evidence before completion—without installing its full plugin framework. It uses the official MCP Python SDK instead of maintaining a private protocol implementation. Model providers and public research endpoints are called with Python's standard library, avoiding separate provider, search, HTML, and GitHub SDK dependencies.
Develop and test
.\.venv\Scripts\python.exe -m unittest discover -s tests -v
.\.venv\Scripts\python.exe -m compileall -q src tests
Architecture, research, and extension guidance live in docs/ARCHITECTURE.md, docs/RESEARCH.md, and docs/ADDING_MCP.md.
Release history is recorded in CHANGELOG.md.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。