MCP-only agents
An agent can be nothing but an MCP server. Build the server and the agent comes with it: no context provider, and nothing in the server needs to know about newt.
[agents.tasks]mcp = "https://app.example.com/tasks/mcp"model = "default"token_env = "TASKS_TOKEN"newt sends the agent’s token to the server as the bearer.
What newt takes from the server
Section titled “What newt takes from the server”| The agent’s | Comes from |
|---|---|
| Instructions | The server’s instructions. Empty instructions fail the turn. |
| Model | model in server.toml |
| Tools | tools/list |
| Skills | skills/list, named {agent}/{skill path} (experimental) |
| Workspace pages | The session’s resources, loaded at the start of each turn |
There is no version, pinned, turn instructions or constraints. newt reconnects when the tool set goes stale, which includes the server restarting.
Resources are the workspace
Section titled “Resources are the workspace”At the start of each turn newt lists and reads the resources with _meta: { "newt/session": "<key>" }, so one server can serve every session. Each text resource becomes a page:
| Page field | From the resource |
|---|---|
path |
name |
key |
_meta["newt/key"] when set, otherwise [uri] |
version |
The sha256: digest of the text |
content |
The text contents |
Keeping pages fresh
Section titled “Keeping pages fresh”newt subscribes to the session’s resources for the rest of the turn. notifications/resources/updated marks one page stale and notifications/resources/list_changed marks them all; the next read fetches again.
assistant-mcpincrates/newt-demois a complete example. Run it with the Quickstart.- Protocol 2.7 has every rule.