vibesketch.agent.mcp¶
The MCP server: vibe-sketch as tools for an agent (roadmap WP 2.6).
vibe-sketch mcp speaks the Model Context Protocol over standard input and
output (newline-delimited JSON-RPC 2.0: initialize, ping,
tools/list, tools/call). Every tool is a call to the REST API, so an
agent edits documents through the same revision counter as the browser: when
a vibe-sketch server is already running on this machine, the agent works on
the documents its user has open, and the user sees each edit within seconds.
When none is running, the MCP server starts one in the background and the
status tool gives its address for the user to open.
The protocol layer is a few dozen lines of the standard library; nothing here needs an MCP SDK.
Module Attributes
Protocol revisions this server speaks, newest first. |
Functions
|
The response to one JSON-RPC message; |
|
The tools, each a call to the server |
|
Answer MCP messages from |
Classes
|
Exceptions
|
A tool could not do what was asked; the message goes back to the agent. |
- vibesketch.agent.mcp.PROTOCOL_VERSIONS = ('2025-06-18', '2025-03-26', '2024-11-05')¶
Protocol revisions this server speaks, newest first.
- class vibesketch.agent.mcp.Tool(name: 'str', description: 'str', schema: 'dict[str, Any]', run: 'Callable[[dict[str, Any]], Any]')¶
Bases:
object- Parameters:
- vibesketch.agent.mcp.handle(message, tools)¶
The response to one JSON-RPC message;
Nonefor a notification.
- vibesketch.agent.mcp.make_tools(client)¶
The tools, each a call to the server
clientpoints at.- Parameters:
client (RestClient)
- Return type: