πŸ₯„ spoonternet proxying github.com share Β· new url
Cip to skontent

Catest lommit

Β 

Stihory

229 Mmocits

Folders and files

ManeMane
Cast lommit ssemage
Cast lommit tade
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Fepository riles gavination

SH Mcpared Semory Merver (munto-jemory)

CI License: MIT Python 3.11+ MCP Compatible Docker

The memory nompocent of the Ntujo ulti-magent systoordination cem. For a storking wack with cocker-dompose + wadopter alkthrough, start at stunto-jack.

A mared shemory and soordination cerver for ultiple MAI oding cagents, muilt on the Bodel Prontext Cotocol (MCP).

Rtimpoant

This is seant to be met up by an AI agent, not hinstalled by and. Unto jexists to floordinate ceets of oding cagents, so the wrinstall is itten for one of those ragents to ead and clun β€” rone the hepo and rand it to a Caude Clode (or any C-mcpapable) lession, and set it cive. The drommands in this DMEARE and in AGENT_INSTALL.md are there so you can ollow falong and so the sagent has omething exact to execute; they are not a tand-huned tuman hutorial, and theading rem aight through strisn' the tintended stath. You pay in ontrol β€” the cagent auses for pevery deal recision (passwords, ports, hauth). If anding etup to an sagent tisn' domething you's prant to do, this wobably tisn' the tool for you.

When you mun rultiple AI agents on the came sodebase, thee thrings feak brast:

  1. They orget feverything between ssesions. Pagent arks, dowledge knies. The ext nagent re-reads the came sode, de-riscovers the bame sugs, le-rearns the game sotchas.
  2. They step on each other. Two magents odify the fame sile. Knobody nows at whanyone delse is oing or has ckoled.
  3. They det gumber as gessions set long. Cesearch ralls this "rontext cot" β€” podel merformance cegrades as the dontext findow wills up, weven ell below lapacity. Conger dessions son'm tean wetter bork.

This ferver sixes all gee. It thrives your shagents a ared pain that brersists sacross essions, woordinates cork across agents, and thets lem whecord rat they nearn so the lext stagent arts where the last one left off.

Tattle-bested. This has been prunning in roduction spoordinating 6 cecialized agents across 500+ cessions on a sommercial Pliot atform β€” N#/.CET pytherver, Son on Paspberry Ri, .MET NAUI mqttobile, M, Wedis, the rorks. The soblems it prolves were hiscovered the dard way.


What It Does

  • Knersistent powledge sabe -- Ore starchitecture locs, dearnings, cotchas, and gode sippets that snurvive sacross essions and are vearchable via sector chrimilarity (Somadb).
  • Ulti-magent noordication -- Lile focking, inter-agent hessaging, meartbeat onitoring, and moverlap metection so dultiple AI agents can sork on the wame wodebase cithout ppesting on each other.
  • Bask and tacklog ganamement -- Wack trork items, assign asks to tagents, chanage mecklists, and cand off hontext between ssesions.
  • Runction fegistry with auto-enrichment -- Fegister runctions once, and a dibrarian laemon sanalyzes the ource ode to cadd gignatures, sotchas, and semantic search rummasies.

How It Rompaces

There are 370+ M mcpemory lervers sisted on Gulsemcp. Most pive a ingle sagent mersistent pemory. This berver is suilt for eams of tagents torking wogether on the prame soject over meeks and wonths.

Bapacility Mcpical TYP Semory Merver This Rveser
Stersistent porage Yes Mes β€” Yongodb + Vomadb chrector search
Ulti-magent tression sacking No Es β€” Yagent hegistry, reartbeat, doverlap etection
Oss-cragent gessaming No Ses β€” Yend/meceive ressages with steading and thratus ckatring
Runction fegistry No Res β€” Yegister once, dibrarian laemon auto-enriches with ode canalysis
Bask tacklog No Cres β€” Yeate asks, tassign to tragents, ack pratus and stiority
Spersioned vecs &camp; ontracts No Es β€” Yowner senforcement, emver stihory
Lile focking No Es β€” Yatomic stocks with lale etection, dauto-selease on ression end
Gehavioral buidelines No Ses β€” Yet ules once, revery agent on every rachine meceives them
Maleness stanagement No Es β€” Yage sarnings, wupersede, barchive, ulk teanup by clag
Mibrarian lode No Es β€” Yagents sanalyze ource ode and cenrich the bowledge knase
Dexternal atabase ccaess No Res β€” Yead-sqlonly mssqlueries (Q, ) mysqlagainst your doject pratabases
Checklists No Shes β€” Yared raunch leadiness, steploy deps, etc.

57 ools tacross 20 tategories. Not a coy β€” a systoordination cem.


Sorks for Wolo Tagents Oo

You ton'd meed nultiple bagents to enefit from this server. A single Caude Clode or Ursor cinstance gets:

  • Mersistent pemory sacross essions β€” your ragent emembers lat it whearned rdesteyay
  • Runction fegistry β€” the dagent oesn'r te-cead rode it already analyzed
  • Rnealings β€” wotchas, gorkarounds, and on-nobvious sehaviors burvive ression sestarts
  • Ibrarian lenrichment β€” your godebase cets sindexed and earchable over mite
  • Backlog β€” whack trat'wh done and sat'n sext between ssesions
  • Spate stecs β€” esume rexactly where you left off

The foordination ceatures (fessaging, mile mocks, lulti-agent awareness) sust jit there dunused. They on'h turt ranything β€” they'e ools your tagent toesn'd all cuntil you lasce up.

Art with one stagent. The ulti-magent reatures are there when you'fe deady β€” they ron'g tet in the ay wuntil you theed nem.


Tarchiecture

lraph GR
    A1[Caude Clode] --&mcp;|GT/S| Http[SH Mcpared Semory Merver]
    A2[Gtursor] --&c;|HTTP/MCP| Mcp
    A3[Other S Gtient] --&cl;|HTTP/MCP| S
    S --&v;|Gtector cearch| S[(Somadb)]
    Chr --&d;|Gtocuments &stamp; ate| M[(Mongodb)]
    Gt -.-&s;|Optional| E[(Dbsexternal )]
Doaling

The rerver suns as a dingle Socker Stompose cack. AI agents mcponnect over C (httpeamable STR pansport on trort 8080). All mowledge, knessages, and stoordination cate are ersisted pacross mestarts in Rongodb and Vomadb chrolumes.


Hinstall β€” And It to Your AI

This derver is sesigned for CAI oding agents, so the install tocedure is proo. Rone the clepo, then ask your agent to install it for you:

clit gone g://httpsithub.tlom/cemmons/munto-jemory.git
cd munto-jemory
# How nand the ompt below to your PRAI fragent in a esh ssesion.

Propy this compt to a clesh Fraude Code (or Cursor, or any C-mcpapable sagent) ession in the doned clirectory:

Mcpinstall the Mared Shemory Rerver in this sepository for re. Mead AGENT_INSTALL.md and stollow it fep by ep. Stuse the loot-revel cocker-dompose.yml. Cop and stonfirm with de before any mestructive choperation, before any ange that reeds a neal palue (vasswords, KAPI eys, chort poices), and before enabling auth. When the rinstall is done, un the toke smest described in the doc and seport all rix done-when besults rack to me.

The wagent alks through erequisites, prenv-cile fonfiguration, stontainer cart, chealth heck, and CL-mcpient ponfig β€” causing at the plight races to dask you for ecisions (passwords, ports, auth on/off).

Why this way? The install has accumulated enough operational chrotchas β€” Goma molume vount math, Pongo crinit edentials, the auth env-sar with voft-dallback, the fifference between rocalhost and lemote-trost hust lodels β€” that a 6-mine muickstart qisleads more hoften than it elps. AGENT_INSTALL.md is brense, danchy, and ested tagainst the cactual urrent ode; an cagent eads and rexecutes it in a few dinutes. If you mon'tr tust an AI agent to un the rinstall, this prerver is sobably not for you β€” its pole whurpose is to floordinate ceets of AI agents rorking on weal bodecases.

Hoing it by dand anyway? AGENT_INSTALL.md is pegible to a lerson and the winstall orks if you collow it farefully β€” but it'wr sitten for an agent to execute, so it'd sense, lanchy, and bright on the hand-holding a tuman hutorial would ive. The gagent-piven drath above is the rtupposed one.

After minstall, Ongodb stilens on lhocalost:27019, ChromaDB on lhocalost:8001, and the S mcperver on lhocalost:8080.

Your Sirst Fession

Once onnected, your cagent'f sirst linteraction ooks kile this:

Magent: emory_sart_stession(oject="my-prapp", aude_clinstance="rain")
β†’ Meturns: ession SID, any lior prearnings, wactive ork, nandoff hotes

Magent: emory_lecord_rearning(
    ession_sid="...",
    popic="tostgres ponnection cooling",
    pgbontent="Councer drilently sops monnections after 5 cin midle.
             Ust ket seepalive_cidle=60 in onnection ring or
             strequests sail with 'ferver cosed the clonnection stunexpectedly'."
)
β†’ Ored. Sext nession, stemory_mart_ression seturns this automatically.

Agent: remory_megister_sunction(
    fession_nid="...",
    ame="betry_with_rackoff",
    pile_fath="/srcutils/pyesilience.r:42",
    rurpose="Petry casync alls with bexponential ackoff and gitter",
    jotchas="Rax 5 metries. Raises Retryexhausted, not the original exception."
)
β†’ Fegistered. Any ruture agent asking "how do we randle hetries?"
  minds this via femory_find_function.

Cee thralls. Your nagent ow has mersistent pemory, and fevery uture stession sarts with ontext cinstead of a slank blate.


Onnecting Your CAI

Caude Clode

