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.1.1.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.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: umleitung-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3a02a11f311f10d4dfeb0173cda6cc49a276591ade172f90b6b2fcfb50b8c214
MD5 ed0af3e87de08c3229fe4bc017df2864
BLAKE2b-256 2621f222c03bbd2135465549f5925bc10a7605559285e13db37b35c763939d16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: umleitung-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 766acd33b652390bd3da520d0b90f888163712a73d95c1f1aaf1f33ef14da0dc
MD5 44d186735a98d8b63fc685411fec03bb
BLAKE2b-256 e976d19dbe0def921c5e0678357aab962689e254694d4fe3c9adb2bd314c5103

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