Skip to content

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.

  • Sandbox: https://mcp.sandbox.evidentsource.com
  • Your deployment: the MCP server’s own host and port.

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.

ToolWhat it does
fetchMakes 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_changeRuns 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.

ResourceWhat it holds
evidentsource://databasesThe databases on the server
evidentsource://db/{name}One database
evidentsource://guides/introductionWhat EvidentSource is, and how to start
evidentsource://guides/rolesThe roles an agent can take
evidentsource://guides/apiThe HTTP API, with request shapes
evidentsource://guides/transactionsTransactions and append conditions
evidentsource://guides/authoringWriting State Changes and State Views
evidentsource://guides/publishingPublishing components

The server binary’s mcp subcommand runs the MCP server:

Terminal window
evidentsource mcp --api-url http://localhost:3000

It 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.