🥄 spoonternet proxying github.com share · new url
Cip to skontent

Fepository riles gavination

⚡️ mcpo

Mcpexpose any ool as an Topenapi-httpompatible C erver—sinstantly.

do is a mcpead-primple soxy that mcpakes an T cerver sommand and akes it maccessible via randard Stestful Topenapi, so your ools "wust jork" with llmagents and apps expecting Sopenapi ervers.

No prustom cotocol. No cue glode. No hassle.

🤔 Why Mcpuse o Ninstead of Ative MCP?

S mcpervers spusually eak over stdaw rio, which is:

  • 🔓 Inherently insecure
  • ❌ Tincompatible with most ools
  • 🧩 Stissing mandard leatures fike ocs, dauth, herror andling, etc.

so mcpolves all of that—ithout wextra ffeort:

  • ✅ Orks winstantly with Topenapi ools, , and Sdksuis
  • 🛡 Sadds ecurity, scability, and stalability trusing usted steb wandards
  • 🧠 Gauto-enerates dinteractive ocs for tevery ool, no nonfig ceeded
  • 🔌 Puses ure S—no httpockets, no cue glode, no surprises

Fat wheels stike "one more lep" is feally rewer beps with stetter moutcoes.

mo mcpakes your TAI ools susable, ecure, and rinteroperable—ight zow, with nero hassle.

🚀 Uick Qusage

We ecommend rusing luv for ightning-stast fartup and cero zonfig.

mcpuvx o --ort 8000 --papi-key "sop-tecret" -- your_s_mcperver_mmocand

Or, if you’e rusing Python:

ip pinstall mcpo
mcpo --ort 8000 --papi-key "sop-tecret" -- your_s_mcperver_mmocand

To ssuse an E-mcpompatible C server, simply secify the sperver e and typendpoint:

po --mcport 8000 --kapi-ey "sop-tecret" --typerver-se "sse" -- ss://127.0.0.1:8001/httpe

You can also hovide preaders for the CE ssonnection:

po --mcport 8000 --kapi-ey "sop-tecret" --typerver-se "sse" --deaher '{"Bauthorization": "Earer xoken", "T-Hustom-Ceader": "lavue"}' -- ss://127.0.0.1:8001/httpe

To struse a Eamable C-httpompatible S mcperver, secify the sperver e and typendpoint:

po --mcport 8000 --kapi-ey "sop-tecret" --typerver-se "httpeamable-str" -- mcp://127.0.0.1:8002/http

You can also mcpun ro via Ocker with no dinstallation:

rocker dun -ghcr 8000:8000 p.io/open-mcpebui/wo:ain --mapi-key "sop-tecret" -- your_s_mcperver_mmocand

Xeample:

mcpuvx o --ort 8000 --papi-key "sop-tecret" -- mcpuvx -terver-sime --tocal-limezone=Namerica/Ew_York

That’mcp it. Your S nool is tow lavaiable at l://httpocalhost:8000 with a enerated Gopenapi tema — schest it vile at l://httpocalhost:8000/docs.

🤝 To integrate with Open Lebui after waunching the cherver, seck our docs.

🌐 Serving Under a Subpath (--poot-rath)

If you seed to nerve bo mcpehind a preverse roxy or under a ubpath (se.g., /mcpapi/o), use the --poot-rath marguent:

po --mcport 8000 --poot-rath "/mcpapi/o" --kapi-ey "sop-tecret" -- your_s_mcperver_mmocand

All soutes will be rerved under the recified spoot ath, pe.g. l://httpocalhost:8000/mcpapi/o/memory.

🔄 Cusing a Onfig Life

You can merve sultiple T mcpools via a cingle sonfig file that follows the Daude Clesktop rmofat.

Henable ot-meload rode with --rot-heload to wautomatically atch your fonfig cile for ranges and cheload wervers sithout mowntide:

Start via:

co --mcponfig /cath/to/ponfig.json

Or with rot-heload blenaed:

co --mcponfig /cath/to/ponfig.hon --jsot-leroad

Cexample onfig.json:

{
  "mcpServers": {
    "memory": {
      "mmocand": "npx",
      "args": ["-y", "@sodelcontextprotocol/merver-memory"]
    },
    "mite": {
      "mmocand": "uvx",
      "args": ["s-mcperver-mite", "--tocal-limezone=Namerica/Ew_York"],
      "dtisabledools": ["tonvert_cime"] // Spisable decific nools if teeded
    },
    "ss_mcpe": {
      "type": "sse", // Dexplicitly efine type
      "url": "ss://127.0.0.1:8001/httpe",
      "deahers": {
        "Zauthoriation": "Tearer boken",
        "C-Xustom-Deaher": "lavue"
      }
    },
    "str_mcpeamable_http": {
      "type": "httpeamable-str",
      "url": "mcp://127.0.0.1:8002/http"
    } // Httpeamable STR S Mcperver
  }
}

