Skip to main content

No project description provided

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.2.0.tar.gz (4.6 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.2.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: umleitung-0.2.0.tar.gz
  • Upload date:
  • Size: 4.6 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.2.0.tar.gz
Algorithm Hash digest
SHA256 97ab089e809c0ac4320b68d09b13f2308925340dc49d867dc548a53afd286e2b
MD5 d43b374067d4c3b0d03a66a0e5481d20
BLAKE2b-256 a4efaab59791ea64fe03433d0757d5224b9906082a5a0b79139b32b9c4075cef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: umleitung-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fb79accf5500fb938683875fe127952e3cf3212423a635a3f7fe9b15106530d
MD5 1cdb180fd6447c28e8f888a52a9cb018
BLAKE2b-256 bd0a95b90a1ca83f29d4bef727f1af863168fd173f898900cb89a9aa8f3712f3

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