MCP, REST, and the in-app Agent
Eidograph offers three paths for agents, all ending at the same tool surface:
| Path | Best for | Available in |
|---|---|---|
| In-app Agent | Natural-language changes to the current project | Windows and Android apps |
| MCP Streamable HTTP | Agent platforms that support remote HTTP MCP | Windows app |
| JSON REST API | Scripts, workflows, and custom agents | Windows app |
Before a tool changes a script, Eidograph compiles the candidate. An edit with compiler errors or a skipped-command warning is rejected and the current script is unchanged. Successful edits persist, redraw, and enter normal undo history immediately.
Enable the native server
- In the installed app, open Settings › MCP / REST server.
- Enable the server and confirm that its status is running. The default port is
14159. - Enable only the tools the client needs.
- In Figures, inspect the exposure dot beside each figure. A filled dot means external clients may access it.
- Keep the default loopback binding unless you are on a trusted network.
Default endpoints:
MCP http://127.0.0.1:14159/mcp
REST http://127.0.0.1:14159/api/v1DANGER
LAN mode binds to 0.0.0.0 without authentication or an internet relay. Native clients on that network can invoke the tools you enabled. Use it only on a trusted network and turn it off afterward.
Connect an MCP platform
For a client that supports Streamable HTTP—including the Trae / WorkBuddy configuration copied by the app—add this server:
{
"mcpServers": {
"Eidograph": {
"url": "http://127.0.0.1:14159/mcp",
"transport": "streamable-http",
"disabled": false
}
}
}Platforms differ in configuration file location and outer schema, but the essential values are the server name, URL, and Streamable HTTP transport. If a platform supports only a local stdio MCP process, do not put this URL in its command field; use an HTTP connector or bridge supported by that platform.
After connecting, let the client discover tools, then read the current script or command registry. A reliable agent sequence is:
list_figuresto confirm the target;get_scriptandlist_objectsto understand the current figure;list_commandsto inspect valid syntax for the active 2D/3D dialect;append_commandsfor additive changes, andset_scriptonly when existing lines must be rewritten;list_diagnosticsto verify the result and correct any issue.
Call the REST API
Check status and tool discovery first:
curl http://127.0.0.1:14159/api/v1/status
curl http://127.0.0.1:14159/api/v1/toolsCreate two points and a segment:
curl -X POST http://127.0.0.1:14159/api/v1/tools/append_commands \
-H "Content-Type: application/json" \
-H "X-Eidograph-Client: my-agent" \
-d '{"commands":"point A -2 0\npoint B 2 0\nsegment s A B"}'Responses use one envelope: {"ok":true,"result":...} on success or {"ok":false,"error":...} on failure. The optional X-Eidograph-Client header gives the caller a readable name in Settings activity.
The current surface can read and list figures, create figures, append or replace scripts, list objects/diagnostics/commands, select an object on canvas, and export an exposed figure as SVG or PNG. Tool permissions and figure exposure are enforced on every call.
Configure the in-app Agent
Save several models in Settings › Agent, then switch among them from the Agent header. Eidograph supports three protocol families:
- OpenAI-compatible Chat Completions endpoints;
- Anthropic Messages;
- Google Gemini / Vertex
generateContent.
Each saved model has a display name, provider, Base URL, API key, and model ID. You can enter an ID manually if model discovery fails. Local endpoints such as Ollama and LM Studio can work as well, but the endpoint must allow cross-origin requests from the app's WebView (CORS).
The in-app Agent accepts attached or pasted images, which is useful for turning a textbook photo or sketch into a construction. Vision support is determined by the model endpoint; an unsupported request appears as an error in the conversation.
Permissions and data boundaries
- In-app and external agents have no hidden privileged path; both use the same tool definitions.
- External edits target the active project and honor each figure's exposure state.
- API keys are never written to
.eido. The Windows and Android apps use protected OS credential storage. - Agent chats are excluded from
.eidoby default and are shared only when Include agent chats is enabled explicitly.