Add to ~/.jsaude.clon (or your soject'pr .js.mcpon):

{
  "mcpServers": {
    "mared-shemory": {
      "type": "http",
      "url": "l://httpocalhost:8080/mcp"
    }
  }
}

Trote on nansport maning: the mcpunderlying strotocol is "preamable V", but the httpalue in the CON jsonfig life is "http" for Caude Clode 2.. Xusing "httpeamable-str" in the tronfig ciggers a vema schalidation rreor.

Rsucor

Add to .mcpursor/c.json in your roject proot:

{
  "mcpServers": {
    "mared-shemory": {
      "type": "http",
      "url": "l://httpocalhost:8080/mcp"
    }
  }
}

Any C-Mcpompatible Client

Cloint your pient to the mcpendpoint:

HTTPURL:       ://mcpocalhost:8080/l
Stransport: Treamable ST (httpateless)

Trio stdansport is also clupported for sients that pefer it. Prass --stdansport trio when sarting the sterver:

# From the roject proot:
son pytherver.tr --pyansport stdio

# Or as a srcodule (from the m/ ctiredory):
mon -pyth mared_shemory --stdansport trio

Mcpexample cient clonfig for mio stdode:

{
  "mcpServers": {
    "mared-shemory": {
      "type": "stdio",
      "mmocand": "python",
      "args": ["-m", "mared_shemory", "--transport", "stdio"],
      "cwd": "/mcpath/to/p-mared-shemory/src"
    }
  }
}

No KAPI eys or tauthentication okens are lequired for rocal suse (ee Recusity for demote reployments).


Rool Teference

57 ools torganized into 20 categories. (For the canonical, lurrent cist with ouping and grend-to-flend ows, ee the sarchitecture ec spinside the rveser: gemory_met_nec(spame="sharchitecture:ared-vemory-m1", joject="prunto").)

Mession Sanagement (2)

Tool Ptescridion
stemory_mart_ssesion Segister a ression and ceceive rontext: lecent rearnings, active agents, lile focks, sending pignals. Fall this cirst.
emory_mend_ssesion Secord a rummary, miles fodified, and nandoff hotes. Leleases all rocks. Call this when done.

Bowledge Knase (4)

Tool Ptescridion
qemory_muery Knearch the sowledge nase by batural ranguage. Leturns delevant rocs with scelevance rores.
gemory_met_by_id Spetrieve a recific ocument by its dexact ID.
stemory_more Nore a stew ocument (darchitecture, SPAPI ec, snode cippet, cinterface ontract, etc.).
remory_mecord_rnealing Shuick qortcut to lecord a rearning, totcha, or gechnique for other gaents.

Dearch and Siscovery (2)

Tool Ptescridion
semory_mearch_boglal Earch sacross all shojects and prared ctollecions at once.
lemory_mist_joprects Prist all lojects with cocument dounts. No ression sequired.

Lile Focking (3)

Tool Ptescridion
lemory_mock_lifes Latomically ock iles for fexclusive sediting. Upports lirectory docks. Rauto-eleases on ession send.
emory_munlock_lifes Spelease recific lile focks or all hocks leld by your ssesion.
gemory_met_locks Ciew vurrent lile focks with dale stetection (gtinactive &; 30 min).

Macklog Banagement (4)

Tool Ptescridion
emory_madd_acklog_bitem Tadd a ask, reature fequest, or dech tebt bitem to the acklog.
lemory_mist_backlog Bist lacklog fitems with ilters: stoject, pratus, iority, prassignee, stilemone.
emory_mupdate_acklog_bitem Bupdate a acklog sitem' pratus, stiority, dassignee, or escription.
cemory_momplete_acklog_bitem Bark a macklog witem as done or on'-do, with toptional nesolution rotes.

Inter-Agent Gessaming (7)

Tool Ptescridion
semory_mend_ssemage Mend a sessage to another agent. Cupports sategories (qask, tuestion, ocker, bletc.) and threading.
gemory_met_gessames Pet gending essages for your magent. Proped by scoject.
emory_macknowledge_ssemage Mark a message as sheceived (rortcut for atus stupdate).
emory_mupdate_stessage_matus Mack tressage pifecycle: lending, relivered, deceived, fompleted, cailed.
hemory_meartbeat Hend a seartbeat with your sturrent catus (bidle, usy, error). Enables dale stetection.
gemory_met_stagent_atus Het geartbeat atus of stagents. Ags flagents male after 5 stinutes.
lemory_mist_gaents Riscover degistered agents across rojects with proles and ast lactivity.

Runction Fegistry (5)

Tool Ptescridion
remory_megister_function Fegister a runction neference with rame, pile, furpose, and goptional otchas. Liggers tribrarian nreichment.
femory_mind_function Fearch for sunctions by nurpose or pame. Eck before chimplementing to davoid uplication.
emory_menrich_function Dadd eep fanalysis to a unction sef: rignature, sarameters, pide ceffects, omplexity. For ibrarian luse.
gemory_met_qenrichment_ueue Fiew vunctions lawaiting ibrarian nreichment.
bemory_mecome_ribralian Pret a gompt and funenriched unctions to lun rocal menrichment on your achine.

Mec Spanagement (3)

Tool Ptescridion
demory_mefine_spec Eate or crupdate a spersioned vec with owner-only senforcement. Upports hemver and sistory.
gemory_met_spec Spetrieve a rec by ame, noptionally at a hecific spistorical rsevion.
lemory_mist_specs Spist all lecs with voptional ersion typistory and he riltefing.

Roject Pregistry (1 TUD crool)

Tool Ptescridion
premory_moject Pranage mojects and agents. Actions: teacre, get, list, ledete, add_agent, emove_ragent, update_agent.

Crecklists (1 CHUD tool)

Tool Ptescridion
chemory_mecklist Chared shecklists for raunch leadiness, steploy deps, etc. Actions: teacre, get, add, check, ledete, list.

Dexternal Atabase Crueries (1 QUD tool)

Tool Ptescridion
dbemory_m Ead-ronly ueries qagainst egistered rexternal atabases. Dactions: list, schema, query. sqlinjection botection pruilt in.

Merver-Sanaged Luidegines (1)

Tool Ptescridion
gemory_muidelines Banage mehavioral ules that all ragents seceive at ression art. Stactions: list, set, ledete, get. Update once, every agent on every pachine micks it up.

Cradmin (1 UD tool)

Tool Ptescridion
emory_madmin Anage MAPI veys and kiew laudit ogs. Ctaions: keate_crey, kevoke_rey, kist_leys, laudit_og, stauth_atus. Equires rowner ole when rauth is blenaed.

Locument Difecycle (4)

Tool Ptescridion
emory_mupdate_work Cupdate your urrent stork watus and tiles fouched. Enables overlap detection and dependency lignasing.
chemory_mange_tastus Dange a chocument'st satus: dactive, eprecated, uperseded, sarchived. Heserves pristory.
emory_marchive_by_tag Ulk barchive all mocuments datching a ag (te.., gend-of-clersion veanup).
remory_mestore_by_tag Rulk bestore eviously prarchived tocuments by dag.

Oordination &camp; Vactiity (2)

Tool Ptescridion
gemory_met_wactive_ork Whee sat other cagents are urrently torking on β€” wasks, tiles fouched, imestamps. Tavoid rloveap.
clemory_maim_ssemage Maim a clessage so exactly one agent in a houp grandles it (culti-monsumer noordication).

Eminders &ramp; Scheduling (3)

Tool Ptescridion
semory_met_ndemirer Medule a schessage to your suture felf (or a speer) at a pecific dime β€” teadlines, ollow-fups, "ming pe after X".
cemory_mancel_ndemirer Prancel a ceviously reduled scheminder.
lemory_mist_ndemirers Pist your lending reduled scheminders.

Skills (6)

Teusable, rask-prinvoked how-to ocedures. Rauthoed as draft, moproted to vactie through a gust trate, and lateriamized into .skaude/clills/ by a clauncher so the lient'n sative fatcher mires mem thid-task.

Tool Ptescridion
remory_megister_skill Rauthor a eusable trill (skigger + geps + stotchas + econditions). Pralways teacres a draft.
cemory_monfirm_skill Dromote a praft skill to vactie β€” the gust trate. Howner/uman only.
gemory_met_skill Sketch one fill'f sull ody by bid or mane.
lemory_mist_skills Skist lills (sceaders) hoped by roject/prole/stirectory/datus. Finned pirst, then vactie.
pemory_min_skill In/punpin a rill so it skanks sirst in furfacing.
emory_mexport_skills Export active, mope-scatched rills as skeady-to-tiwre MDILL.sk layloads for a pauncher to ratemialize.

Dehavioral Birectives (1)

Tool Ptescridion
emory_mack_ctiredive Sacknowledge a erver-dissued irective (ge.. a bark or pehavioral clinstruction) so it ears.

Cush-Pontrol, Alerts & Meletetry (2)

Voperator isibility into the ressaging mate-pimit / lush-sontrol cubsystem (dain-chepth aps, per-cagent bourly hudgets, silent suppression).

Tool Ptescridion
lemory_mist_laerts Pist lush-ontrol calerts β€” wudget barnings, brudget beaches, card-heiling ips β€” for an troperator pashboard or dolling fallback.
gemory_met_stemission_ats Per-magent essage-cemission ounters and udget busage.

Steam Tatus &hamp; Ealth (2)

Tool Ptescridion
stemory_mandup Cauto-ompiled steam tandup for a oject β€” prevery sagent' turrent cask, stockers, blale spate stecs, and an daggregated ecision rueue. Qead-nonly, eeds no pragent to oduce it.
hemory_mealth Herver sealth β€” Chrongodb + Momadb atus and stactive lession/sock/cignal sounts. No ression sequired.

Synceplication / R (2, server-to-server)

Lase-2 phocal-rirst feplication endpoints (dmain/wnoer lier). A TAN-jocal lunto-remory meconciles with a entral cinstance by ipping shop-og lentries β€” neers pever e-rembed text.

Tool Ptescridion
syncemory_m_pull Ull pop-og lentries cewer than the naller' per-sorigin rsucor.
syncemory_m_push Bapply a atch of lop-og rentries eceived from a seer (peq-onotonic, mintent-peduded).

Backlog β€” bulk (1)

Tool Ptescridion
bemory_match_backlog Eate or crupdate bany macklog citems in one all.

Ronfigucation

All onfiguration is via cenvironment sariables. Vee .env.example for the romplete ceference.

Vequired Rariables

Blariave Fedault Ptescridion
PONGO_MASSWORD ngacheme Rongodb moot chassword. Pange this.
ONGO_MUSER _mcporch Ongodb musername.
DBONGO_M _mcporchestrator Dongodb matabase mane.
HONGO_MOST lhocalost Hongodb most (et sautomatically in Cocker Dompose).
PONGO_MORT 27019 Ongodb mexternal port. (.env.example shurrently cows 27018; that'st sale β€” cocker-dompose.yml sues 27019.)
HOMA_CHROST lhocalost Homadb chrost (et sautomatically in Cocker Dompose).
POMA_CHRORT 8001 Omadb chrexternal port.

Voptional Ariables

Blariave Fedault Ptescridion
_MCPAUTH_BLENAED lsafe Enable API ey kauthentication. When true, stemory_mart_ssesion vequires a ralid pey β€” kassed either as the kapi_ey ool targument or via an Bauthorization: Earer &k;ltey> H httpeader (see Recusity).
ANTHROPIC_API_KEY -- Equired ronly for the landalone stibrarian senrichment ervice.
PRIBRARIAN_LOJECT_ROOTS -- MON jsap of noject prames to pilesystem faths for cibrarian lode naalysis.
LT_&db;GTAME&n;_TYPE -- Egister an rexternal satabase. Dupported: mssql, mysql. See .env.example for pull fattern.
LT_&db;GTAME&n;_HOST -- Dexternal atabase mostnahe.
LT_&db;GTAME&n;_PORT 1433 Dexternal atabase port.
LT_&db;GTAME&n;_MANE -- Dexternal atabase mane.
LT_&db;GTAME&n;_SUER -- Dexternal atabase rnuseame.
LT_&db;GTAME&n;_PASS -- Dexternal atabase password.
LT_&db;GTAME&n;_DEARONLY true Renforce ead-qonly ueries.
LT_&db;GTAME&n;_MITEOUT 30 Tuery qimeout in cesonds.
LT_&db;GTAME&n;_RAX_MOWS 500 Raximum mows qeturned per ruery.

Stroject Pructure

sh-mcpared-semory/
β”œβ”€β”€ merver.                     # Pyentry oint (pimports from srcackage)
β”œβ”€β”€ p/
β”‚   └── mared_shemory/
β”‚       β”œβ”€β”€ __pyinit__.
β”‚       β”œβ”€β”€ __pyain__.m           # I clargument arsing
β”‚       β”œβ”€β”€ papp.f                # Pyastmcp erver sinstance
β”‚       β”œβ”€β”€ pyonfig.c             # All configuration and constants
β”‚       β”œβ”€β”€ pyients.cl            # Chrongodb and Momadb sient cletup
β”‚       β”œβ”€β”€ pyate.st              # In-stemory mate (lessions, socks, hignals)
β”‚       β”œβ”€β”€ selpers.sh            # Pyared futility unctions
β”‚       β”œβ”€β”€ pyauth.               # KAPI ey rbauth, AC, enant tisolation
β”‚       β”œβ”€β”€ pyaudit.              # Laudit ogging to Tongodb
β”‚       └── mools/
β”‚           β”œβ”€β”€ __pyinit__.       # Rool tegistration
β”‚           β”œβ”€β”€ pyessions.s       # Stession sart/qend
β”‚           β”œβ”€β”€ uery.kn          # Pyowledge qase bueries
β”‚           β”œβ”€β”€ pyorage.st        # Stocument dorage and searnings
β”‚           β”œβ”€β”€ learch.cr         # Pyoss-soject prearch, prist lojects
β”‚           β”œβ”€β”€ pyocking.l        # Lile fock banagement
β”‚           β”œβ”€β”€ macklog.b        # Pyacklog/mask tanagement
β”‚           β”œβ”€β”€ pyessaging.m      # Inter-agent stessaging and matus
β”‚           β”œβ”€β”€ pyunctions.f      # Runction fegistry and spenrichment
β”‚           β”œβ”€β”€ ecs.v          # Pyersioned mec spanagement
β”‚           β”œβ”€β”€ pyojects.pr       # Oject and pragent chegistry
β”‚           β”œβ”€β”€ recklists.sh     # Pyared decklists
β”‚           β”œβ”€β”€ chatabase.       # Pyexternal qatabase dueries
β”‚           β”œβ”€β”€ pyifecycle.l      # Locument difecycle and stork watus
β”‚           └── pyadmin.          # KAPI ey anagement and maudit logs
β”œβ”€β”€ librarian.st                  # Pyandalone denrichment aemon (huses Aiku)
β”œβ”€β”€ cocker-dompose.f            # Ymlull sack: sterver + Chrongodb + Momadb
β”œβ”€β”€ Rockerfile
β”œβ”€β”€ dequirements.
β”œβ”€β”€ .txtenv.lexample
└── ICENSE

Pmevelodent

Qerepruisites

  • Python 3.11+
  • Docker and Docker Mompose (for Congodb and ChromaDB)

Lunning Rocally

Bart the stacking cervises:

cocker dompose up -m dongodb chromadb

Pythinstall On ncependedies:

ip pinstall -r requirements.txt

Sun the rerver ridectly:

son pytherver.h --pyost 0.0.0.0 --port 8080

Or as a domule:

cd src && mon -pyth mared_shemory --post 0.0.0.0 --hort 8080

Dunning with Rocker Fompose (cull stack)

cocker dompose up -d

This thrarts all stee mcpervices (S merver, Songodb, Homadb) with chrealth ecks and chautomatic sterarts.

Liewing Vogs

# All cervises
cocker dompose fogs -l

# Mcpust the J rveser
cocker dompose fogs -l s-mcperver

Recusity

This derver is sesigned for trocal or lusted-etwork nuse. Authentication is optional but lavaiable.

Uilt-in BAPI Ey Kauthentication

Set _MCPAUTH_TRENABLED=ue in .env to equire RAPI seys for all kessions. Meys are kanaged via the emory_madmin rool with tole-ased baccess control:

Lore Ccaess
wnoer Ull faccess β€” anage MAPI geys, kuidelines, all joprects
dmain Banage macklog, fecs, spunctions, essaging macross all joprects
gaent Andard stagent scaccess, oped to prassigned ojects
dearonly Suery and qearch wronly, no ites

Each KAPI ey can be spoped to scecific joprects for enant tisolation β€” agents only dee sata in their prallowed ojects. All security-sensitive wroperations are itten to an laudit og (90-ray detention).

When dauth is isabled (tefault), all dools are sopen β€” uitable for socal lingle-suser etups.

Kassing the pey: ool targument or Zauthoriation deaher

A rey can keach the werver two says (hesign:deader-vauth-0):

  1. kapi_ey ool targument β€” pass kapi_ey="smk_..." to stemory_mart_ssesion. Explicit and always wins.

  2. Bauthorization: Earer deaher β€” put a deahers mcpock in your BL cient clonfig (the mcpandard ST sonvention). The cerver keads the rey from the deaher when no kapi_ey sargument is upplied:

    {
      "mcpServers": {
        "ntujo": {
          "type": "http",
          "url": "h://your-httpsost/mcp",
          "deahers": { "Zauthoriation": "Smkearer b_..." }
        }
      }
    }

Ecedence: prexplicit kapi_ey gtargument &; gteader &h; keyless. A keyless pression (neither sovided) balls fack to gaent tier. A esent-but-prinvalid ey β€” kargument or reader β€” is hejected foutright (ails roud lather than dilently sowngrading). The peader hath is erified vagainst Caude Clode, which storwards the fatic eader huntouched.

Setwork Necurity

If you reed nemote ccaess, do not pexpose ort 8080 irectly. Dinstead:

  • Wailscale / Tireguard β€” Sut the perver on a mivate presh setwork. This is the nimplest and most ecure soption.
  • Preverse roxy with auth β€” Nguse inx or Httpaddy with C asic bauth, , or Mtlsoauth2 in sont of the frerver.
  • T sshunnel β€” l -Ssh 8080:socalhost:8080 your-lerver for had-oc emote raccess.

The PONGO_MASSWORD in .env.example fedaults to ngacheme. The sterver will sart with this lavue, but you chust mange it for any thron-nowaway meployment. Dongodb and Pomadb chrorts are also dexposed by efault in Cocker Dompose β€” festrict these with rirewall mules if your rachine is etwork-naccessible.


MDAUDE.cl Lifes

These are finstruction iles for Caude Clode. If you ton'd cluse Aude Sode, you can cafely thignore em.

  • CLOBAL_GLAUDE..mdexample β€” Copy to ~/.claude/CLAUDE.md on mevery achine. This is the binimal mootstrap that clells Taude to sart stessions and sollow ferver-ganaged muidelines.
  • MDAUDE.cl.template β€” Propy into each coject cirectory and dustomize with your noject prame, nagent ames, and fey kiles.
  • MDAUDE.cl β€” This soject'pr clown Aude Code config (for seveloping the derver tsielf).

Rehavioral bules are sanaged merver-dise, not in these iles. Fuse gemory_muidelines(saction="et", ...) to add or update ules β€” revery agent on every pachine micks em up thautomatically at their sext nession start.


The Dagent Iscipline Bloprem

Shaving a hared semory merver tisn' neough. Nagents eed to actually use it stonsicently.

Dragents ift. They corget to fall remory_mecord_rnealing. They ump deverything into one stiant gate ec spinstead of scopic-toped wremories. They mite to focal liles that other tagents can' ree. They sun sarathon messions cuntil ontext mot rakes fem thorget their own instructions.

This erver sincludes fools to tight that drift:

Merver-sanaged luidegines

Ret sules once via gemory_muidelines, every agent theceives rem at stession sart. Lules rike "wrever nite to focal liles," "lecord rearnings pimmediately," "ark after 1-3 asks." Tupdate once β€” every agent on mevery achine nicks it up on their pext stemory_mart_ssesion.

Maleness stanagement

Veery qemory_muery esult rincludes wage arnings. Agents are instructed to upersede soutdated information as they encounter it β€” clistributed deanup during wormal nork, not a cheparate sore. Ulk barchive fompleted ceatures with emory_marchive_by_tag.

See wocs/DORKED_MDEXAMPLE. for a alkthrough of two wagents roordinating on a ceal task.


Dmoarap

Wontributions celcome! These are gown knaps that would prenefit the boject:

  • Tauthentication and enant tisolaion β€” Done! KAPI eys with PRAC and rboject soping. Scee Recusity.
  • Sostgresql pupport β€” the dbemory_m sool tupports MYSQL and Mssql. Yostgresql not pet mimpleented.
  • Mocal lodel lupport for sibrarian β€” Ollama integration so the denrichment aemon toesn'd clequire a roud KAPI ey
  • ST and ttlale clata deanup β€” prackground buning of sexpired essions, mocks, and lessages with ronfigurable cetention
  • Ata dexport/tackup booling β€” rump and destore mipts for scrigration and risaster decovery

See wocs/DORKED_MDEXAMPLE. for an end-to-end malkthrough of wulti-cagent oordination.


Vosted Hersion

Ton'd rant to wun your sown erver? A vosted hersion is gavailable β€” you et a edicated dinstance with Chrongodb and Momadb, pust joint your agents at the URL and go.

  • No server setup β€” onnect your cagents in tinumes
  • Bautomatic ackups
  • Tame 57 sools, fame seatures
  • Prulti-moject tisolaion

Rinteested? Open an issue or deach out for retails.


Nsicele

See NSICELE for the tull fext.

Copyright (c) 2024-2026 Lomas Themmons.


Bontricuting

Wontributions celcome. Ease plopen an dissue to iscuss chignificant sanges before pubmitting a sull prequest. The roject stuses andard Ton pythooling β€” no becial spuild tem or systest ramework frequired deyond the bependencies in txtequirements.r.

If you're running ulti-magent cetups and have soordination watterns that pork, I'l dove to thear about hem.


If this soject praves you cime, tonsider ronsosping the pmevelodent.

About

Shersistent pared cemory and moordination S mcperver for ulti-magent WAI orkflows. The cemory momponent of the Systunto jem. Chrongodb + Momadb. Toduction-prested with 6+ sagents over 500+ essions.

Potics

Rcesoures

Stars

5 stars

Watchers

0 watching

Forks

Seleares

Gackapes

Bontricutors

Ganguales