MCP server
Forgeline speaks the Model Context Protocol over streamable HTTP. If a client supports the http transport, it can talk to Forgeline.
Transport
The server exposes a single endpoint:
POST http://127.0.0.1:8766/mcp Content-Type: application/json Authorization: Bearer <token>
Initialization, tools/list, and tools/call all use standard JSON-RPC 2.0 framing. Streaming responses use Server-Sent Events when the client advertises support.
Workspace sandbox
Every filesystem tool resolves paths against FORGELINE_WORKSPACE_ROOT. Traversal and symlink escapes are rejected before the call reaches the underlying syscall:
{ "error": "path_outside_workspace", "path": "/etc/passwd" }
Concurrency
The server is single-process, async-IO. Long-running shell commands do not block the event loop — they stream stdout back to the client as they run.
Next: Browser bridge →