MCP API
EvidentSource speaks the Model Context Protocol. An AI agent connected to its MCP server can discover databases, read the guides, and call the HTTP API.
For the Sandbox, see MCP for AI agents.
Endpoint
Section titled “Endpoint”- Sandbox:
https://mcp.sandbox.evidentsource.com - Your deployment: the MCP server’s own host and port.
How it works
Section titled “How it works”The MCP server is a separate process that proxies the HTTP API. An agent discovers what exists through resources, and acts through tools. Most responses come back as TOON, a compact text form that carries links and the next actions available. State Views and presenters can answer in other textual formats.
| Tool | What it does |
|---|---|
fetch | Makes a GET or POST request to the API, with a JSON body. Most responses come back as TOON; a State View render comes back in the view’s own format, or, for a view whose definition names a presenter, in the content type the optional accept negotiates among the presenter’s offers (text/plain by default). fetch returns text: a usable declared character set is decoded strictly; otherwise valid UTF-8 is accepted. Invalid UTF-8 is returned with replacement characters when the content type is absent or known to be textual, and refused for other content types. An answer whose Content-Type is present and does not start with text/plain, or that carries a Link header, comes with a second item naming its Content-Type and Link header; a text/plain answer without a Link header is treated as TOON and gets none |
execute_state_change | Runs a State Change |
execute_state_change sends its JSON command to the latest-revision State Change route: POST /api/v1/db/{database}/latest/state-changes/{name}/v{version}. You can also run commands with fetch against that route.
Resources
Section titled “Resources”| Resource | What it holds |
|---|---|
evidentsource://databases | The databases on the server |
evidentsource://db/{name} | One database |
evidentsource://guides/introduction | What EvidentSource is, and how to start |
evidentsource://guides/roles | The roles an agent can take |
evidentsource://guides/api | The HTTP API, with request shapes |
evidentsource://guides/transactions | Transactions and append conditions |
evidentsource://guides/authoring | Writing State Changes and State Views |
evidentsource://guides/publishing | Publishing components |
Running it
Section titled “Running it”The server binary’s mcp subcommand runs the MCP server:
evidentsource mcp --api-url http://localhost:3000It listens on port 3001 by default (--port), and answers GET /health. It passes each request’s Authorization header on to the API, and doesn’t check the token itself. The AWS Marketplace template deploys it as its own service, at its own hostname; see AWS Marketplace deployment and Security.