Skip to content

feat(mcp): serve agents (MCP) from the trame server - #104

Draft
alesgenova wants to merge 1 commit into
masterfrom
feat-mcp
Draft

alesgenova wants to merge 1 commit into
masterfrom
feat-mcp

Conversation

@alesgenova

Copy link
Copy Markdown
Member

Depends on Kitware/trame-common#37

Agents connect to a running app through the Model Context Protocol, and use what its classes declare with trame-common's markers and mcp= keyword.

  • server.mcp: the MCP server, off until enabled (mcp.enabled, --mcp). Child servers share their root's, and the object names they expose go through their translator
  • transports: HTTP at /mcp on the aiohttp server, with a bearer token beyond loopback (--mcp-http-token), and mcp.client() for agents in the same process
  • MCP 2026-07-28, alongside clients of earlier revisions
  • six object tools (object_list, object_types, object_get, object_update, object_call, object_batch) over components, models and the state keys exposed with state.mcp_expose()
  • the app's own tools, resources and prompts (mcp.tool(), mcp.resource(), mcp.prompt(), or @mcp_tool and friends on a component)
  • permissions (mcp.permissions, --mcp-deny), progress reports, a call log (--mcp-log) and a response budget

Requires trame-common 1.3.0.

Agents connect to a running app through the Model Context Protocol, and
use what its classes declare with trame-common's decorators and mcp=
keyword.

- server.mcp: the MCP server, off until enabled (server.mcp.enabled,
  --mcp). Child servers share their root's, and the object names they
  expose go through their translator
- transports: HTTP at /mcp on the aiohttp server, with a bearer token
  beyond loopback (--mcp-http-token), and server.mcp.client() for agents
  in the same process
- MCP 2026-07-28, alongside clients of earlier revisions
- six object tools (object_list, object_types, object_get,
  object_update, object_call, object_batch) over components, models
  and the state keys exposed with state.mcp_expose(); a batch creates
  the components and models whose class has a constructor
- the app's own tools, resources and prompts (server.mcp.tool(),
  .resource(), .prompt(), or @mcp.tool and the like on a component)
- permissions (server.mcp.permissions, --mcp-deny), progress reports, a
  call log (--mcp-log) and a response budget

Requires trame-common 1.3.0.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant