Skip to main content

umleitung is a flexible proxy server for FastMCP servers. It provides a unified endpoint for any number of sub-servers, with powerful tools for whitelisting/blacklisting which tools are exposed, and flexible configuration via YAML. This enables orchestration, tooling filtering, and dynamic proxying of local or remote FastMCP servers for development, deployment, or testing scenarios.

Project description

umleitung

umleitung is a flexible proxy server for FastMCP servers. It provides a unified endpoint for any number of sub-servers, with powerful tools for whitelisting/blacklisting which tools are exposed, and flexible configuration via YAML. This enables orchestration, tooling filtering, and dynamic proxying of local or remote FastMCP servers for development, deployment, or testing scenarios.


✨ Why use umleitung?

By using umleitung, you can bridge MCP servers that only support traditional stdio or sse protocols and instantly make them available to any protocol supported by FastMCP, such as streamable HTTP—even if the original server doesn’t have native support for those protocols!

MCP servers are often overlapping, providing multiple similar or identical tools. With umleitung's white/blacklist feature, you can pick and choose the best tools from each server for your workflow, creating a best-of toolbox and hiding redundant or less suitable options.

This means you can modernize and extend your existing FastMCP ecosystem with minimal changes, providing a universal access point for tools and workflows.


Features

  • Proxy any number of MCP sub-servers into a single FastMCP endpoint
  • Fine-grained control with allowedTools and blockedTools per proxied server
  • Simple YAML configuration
  • Designed for in-memory/integration testing and real deployment
  • Protocol bridging: Expose legacy MCP servers over HTTP, streaming, and more
  • Built-in support for FastMCP

Installation

pip install umleitung

Usage

Basic Proxy Configuration

Create a config file (e.g., proxy_config.yaml):

mcpServers:
  dummy:
    command: python
    args: [tests/dummy_server.py, dummy, foo, bar, baz]
    # allowedTools: [foo, bar]     # restrict to only these tools
    # blockedTools: [baz]          # block certain tools (mutually exclusive with allowedTools)

Run the proxy server:

python -m umleitung.proxy proxy_config.yaml

By default, it reads proxy_config.yaml if no file is specified.

Example: Dynamic Proxy & Tool Filtering

The proxy exposes only permitted tools on behalf of its sub-servers, controlled via allowedTools or blockedTools:

mcpServers:
  image_worker:
    command: python
    args: [run_image_worker.py]
    allowedTools: [resize_image, convert_format]  # only expose these
  text_worker:
    command: python
    args: [run_text_worker.py]
    blockedTools: [delete_text]         # expose all except these

Programmatic Usage

You can use the proxy logic in your own Python code:

from umleitung.proxy import load_config, build_proxy_server
import asyncio

async def main():
    config = load_config("proxy_config.yaml")
    proxy_server = await build_proxy_server(config)
    await proxy_server.run_async()

asyncio.run(main())

Testing

The repository contains pytest tests with dummy server example in the tests/ directory.

pytest

You can also use the dummy server directly, e.g.:

python tests/dummy_server.py dummy foo bar baz

License

MIT License. See LICENSE for full text.

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

umleitung-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

umleitung-0.1.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file umleitung-0.1.2.tar.gz.

File metadata

  • Download URL: umleitung-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.1.0

File hashes

Hashes for umleitung-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ecb7464199cafefca8331d23d974af255667a9d73ccd0000231adf308dc7d4bb
MD5 1167e5808000c699307b1e3457f51902
BLAKE2b-256 6699c8147bf62aef2a87820fb51c94793be9b6556fc18ae1a2f4b0f2a32ec9ac

See more details on using hashes here.

File details

Details for the file umleitung-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: umleitung-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.1.0

File hashes

Hashes for umleitung-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d60efb7282a12bbc03fa269e81064e4b95be42fe881638e16295ffcf8a59e2e1
MD5 437500881027c08635d5de52256b3bf7
BLAKE2b-256 e557b67c67ffa4c89c7855e695db996b9a8ac63c670752298de3ffa3e3fd6ab2

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