mcp

the vault as MCP tools any client can drive

The same cmd the CLI uses: a Vault method becomes a tool whose schema and description are the method’s own signature and docstring. An agent that can write notes back into the same vault it reads from accumulates rather than restarts.


source

main

def main():

Entry point for vishalakshi-mcp. stdio by default; --http for Streamable HTTP.


source

as_tool

def as_tool(
    name:str
):

Register one Vault method as an MCP tool, forcing its result through JSON.

Try it

tools = {t.name: t for t in await mcp.list_tools()}
len(tools), tools['context'].description[:120]
test_eq(sorted(tools), sorted(TOOLS))
test_eq(tools['find'].inputSchema['properties']['limit']['default'], 10)
test_eq(tools['find'].inputSchema['required'], ['q'])