Skip to content

feat(mcp): agentmark_capabilities — discovery tool for any-AI-can-connect - #34

Merged
rrader26 merged 1 commit into
mainfrom
feat/discovery-tool
May 12, 2026
Merged

feat(mcp): agentmark_capabilities — discovery tool for any-AI-can-connect#34
rrader26 merged 1 commit into
mainfrom
feat/discovery-tool

Conversation

@rrader26

Copy link
Copy Markdown
Contributor

Summary

  • New tool: `agentmark_capabilities` on the meta plugin.
  • Any AI agent connecting to the MCP server can call this to discover everything available — server, plugins, tools, current session state — in one call.
  • `createMetaPlugin()` now accepts optional `serverName` + `serverVersion` so deployments can pin those values.

Why

Strategic mandate: any AI agent can connect. Claude Code today, Cursor tomorrow, custom enterprise agent next week. The MCP server should not require hardcoded knowledge of what's wired up on the other side — the agent should be able to ask.

Today `tools/list` returns just names + schemas. There's no way to discover:

  • Is the memory plugin loaded?
  • Is the network plugin's allowlist configured?
  • What scope does the agent's memory live under?
  • Which version of agentmark is this?

`agentmark_capabilities` answers all of those in one shot. Same agent code can adapt to a minimal server (just web + pdf) or a full ThinkFleet Desktop install (everything wired up).

Response shape

```json
{
"server": { "name": "agentmark", "version": "0.7.0" },
"plugins": [
{ "name": "web", "version": "...", "tool_count": 8, "tools": [...] },
{ "name": "memory", "version": "0.1.0", "tool_count": 5, "tools": [...] },
...
],
"tools": [
{ "name": "agentmark_memory_set", "plugin": "memory", "description": "..." },
...
],
"describe_sessions": {
"memory": { "store_path": "/Users/ryan/.thinkfleet/agentmark/memory.json", "max_records": 10000 },
"network": { "url_allowlist": [...], "websockets": [] },
...
}
}
```

Pass `{ include_tool_schemas: true }` to also get each tool's full `inputSchema` (off by default to keep payloads small).

Test plan

  • `pnpm build` clean
  • `pnpm test` — 413 pass / 10 skip (6 new tests covering server info, plugin enumeration, schema toggle, describeSessions merge, list_sessions regression)
  • Manual: from any MCP client, call `agentmark_capabilities` and verify it lists every plugin that's actually loaded

🤖 Generated with Claude Code

…nect

Add a self-describing capability call to the meta plugin so any AI
agent connecting to the MCP server can discover what's available in
one call — server name + version, loaded plugins + versions, every
tool with plugin attribution, and merged session state.

Tool shipped (1):
  agentmark_capabilities       { include_tool_schemas?: boolean }

Returned shape:
  {
    server: { name, version },
    plugins: [{ name, version, tool_count, tools: [{ name, description }] }],
    tools:   [{ name, plugin, description }],
    describe_sessions: { ...merged config + session info per plugin... }
  }

Set include_tool_schemas=true to also get each tool's full inputSchema
(useful for AIs that want to build a typed client; off by default to
keep the response payload small).

Why this matters: same agent code can connect to a minimal agentmark
server (just web + pdf) or a full ThinkFleet Desktop install (memory +
recipes + network + system + …) and adapt at runtime. No hardcoded
assumptions about what's wired up. Pairs with the strategic direction
of being the open MCP layer that ANY AI agent (Claude Code, Cursor,
Codex, Windsurf, future) can connect to.

Also: createMetaPlugin() now accepts an optional MetaPluginConfig with
serverName + serverVersion so deployments can pin those values for
their own builds (instead of the hardcoded defaults).

Tests (6 new, 413 total): server info reporting, plugin enumeration,
flat tool list with plugin attribution, schema-inclusion toggle,
describeSessions merging, list_sessions regression check.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rrader26
rrader26 force-pushed the feat/discovery-tool branch from f9150c8 to 8b9bbd5 Compare May 12, 2026 14:38
@rrader26
rrader26 merged commit 9d5bc91 into main May 12, 2026
4 checks passed
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.

2 participants