Method
__init__
(self, binary, cache_dir=None, extra_env=None, cwd=None)
Source from the content-addressed store, hash-verified
| 21 | |
| 22 | class McpServer: |
| 23 | def __init__(self, binary, cache_dir=None, extra_env=None, cwd=None): |
| 24 | self.binary = binary |
| 25 | self._id = 0 |
| 26 | self.proc = None |
| 27 | self._stderr = [] |
| 28 | env = dict(os.environ) |
| 29 | if cache_dir: |
| 30 | env["CBM_CACHE_DIR"] = cache_dir # isolate the graph DB location |
| 31 | if extra_env: |
| 32 | env.update(extra_env) |
| 33 | self.env = env |
| 34 | self.cwd = cwd |
| 35 | |
| 36 | def __enter__(self): |
| 37 | self.start() |
Callers
nothing calls this directly
Tested by
no test coverage detected