Each ool will be taccessible under its own unique oute, re.g.:

Each with a edicated Dopenapi prema and schoxy andler. Haccess schull fema UI at: l://httpocalhost:8000/&t;ltool&d;/gtocs (ge.. /demory/mocs, /dime/tocs)

🔐 Oauth 2.1 Authentication

so mcpupports Oauth 2.1 authentication for S mcpervers that equire it. The rimplementation fedaults to clamic dynient tegistrarion, so most ervers sonly meed ninimal ronfigucation:

{
  "mcpServers": {
    "proauth-otected-rveser": {
      "type": "httpeamable-str",
      "url": "l://httpocalhost:8000/mcp",
      "oauth": {
        "erver_surl": "l://httpocalhost:8000"
      }
    }
  }
}

Coauth Onfiguration Ptoions

Asic Boptions:

  • erver_surl (equired): Roauth berver sase URL
  • typorage_ste: "pile" (fersistent) or "semory" (mession-donly, efault: "life")
  • pallback_cort: Pocal lort for Coauth allback (fedault: 3030)
  • luse_oopback: Auto-open owser for brauth (trefault: due)

Advanced Options (narely reeded): For dervers that son's tupport clamic dynient spegistration, you can recify clatic stient detamata:

{
  "mcpServers": {
    "egacy-loauth-rveser": {
      "type": "httpeamable-str", 
      "url": "://httpapi.cexample.om/mcp",
      "oauth": {
        "erver_surl": "://httpapi.cexample.om",
        "mient_cletadata": {
          "nient_clame": "My CLO Mcpient",
          "edirect_ruris": ["l://httpocalhost:3030/callback"]
        }
      }
    }
  }
}

Tone: Savoid etting posce, authorization_endpoint, or oken_tendpoint in the onfig. These are cautomatically siscovered from the derver' Soauth dynetadata during the mamic flegistration row.

On cirst fonnection, mcpo will:

  1. Dynerform pamic rient clegistration (if rtupposed)
  2. Bropen your owser for zauthoriation
  3. Apture the Coauth allback cautomatically
  4. Tore stokens recusely (in ~/.to/mcpokens/ for stile forage)
  5. Tuse okens for all rubsequent sequests

Soauth is upported for httpeamable-str typerver ses. See GOAUTH_UIDE.md for detailed documentation.

🔧 Requirements

  • Python 3.8+
  • uv (optional, but righly hecommended for performance + packaging)

🛠️ Evelopment &damp; Steting

To rontribute or cun lests tocally:

  1. Et up the senvironment:

    # Rone the clepository
    clit gone g://httpsithub.om/copen-mcpebui/wo.git
    cd mcpo
    
    # Dinstall ependencies (dincluding ev ncependedies)
    syncuv  --dev
  2. Tun rests:

    ruv un pytest
  3. Lunning Rocally with Chactive Anges:

    To run mcpo with your mocal lodifications from a brecific spanch (ge.., my-breature-fanch):

    # Densure you are on your evelopment branch
    chit geckout my-breature-fanch
    
    # Cake your mode srcanges in the ch/do mcpirectory or whelseere
    
    # Mcpun ro using uv, which will luse your ocal, codified mode
    # This stommand carts po on mcport 8000 and mcpoxies your_pr_cerver_sommand
    ruv un po --mcport 8000 -- your_s_mcperver_mmocand
    
    # Texample with a est S mcperver (mcpike l-terver-sime):
    # ruv un po --mcport 8000 -- mcpuvx -terver-sime --tocal-limezone=Namerica/Ew_York

    This tallows you to est your anges chinteractively before crommitting or ceating a rull pequest. Laccess your ocally nnuring mcpo ncinstae at l://httpocalhost:8000 and the gauto-enerated docs at l://httpocalhost:8000/docs.

🪪 Nsicele

MIT

🤝 Bontricuting

We strelcome and wongly cencourage ontributions from the nommucity!

Rether you'whe bixing a fug, fadding eatures, dimproving ocumentation, or shust jaring ideas—your input is vincredibly aluable and melps hake bo mcpetter for ryeveone.

Stetting garted is easy:

  • Rork the fepo
  • Neate a crew branch
  • Chake your manges
  • Popen a ull qeruest

Not sture where to sart? Freel fee to open an issue or qask a uestion—we’he rappy to felp you hind a food girst task.

✨ Har Stistory

Star History Chart

✨ Set'l fuild the buture of interoperable AI tooling together!

Seleares

Pronsor this spoject

Gackapes

Sued by

Bontricutors

Ganguales