@emilia-protocol/mcp-server 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +100 -20
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -60,6 +60,7 @@ import {
|
|
|
60
60
|
CallToolRequestSchema,
|
|
61
61
|
ListToolsRequestSchema,
|
|
62
62
|
ListResourcesRequestSchema,
|
|
63
|
+
ListResourceTemplatesRequestSchema,
|
|
63
64
|
ReadResourceRequestSchema,
|
|
64
65
|
ListPromptsRequestSchema,
|
|
65
66
|
GetPromptRequestSchema,
|
|
@@ -247,7 +248,7 @@ const TOOLS = [
|
|
|
247
248
|
type: 'object',
|
|
248
249
|
properties: {
|
|
249
250
|
query: { type: 'string', description: 'Search query' },
|
|
250
|
-
entity_type: { type: 'string', enum: ['agent','merchant','service_provider','github_app','github_action','mcp_server','npm_package','chrome_extension','shopify_app','marketplace_plugin','agent_tool'] },
|
|
251
|
+
entity_type: { type: 'string', description: 'Optional filter — restrict results to a single entity type.', enum: ['agent','merchant','service_provider','github_app','github_action','mcp_server','npm_package','chrome_extension','shopify_app','marketplace_plugin','agent_tool'] },
|
|
251
252
|
},
|
|
252
253
|
required: ['query'],
|
|
253
254
|
},
|
|
@@ -277,11 +278,11 @@ const TOOLS = [
|
|
|
277
278
|
inputSchema: {
|
|
278
279
|
type: 'object',
|
|
279
280
|
properties: {
|
|
280
|
-
entity_id: { type: 'string', description: '
|
|
281
|
-
display_name: { type: 'string' },
|
|
282
|
-
entity_type: { type: 'string', enum: ['agent','merchant','service_provider','github_app','github_action','mcp_server','npm_package','chrome_extension','shopify_app','marketplace_plugin','agent_tool'] },
|
|
283
|
-
description: { type: 'string' },
|
|
284
|
-
capabilities: { type: 'array', items: { type: 'string' } },
|
|
281
|
+
entity_id: { type: 'string', description: 'Unique slug for the entity (lowercase, hyphens), e.g. "acme-treasury-agent". Becomes its permanent id.' },
|
|
282
|
+
display_name: { type: 'string', description: 'Human-readable name shown in trust profiles and receipts, e.g. "Acme Treasury Agent".' },
|
|
283
|
+
entity_type: { type: 'string', description: 'What kind of actor this is — determines which trust policies apply.', enum: ['agent','merchant','service_provider','github_app','github_action','mcp_server','npm_package','chrome_extension','shopify_app','marketplace_plugin','agent_tool'] },
|
|
284
|
+
description: { type: 'string', description: 'One or two sentences on what the entity does; used for discovery and capability matching.' },
|
|
285
|
+
capabilities: { type: 'array', items: { type: 'string' }, description: 'Optional list of capability tags, e.g. ["payments","kyc"], used by ep_search_entities.' },
|
|
285
286
|
},
|
|
286
287
|
required: ['entity_id', 'display_name', 'entity_type', 'description'],
|
|
287
288
|
},
|
|
@@ -297,7 +298,7 @@ const TOOLS = [
|
|
|
297
298
|
type: 'object',
|
|
298
299
|
properties: {
|
|
299
300
|
limit: { type: 'number', description: 'Max entities (default 10, max 50)' },
|
|
300
|
-
entity_type: { type: 'string', enum: ['agent','merchant','service_provider','github_app','github_action','mcp_server','npm_package','chrome_extension','shopify_app','marketplace_plugin','agent_tool'] },
|
|
301
|
+
entity_type: { type: 'string', description: 'Optional filter — restrict results to a single entity type.', enum: ['agent','merchant','service_provider','github_app','github_action','mcp_server','npm_package','chrome_extension','shopify_app','marketplace_plugin','agent_tool'] },
|
|
301
302
|
},
|
|
302
303
|
},
|
|
303
304
|
},
|
|
@@ -426,9 +427,11 @@ const TOOLS = [
|
|
|
426
427
|
{
|
|
427
428
|
name: 'ep_create_delegation',
|
|
428
429
|
description:
|
|
429
|
-
'Create a delegation record:
|
|
430
|
-
'
|
|
431
|
-
'
|
|
430
|
+
'Create a delegation record. WRITE: persists to the EP ledger that a human or ' +
|
|
431
|
+
'principal authorizes an agent to act on their behalf, with scope, expiry, and ' +
|
|
432
|
+
'optional constraints. Requires auth. Returns a delegation_id that later actions ' +
|
|
433
|
+
'reference (via ep_verify_delegation) to prove authorization. Use when a principal ' +
|
|
434
|
+
'grants an agent standing authority for a bounded set of actions.',
|
|
432
435
|
inputSchema: {
|
|
433
436
|
type: 'object',
|
|
434
437
|
properties: {
|
|
@@ -674,8 +677,10 @@ const TOOLS = [
|
|
|
674
677
|
{
|
|
675
678
|
name: 'ep_verify_commit',
|
|
676
679
|
description:
|
|
677
|
-
'Verify a commit
|
|
678
|
-
'
|
|
680
|
+
'Verify a pre-action commit — read-only, no side effects. Checks its signature, ' +
|
|
681
|
+
'status, and validity and returns valid/invalid plus the current status, decision, ' +
|
|
682
|
+
'and expiry. Use before relying on or consuming a commit to confirm it is genuine ' +
|
|
683
|
+
'and still active.',
|
|
679
684
|
inputSchema: {
|
|
680
685
|
type: 'object',
|
|
681
686
|
properties: {
|
|
@@ -762,9 +767,11 @@ const TOOLS = [
|
|
|
762
767
|
{
|
|
763
768
|
name: 'ep_add_presentation',
|
|
764
769
|
description:
|
|
765
|
-
'Add an identity presentation (proof) to an active handshake. ' +
|
|
766
|
-
'
|
|
767
|
-
'
|
|
770
|
+
'Add an identity presentation (proof) to an active handshake. WRITE: appends ' +
|
|
771
|
+
'the party\'s identity claims to the handshake for evaluation against its policy; ' +
|
|
772
|
+
'supports full, selective, or zero-knowledge disclosure. Requires auth. Returns ' +
|
|
773
|
+
'the updated presentation count and handshake state. Call after ' +
|
|
774
|
+
'ep_initiate_handshake and before ep_verify_handshake.',
|
|
768
775
|
inputSchema: {
|
|
769
776
|
type: 'object',
|
|
770
777
|
properties: {
|
|
@@ -781,9 +788,11 @@ const TOOLS = [
|
|
|
781
788
|
{
|
|
782
789
|
name: 'ep_verify_handshake',
|
|
783
790
|
description:
|
|
784
|
-
'Evaluate all presentations in a handshake against
|
|
785
|
-
'Returns
|
|
786
|
-
'
|
|
791
|
+
'Evaluate all presentations in a handshake against its governing policy — read-only, ' +
|
|
792
|
+
'no mutation. Returns accepted (all requirements met), rejected (policy violations), ' +
|
|
793
|
+
'or partial (awaiting presentations), each with reason_codes explaining the outcome. ' +
|
|
794
|
+
'Call after the parties have added their presentations to decide whether the ' +
|
|
795
|
+
'handshake clears.',
|
|
787
796
|
inputSchema: {
|
|
788
797
|
type: 'object',
|
|
789
798
|
properties: {
|
|
@@ -1553,9 +1562,74 @@ const CORE_TOOL_NAMES = new Set([
|
|
|
1553
1562
|
'ep_install_preflight', // vet software before install
|
|
1554
1563
|
]);
|
|
1555
1564
|
const INCLUDE_REGISTRY_TOOLS = process.env.EP_INCLUDE_REGISTRY_TOOLS === 'true';
|
|
1556
|
-
|
|
1565
|
+
|
|
1566
|
+
// MCP tool annotations (title + behavior hints) — required by the Anthropic
|
|
1567
|
+
// directory review ("All tools must include a title and the applicable
|
|
1568
|
+
// readOnlyHint or destructiveHint") and useful to every client for
|
|
1569
|
+
// scheduling and gating. Hints describe the EP API call each tool makes.
|
|
1570
|
+
const READ_ONLY_TOOLS = new Set([
|
|
1571
|
+
'ep_check_signoff', 'ep_dispute_status', 'ep_domain_score',
|
|
1572
|
+
'ep_get_commit_status', 'ep_get_handshake', 'ep_install_preflight',
|
|
1573
|
+
'ep_leaderboard', 'ep_lineage', 'ep_list_policies', 'ep_principal_lookup',
|
|
1574
|
+
'ep_search_entities', 'ep_trust_evaluate', 'ep_trust_profile',
|
|
1575
|
+
'ep_verify_commit', 'ep_verify_delegation', 'ep_verify_handshake',
|
|
1576
|
+
'ep_verify_receipt', 'ep_verify_zk_proof',
|
|
1577
|
+
]);
|
|
1578
|
+
const DESTRUCTIVE_TOOLS = new Set(['ep_revoke_commit', 'ep_revoke_handshake']);
|
|
1579
|
+
const TOOL_TITLES = {
|
|
1580
|
+
ep_add_presentation: 'Add Entity Presentation',
|
|
1581
|
+
ep_appeal_dispute: 'Appeal Dispute',
|
|
1582
|
+
ep_batch_submit: 'Batch Submit Receipts',
|
|
1583
|
+
ep_bind_receipt_to_commit: 'Bind Receipt to Commit',
|
|
1584
|
+
ep_check_signoff: 'Check Signoff Status',
|
|
1585
|
+
ep_configure_auto_receipt: 'Configure Auto-Receipts',
|
|
1586
|
+
ep_create_delegation: 'Create Delegation',
|
|
1587
|
+
ep_delegation_judgment: 'Record Delegation Judgment',
|
|
1588
|
+
ep_dispute_file: 'File Dispute',
|
|
1589
|
+
ep_dispute_status: 'Get Dispute Status',
|
|
1590
|
+
ep_domain_score: 'Get Domain Trust Score',
|
|
1591
|
+
ep_generate_zk_proof: 'Generate ZK Trust Proof',
|
|
1592
|
+
ep_get_commit_status: 'Get Commit Status',
|
|
1593
|
+
ep_get_handshake: 'Get Handshake',
|
|
1594
|
+
ep_guard_action: 'Guard Irreversible Action (Human Signoff)',
|
|
1595
|
+
ep_initiate_handshake: 'Initiate Trust Handshake',
|
|
1596
|
+
ep_install_preflight: 'Installation Preflight Check',
|
|
1597
|
+
ep_issue_commit: 'Issue Pre-Action Commit',
|
|
1598
|
+
ep_leaderboard: 'Trust Leaderboard',
|
|
1599
|
+
ep_lineage: 'Get Entity Lineage',
|
|
1600
|
+
ep_list_policies: 'List Trust Policies',
|
|
1601
|
+
ep_principal_lookup: 'Look Up Principal',
|
|
1602
|
+
ep_register_entity: 'Register Entity',
|
|
1603
|
+
ep_report_trust_issue: 'Report Trust Issue',
|
|
1604
|
+
ep_revoke_commit: 'Revoke Commit',
|
|
1605
|
+
ep_revoke_handshake: 'Revoke Handshake',
|
|
1606
|
+
ep_search_entities: 'Search Entities',
|
|
1607
|
+
ep_submit_receipt: 'Submit Transaction Receipt',
|
|
1608
|
+
ep_trust_evaluate: 'Evaluate Trust Policy',
|
|
1609
|
+
ep_trust_gate: 'Trust Gate Decision',
|
|
1610
|
+
ep_trust_profile: 'Get Trust Profile',
|
|
1611
|
+
ep_verify_commit: 'Verify Commit',
|
|
1612
|
+
ep_verify_delegation: 'Verify Delegation',
|
|
1613
|
+
ep_verify_handshake: 'Verify Handshake',
|
|
1614
|
+
ep_verify_receipt: 'Verify Trust Receipt',
|
|
1615
|
+
ep_verify_zk_proof: 'Verify ZK Trust Proof',
|
|
1616
|
+
};
|
|
1617
|
+
function withAnnotations(tool) {
|
|
1618
|
+
return {
|
|
1619
|
+
...tool,
|
|
1620
|
+
annotations: {
|
|
1621
|
+
title: TOOL_TITLES[tool.name] || tool.name,
|
|
1622
|
+
readOnlyHint: READ_ONLY_TOOLS.has(tool.name),
|
|
1623
|
+
destructiveHint: DESTRUCTIVE_TOOLS.has(tool.name),
|
|
1624
|
+
openWorldHint: false, // every tool talks only to the configured EP API
|
|
1625
|
+
},
|
|
1626
|
+
};
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
const ADVERTISED_TOOLS = (INCLUDE_REGISTRY_TOOLS
|
|
1557
1630
|
? TOOLS
|
|
1558
|
-
: TOOLS.filter((t) => CORE_TOOL_NAMES.has(t.name))
|
|
1631
|
+
: TOOLS.filter((t) => CORE_TOOL_NAMES.has(t.name))
|
|
1632
|
+
).map(withAnnotations);
|
|
1559
1633
|
|
|
1560
1634
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: ADVERTISED_TOOLS }));
|
|
1561
1635
|
|
|
@@ -1612,6 +1686,12 @@ const RESOURCES = [
|
|
|
1612
1686
|
|
|
1613
1687
|
server.setRequestHandler(ListResourcesRequestSchema, async () => ({ resources: RESOURCES }));
|
|
1614
1688
|
|
|
1689
|
+
// Clients (Claude included) probe resources/templates/list on startup whenever
|
|
1690
|
+
// a server advertises the `resources` capability. We expose no URI templates,
|
|
1691
|
+
// but the method must exist — without it the client gets MCP -32601
|
|
1692
|
+
// "Method not found" on every connect.
|
|
1693
|
+
server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => ({ resourceTemplates: [] }));
|
|
1694
|
+
|
|
1615
1695
|
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
1616
1696
|
const { uri } = request.params;
|
|
1617
1697
|
let data;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emilia-protocol/mcp-server",
|
|
3
3
|
"mcpName": "io.github.emiliaprotocol/mcp-server",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"description": "EMILIA Protocol MCP Server — trust enforcement for high-risk actions via MCP. Pre-action binding, policy-bound verification, and accountable human signoff.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"type": "module",
|