ToolForge MCP Server
Provides sandboxed execution of tools in ephemeral Docker containers for security.
Exposes the ToolForge platform as a FastAPI server with REST API endpoints for tool listing, execution, batch execution, job management, and API key issuance.
Provides tools for reading git repository status, diffs, and logs.
Provides GitHub-related tools for searching repositories, fetching files, managing issues, and interacting with GitHub Actions.
Adapts ToolForge tools into LangGraph-compatible tool wrappers with synchronous and asynchronous invoke methods for use in LangGraph agent graphs.
Converts ToolForge tools into OpenAI function-calling schemas and provides a parser to execute tool calls from OpenAI-compatible responses.
Used for storing audit logs and other persistence within the ToolForge infrastructure.
Exposes metrics via a /metrics exporter for monitoring the ToolForge runtime.
Used for rate limiting and caching within the ToolForge infrastructure.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ToolForge MCP ServerList all available web tools and execute web_search for 'MCP servers'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
โ๏ธ ToolForge
Agent Tool Infrastructure & MCP Platform
A production-grade runtime that gives AI agents governed, observable, and secure access to tools.
What is ToolForge?
Modern AI agents call tools as raw function calls โ with no governance, no observability, and no reliability guarantees. ToolForge fills that gap.
It acts as a secure execution gateway between your AI agent and the outside world, providing a full lifecycle for every tool invocation:
Stage | What it does |
๐ Discover | Semantic registry with semver, categories, and full-text search |
โ Validate | Auto-generated JSON Schema from Python type hints via Pydantic v2 |
๐ Authorize | Capability-based RBAC permissions checked before every execution |
โก Execute | Async-first runtime with timeouts, retries, and sandboxing |
๐ Observe | Structured |
๐ Expose | MCP stdio & HTTP, LangGraph adapter, OpenAI function calling schemas |
Related MCP server: SentinelGate
Architecture
flowchart LR
subgraph Clients["Clients"]
A1["๐ค AI Agent"]
A2["๐ฅ๏ธ Claude Desktop"]
A3["โก Cursor / IDE"]
A4["๐ REST API"]
end
subgraph Gateway["ToolForge Gateway"]
direction TB
B["๐ Auth Layer\nAPI Key ยท JWT"]
C["๐ก๏ธ RBAC Engine\nRoles ยท Capabilities"]
D["โฑ๏ธ Rate Limiter\nSliding Window"]
B --> C --> D
end
subgraph Runtime["Execution Runtime"]
direction TB
E["๐ Input Validation\nJSON Schema ยท Pydantic"]
F["๐ Sandbox\nDocker ยท Subprocess"]
G["๐ Retry + Timeout\nExponential Backoff"]
H["๐ฆ ToolResult\nID ยท Latency ยท Error"]
E --> F --> G --> H
end
subgraph Registry["Tool Registry"]
direction TB
I["๐ 26 Standard Tools\nSemver ยท Categories"]
J["๐ Semantic Search\nFull-Text + Category"]
I --- J
end
subgraph Infra["Infrastructure"]
K[("๐ PostgreSQL\nAudit Logs")]
L[("โก Redis\nRate Limits ยท Cache")]
M["๐ Prometheus\n/metrics exporter"]
end
Clients --> Gateway
Gateway --> Runtime
Runtime --> Registry
Runtime --> InfraQuick Start
Install:
git clone https://github.com/your-username/toolforge
cd toolforge
pip install -e .Register and execute a custom tool:
import asyncio
from toolforge import ToolForge
tf = ToolForge()
@tf.tool(
name="calculate_tax",
description="Calculate income tax for a given gross income and rate.",
version="1.0.0",
category="finance",
)
def calculate_tax(income: float, rate: float = 0.2) -> float:
return income * rate
async def main():
result = await tf.execute("calculate_tax", {"income": 120_000.0, "rate": 0.28})
print(result.status.value) # 'success'
print(f"${result.result:,.2f}") # '$33,600.00'
print(result.execution_id) # UUID for tracing
asyncio.run(main())Load all 26 standard tools in one line:
from toolforge import ToolForge
tf = ToolForge.with_standard_tools()Standard Tool Ecosystem โ 26 Tools
Category | Tools |
๐ Web |
|
๐ Files |
|
๐ Data |
|
๐๏ธ Database |
|
๐ฟ Git |
|
๐ GitHub |
|
๐ Code |
|
๐ง AI |
|
Core Features
Custom Tool Registration
from toolforge import tool, RetryPolicy, StandardCapability
@tool(
name="fetch_stock_price",
description="Fetch live stock price from market API.",
version="1.0.0",
category="finance",
capabilities=[StandardCapability.NETWORK.value],
timeout=10.0,
retry_policy=RetryPolicy(max_retries=3, initial_delay_sec=0.5),
)
async def fetch_stock_price(ticker: str) -> dict:
"""Fetch stock data for given ticker symbol."""
return {"ticker": ticker, "price": 185.42}Structured Tool Results
Every execution returns a fully typed ToolResult โ no raw dicts, no guessing:
result = await tf.execute("web_search", {"query": "python asyncio"})
result.execution_id # UUID โ for distributed tracing
result.tool_name # "web_search"
result.tool_version # "1.0.0"
result.status # SUCCESS | FAILED | TIMEOUT | PERMISSION_DENIED
result.result # structured output
result.error # ToolErrorInfo(code, message, retryable)
result.duration_ms # wall-clock latency
result.retry_count # retries attempted before success
result.unwrap() # raises RuntimeError on failure, else returns resultCapability-Based Permissions
from toolforge import PermissionContext
ctx = PermissionContext(
caller_id="research_agent",
granted_capabilities={"network", "filesystem_read"},
)
# โ
Tool requires 'network' โ succeeds
result = await tf.execute("web_search", {"query": "AI"}, context=ctx)
# โ Tool requires 'code_execution' โ returns PERMISSION_DENIED, never raises
result = await tf.execute("python_execute", {"code": "..."}, context=ctx)
print(result.status.value) # 'permission_denied'MCP Protocol Integration
Expose all 26 tools to Claude Desktop, Cursor, or any MCP-compatible client with zero configuration.
Stdio transport (for Claude Desktop / Cursor):
import asyncio
from toolforge import ToolForge
tf = ToolForge.with_standard_tools()
mcp = tf.create_mcp_server(server_name="my-toolforge")
asyncio.run(mcp.run_stdio())Or directly via CLI:
python -m toolforge.integrations.mcpHTTP transport (for remote agents):
# POST /mcp โ JSON-RPC 2.0
curl -X POST http://localhost:8000/mcp \
-H "X-API-Key: tf-..." \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'MCP methods implemented:
Method | Description |
| Capability handshake with client info |
| Dynamic schema discovery for all tools |
| Executes tool through ToolForge runtime (RBAC + retry) |
| Spec-compliant resource listing |
| Spec-compliant prompt listing |
| Heartbeat keepalive |
LangGraph & OpenAI Adapters
LangGraph:
tools = tf.to_langgraph_tools() # List[LangGraphToolWrapper]
# graph = create_react_agent(llm, tools)Each wrapper supports .invoke() (sync) and .ainvoke() (async) with args_schema for type validation.
OpenAI function calling:
openai_tools = tf.to_openai_tools(category="web")
# โ [{"type": "function", "function": {"name": ..., "parameters": {...}}}]
from toolforge import parse_openai_tool_call
tool_name, args = parse_openai_tool_call(tool_call_obj)
result = await tf.execute(tool_name, args)Enterprise Security
Initialize the hardened SecuredToolForge client:
from toolforge import SecuredToolForge, Role, RateLimitConfig
tf = SecuredToolForge.with_standard_tools(
rate_limit_config=RateLimitConfig(requests_per_minute=60),
circuit_failure_threshold=5,
circuit_recovery_timeout_sec=30.0,
)
# Issue scoped API keys per role
dev_key = tf.api_keys.issue_key(user_id="alice", role=Role.DEVELOPER)
agent_key = tf.api_keys.issue_key(user_id="bob", role=Role.AGENT)
# Execute with key-based auth and RBAC enforcement
result = await tf.execute("python_execute", {"code": "print('hello')"}, api_key=dev_key)
# Query auto-redacted audit events
events = tf.audit.get_events(caller_id="alice")Security features at a glance:
๐ Authentication โ SHA-256 hashed API key store + signed JWT bearer tokens
๐ฅ RBAC Hierarchy โ
admin > developer > agent > viewerwith per-category capability enforcementโฑ๏ธ Rate Limiting โ Sliding-window per-user and per-tool limits (in-memory or Redis)
๐ Circuit Breaker โ
CLOSED โ OPEN โ HALF_OPENprotecting against cascading failures๐ณ Sandboxed Execution โ Ephemeral Docker containers (CPU/memory caps, read-only rootfs, no networking); graceful subprocess fallback
๐ Audit Logging โ Structured JSON events with automatic secret/token redaction
FastAPI Platform Server
Start the server:
uvicorn toolforge.server:app --host 0.0.0.0 --port 8000 --workers 4Complete REST API:
Method | Endpoint | Description |
|
| Liveness probe |
|
| Readiness probe with DB verification |
|
| List tools with search & category filters |
|
| Full JSON Schema for a specific tool |
|
| Synchronous tool execution |
|
| Batch execute multiple tools |
|
| Enqueue async background job |
|
| Poll job status & result |
|
| Issue scoped API keys |
|
| Issue JWT access tokens |
|
| Query historical execution records |
|
| JSON metrics summary |
|
| Prometheus text exposition format |
|
| Remote MCP JSON-RPC 2.0 |
|
| MCP Server-Sent Events stream |
Observability Dashboard
Navigate to http://localhost:8000/ for a live glassmorphism SPA dashboard:
๐ KPI Metrics Hub โ Real-time execution volume, success rates, and p95 latencies
๐ Tool Explorer โ Searchable grid across all 8 categories with full JSON schema inspector
๐งช Interactive Playground โ Execute any tool live with formatted response and latency benchmarks
๐ Live Audit Stream โ Execution history with expandable sanitized request/response inspection
๐ MCP Protocol Hub โ Connection guides for Cursor & Claude Desktop + JSON-RPC 2.0 tester
๐ Security Panel โ Issue API keys and JWT tokens directly from the browser
Autonomous Agent Demo
ToolForge ships a built-in Autonomous Repository Debugger that resolves bugs entirely on its own through the secured runtime:
python examples/repo_debugger_agent.pyThe agent executes a 6-step autonomous loop:
Step 1 discover โ directory_list + file_search find project structure
Step 2 reproduce โ python_execute run failing tests
Step 3 inspect โ file_read read buggy source
Step 4 patch โ file_write apply autonomous fix
Step 5 verify โ python_execute re-run tests โ green
Step 6 report โ structured summary root cause + timingOutput:
[REPORT] AGENT RESOLUTION SUMMARY
Total Steps: 6
Total Runtime: 249.6ms
Root Cause: Unhandled division by zero in calculator.py
Resolution: Patched divide() with explicit ValueError guard
Final Status: RESOLVEDProduction Deployment
Docker Compose (FastAPI Server + PostgreSQL 16 + Redis 7):
docker compose up --buildURL | Description |
| Web dashboard |
| Swagger / OpenAPI docs |
| Health check |
| Prometheus metrics |
CI/CD โ GitHub Actions
Every push runs a 4-job pipeline:
Lint (ruff) โ Test Matrix (3 OS ร 3 Python) โ Agent Smoke Test โ Docker BuildJob | Details |
Lint |
|
Test Matrix | Ubuntu ยท Windows ยท macOS ร Python 3.11 ยท 3.12 ยท 3.13 = 9 environments |
Agent Demo | Full autonomous agent run end-to-end |
Docker Build | Multi-stage image build with GHA layer cache |
Testing
# Run all 86 tests (unit, integration, API, agent)
python -m pytest tests/ -v86 passed in 6.89sProject Phases
Phase | Status | What Was Built |
1 โ Core SDK | โ Complete |
|
2 โ Tool Ecosystem | โ Complete | 26 standard tools, MCP stdio server, LangGraph + OpenAI adapters |
3 โ Security | โ Complete | Docker sandbox, RBAC, API keys, JWT, rate limiter, circuit breaker, audit log |
4 โ FastAPI + Workers | โ Complete | REST API, PostgreSQL/SQLite, async job queue, MCP HTTP/SSE |
5 โ Dashboard | โ Complete | Glassmorphism SPA, Prometheus metrics, live playground |
6 โ Demos & CI/CD | โ Complete | Autonomous agent, Docker Compose stack, GitHub Actions 9-env matrix |
Tech Stack
Python 3.11+ ยท FastAPI ยท Pydantic v2 ยท SQLAlchemy 2.0 ยท PostgreSQL ยท Redis ยท Docker ยท MCP Protocol ยท LangGraph ยท Prometheus
Contributing
Contributions are welcome. See CONTRIBUTING.md for guidelines.
Built with Python 3.11+, Pydantic v2, FastAPI, SQLAlchemy 2.0, and async-first patterns throughout.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenancePolicy-enforcing MCP proxy that blocks dangerous tool calls before they execute. Protects credentials, filesystem, shell, and databases across Claude Desktop, Cursor, Windsurf, and OpenClaw.1336Apache 2.0

SentinelGateofficial
AlicenseNot gradedqualityAmaintenanceOpen-source MCP proxy that enforces security policies, content scanning, and audit logging between AI agents and tool servers25AGPL 3.0- AlicenseNot gradedqualityDmaintenanceA production-grade MCP server designed for multi-tenant, authenticated, and observable AI agent systems, enabling secure tool execution across heterogeneous data sources.57MIT
- AlicenseAqualityBmaintenanceStart, observe, and interact with Claude Managed Agents from any MCP client โ launch an agent, watch its events, reply, approve the tools it wants to run, and stop it. Runs over stdio, HTTP, or AWS Lambda with pluggable auth.171MIT
Related MCP Connectors
Runtime permission, approval, and audit layer for AI agent tool execution.
Real-time chat hub for AI agents โ Claude Code, Cursor, Cline, Codex over MCP or REST.
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Abhigyan6091/ToolForge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server