Skip to main content

Standalone MCP proxy service — manages persistent connections to external MCP servers

Project description

slife-mcp

Standalone MCP proxy service — manages persistent connections to external MCP servers and exposes them through a single MCP endpoint.

Quick Start

pip install slife-mcp

# Run — auto-detects mode:
slife-mcp                      # with slife.json5 → HTTP, without → stdio
slife-mcp --port 8888          # HTTP on custom port

How It Works

MCP clients ←→ slife-mcp ←→ external MCP servers (filesystem, search, ...)

slife-mcp maintains persistent connections to external MCP servers. Clients connect to slife-mcp and get access to all tools from all connected servers through a single endpoint.

Configuration

Create slife.json5 in your working directory:

{
  mcp: {
    // wrapper.url — where clients connect to slife-mcp
    wrapper: {
      url: "http://127.0.0.1:9876/mcp",
    },

    // External MCP servers to auto-connect at startup
    servers: {
      filesystem: {
        command: "npx",
        args: ["-y", "@modelcontextprotocol/server-filesystem", "/allowed/path"],
      },
      serper: {
        command: "npx",
        args: ["-y", "serper-search-scrape-mcp-server"],
        env: {
          SERPER_API_KEY: "${SERPER_API_KEY}",
        },
      },
    },
  },
}

Management Tools

Once running, clients can call these tools to manage connections:

Tool Description
mcp_add_server Add and connect to an external MCP server at runtime
mcp_remove_server Disconnect and remove a server
mcp_list_servers List all configured servers with status
mcp_list_tools List all tools from connected servers
mcp_call_tool Call a tool on a connected server
mcp_reload Reconnect to refresh tool lists

Transport Modes

Mode Trigger Use case
HTTP TTY (terminal) Standalone service, shared by multiple clients
stdio Piped stdin Child process, used by slife agent

HTTP mode is auto-detected when run from a terminal with slife.json5 present. stdio mode is used when spawned as a child process.

License

MIT

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

slife_mcp-0.1.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

slife_mcp-0.1.1-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slife_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.5

File hashes

Hashes for slife_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 837e722a15e4f962d0b86c1b07cd81076d86e8838af31be98790eecb82e5670a
MD5 b8273b78acff9da5fbb4bf8f704b1777
BLAKE2b-256 f2defc953ec52148224a36883eeddb2fc2b8b182cd62489fe55e0f87a6db307f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slife_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.5

File hashes

Hashes for slife_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df140a57d56be3194d3d477f1d1ce8ae2309aa310a62fe3c6fbcfe89213bbe63
MD5 d7f25072d45e20465faae4ff915fca69
BLAKE2b-256 be7f483bb8393c4a5963cc050a2fd6635e7d35b35fe96a71236c2e84bf54b5a9

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