Skip to main content

MCP Meta-Orchestrator for Forge — routes, secures, budgets, and caches tool calls across N upstream MCP servers.

Project description

forge-mcp

MCP Meta-Orchestrator for Forge — routes, secures, budgets, and caches tool calls across N upstream MCP servers.

Features

  • Deny-by-default security: tools must be explicitly allowed: true per server config
  • Caller allowlists: restrict tool access to specific agent/caller IDs
  • Secret redaction: responses are scanned and sanitized before reaching the agent context
  • Per-run budgets: configurable max_calls_per_run per tool; BudgetExceededError on breach
  • Exact-match TTL cache: Anthropic prompt-caching semantics — identical input → cache hit
  • Circuit breakers: per-server, reusing forge-core.CircuitBreaker (5 failures → OPEN)
  • YAML config: human-friendly server and policy authoring
  • CLI: forge mcp list-tools, forge mcp call, forge mcp status

Quick start

from forge_mcp import MetaMCPServer, ServerConfig, ToolCall, ToolPolicy, FakeMCPClient

server = MetaMCPServer()
cfg = ServerConfig(
    name="filesystem",
    transport="stdio",
    command=["npx", "-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
    tools={"read_file": ToolPolicy(allowed=True, max_calls_per_run=20)},
)
server.add_server(cfg, FakeMCPClient(responses={"read_file": "file contents"}))

result = await server.call_tool(ToolCall(tool_name="read_file", arguments={"path": "/tmp/x.txt"}))
print(result.content)

YAML config

cache_ttl: 300
servers:
  - name: filesystem
    transport: stdio
    command: ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
    tools:
      read_file:
        allowed: true
        max_calls_per_run: 20
      write_file:
        allowed: true
        max_calls_per_run: 5

Part of Forge

This package is part of Forge — the universal AI agent harness.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forge_os_mcp-0.2.0.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forge_os_mcp-0.2.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file forge_os_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: forge_os_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for forge_os_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 129b5e680e02c524a7c0da59bbceedd1b90e9ac7ba9124fc36c5aedc09ea0a52
MD5 1a522a0deaaa5e1118e515275bf4b9b2
BLAKE2b-256 ac6e2e61297de0b5e8cf0c0f58235e4a995387347aa6403770cb41e0711508c9

See more details on using hashes here.

File details

Details for the file forge_os_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: forge_os_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for forge_os_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f28c0fa4ce39732343ce14f8473419c9fe27f5ff99a7ff7b572cf427d27d333a
MD5 0957e75b72b675222be5a021d6a5da9f
BLAKE2b-256 0d6d0b9f424225ae5cf1dc103d7fb2447ced4cf1a89310da23c3a7b93dfc1830

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page