feat(mcp): agentmark_capabilities — discovery tool for any-AI-can-connect - #34
Merged
Conversation
…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
force-pushed
the
feat/discovery-tool
branch
from
May 12, 2026 14:38
f9150c8 to
8b9bbd5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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:
`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
🤖 Generated with Claude Code