Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

32.7 KB
Raw Blame
// The tool policy: every tool on every three.ws MCP server, with its group,
// tier, and, for a financial tool, the confirm flag it requires and the preview
// tool that must run first.
//
// This table is the single source of truth. Hosted servers and stdio packages
// read it at runtime, scripts/build-mcp-skill.mjs renders the model-facing
// skill document from it, and tests/mcp-policy.test.js fails when a server
// ships a tool this table does not classify.
//
// Row helpers:
//   r(group)                         read tier
//   w(group)                         write tier
//   f(group, flag, preview, bind)    financial tier. `bind` lists arguments that
//                                    must match between the preview and the
//                                    call; 'handle>to' means the preview's
//                                    `handle` must equal the call's `to`.
//   own(group, flag, preview)        financial tier whose tool verifies its own
//                                    preview id (the policy layer enforces the
//                                    enablement and the confirm flag only).

const r = (group) => ({ group, tier: 'read' });
const w = (group) => ({ group, tier: 'write' });
const f = (group, confirmFlag, previewTool, bind = []) => ({ group, tier: 'financial', confirmFlag, previewTool, bind });
const own = (group, confirmFlag, previewTool) => ({ group, tier: 'financial', confirmFlag, previewTool, ownsPreview: true });

// Tools a hosted server shares through a common module, listed once.
const GETTING_STARTED = { getting_started: r('utility') };
const READ_RESOURCE = { read_resource: r('utility') };
const MODEL_TOOLS = {
	inspect_model: r('assets'),
	optimize_model: r('assets'),
	validate_model: r('assets'),
	list_animations: r('assets'),
	animation_signature: r('assets'),
	find_similar_animations: r('assets'),
	apply_animation: w('assets'),
	text_to_animation: w('assets'),
};
const PUMP_MARKET = {
	search_tokens: r('intelligence'),
	get_token_details: r('intelligence'),
	get_bonding_curve: r('intelligence'),
	get_token_trades: r('intelligence'),
	get_trending_tokens: r('intelligence'),
	get_new_tokens: r('intelligence'),
	get_graduated_tokens: r('intelligence'),
	get_king_of_the_hill: r('intelligence'),
	get_creator_profile: r('intelligence'),
	get_token_holders: r('intelligence'),
	kol_leaderboard: r('intelligence'),
	pumpfun_bot_status: r('utility'),
	pumpfun_first_claims: r('intelligence'),
	pumpfun_list_claims: r('intelligence'),
	pumpfun_watch_claims: r('intelligence'),
	pumpfun_watch_whales: r('intelligence'),
	pumpfun_quote_swap: r('trading'),
	pumpfun_vanity_mint: r('launch'),
	sns_resolve: r('utility'),
	social_cashtag_sentiment: r('intelligence'),
	social_x_post_impact: r('intelligence'),
};

export const POLICY = {
	// ── Hosted servers ────────────────────────────────────────────────────────

	// /api/mcp
	'three.ws': {
		...GETTING_STARTED,
		...READ_RESOURCE,
		...MODEL_TOOLS,
		attach_avatar_to_agent: w('agents'),
		call_agent: w('agents'),
		copy_status: r('trading'),
		copy_subscribe: w('trading'),
		create_agent: w('agents'),
		create_gated_embed: w('integrations'),
		crypto_data: r('intelligence'),
		search_docs: r('utility'),
		expand: r('utility'),
		delete_avatar: f('assets', 'confirm_delete', 'get_avatar', ['id']),
		diff_models: r('assets'),
		forget: f('agents', 'confirm_delete', 'recall', ['agent_id']),
		garment_status: r('assets'),
		generate_garment: w('assets'),
		get_3d_asset_onchain: r('assets'),
		get_avatar: r('assets'),
		get_catalog_item: r('assets'),
		get_embed_code: r('integrations'),
		get_feedback_repro: r('utility'),
		get_item_source: r('assets'),
		identity_check: r('agents'),
		list_feedback: r('utility'),
		list_garment_catalog: r('assets'),
		list_my_agents: r('agents'),
		list_my_avatars: r('assets'),
		list_sign_vocabulary: r('assets'),
		mint_3d_asset: w('assets'),
		oracle_arm_watch: f('trading', 'confirm_spend', 'oracle_watch_status', ['agent_id']),
		oracle_coin: r('intelligence'),
		oracle_top_plays: r('intelligence'),
		oracle_watch_status: r('intelligence'),
		print_analyze: r('assets'),
		print_quote: r('assets'),
		pumpfun_creator_intel: r('intelligence'),
		pumpfun_recent_claims: r('intelligence'),
		pumpfun_recent_graduations: r('intelligence'),
		pumpfun_token_intel: r('intelligence'),
		recall: r('agents'),
		register_agent: w('agents'),
		remember: w('agents'),
		render_avatar: r('assets'),
		render_avatar_image: w('assets'),
		search_catalog: r('assets'),
		search_public_avatars: r('assets'),
		sign_text: r('assets'),
		solana_agent_attestations: r('agents'),
		solana_agent_passport: r('agents'),
		solana_agent_reputation: r('agents'),
		token_snapshot: r('intelligence'),
		trader_leaderboard: r('intelligence'),
		trader_profile: r('intelligence'),
		home_status: r('integrations'),
		home_list_macros: r('integrations'),
		home_grants: r('integrations'),
		home_activate: f('integrations', 'confirm_run', 'home_list_macros', ['home_id']),
		home_call: f('integrations', 'confirm_run', 'home_status', ['home_id']),
		list_available_skills: r('skills'),
		import_community_skill: w('skills'),
		list_custom_skills: r('skills'),
		get_custom_skill: r('skills'),
		create_custom_skill: w('skills'),
		update_custom_skill: w('skills'),
		delete_custom_skill: f('skills', 'confirm_delete', 'get_custom_skill', ['agent_id', 'skill_id']),
		// External skill import (api/_mcp/tools/skill-imports.js). Every write is
		// undone by refusing, deleting or unpublishing; install and publish also
		// refuse in the handler without the owner's explicit flag.
		browse_external_skills: r('skills'),
		scan_external_skill: w('skills'),
		install_external_skill: w('skills'),
		external_skill_update_diff: w('skills'),
		skill_fork: w('skills'),
		skill_publish: w('skills'),
		trade_receipt: r('trading'),
		sentiment_scout: r('intelligence'),
		// Destination whitelist (api/_mcp/tools/whitelist.js). Writes only propose or
		// remove: activating an address needs the owner's step-up in the app.
		get_whitelist: r('wallet'),
		add_to_whitelist: w('wallet'),
		remove_from_whitelist: w('wallet'),
		// Agent cards (api/_mcp/tools/cards.js). The service verifies its own
		// quote and reveal ids, so the policy enforces enablement and the flag.
		agent_card_search_merchants: r('cards'),
		agent_card_search_gift_cards: r('cards'),
		agent_card_quote: w('cards'),
		agent_card_create: own('cards', 'confirm_spend', 'agent_card_quote'),
		agent_card_list: r('cards'),
		agent_card_get: r('cards'),
		agent_card_status: r('cards'),
		agent_card_balance: r('cards'),
		agent_card_data: w('cards'),
		agent_card_reveal: own('cards', 'confirm_reveal', 'agent_card_data'),
		// Web domains (api/_mcp/tools/domains.js). Registration spends credits, so it
		// is financial: domain_register_quote validates against the registrar and
		// domain_register needs its quote_id and confirm_spend.
		domain_search: r('domains'),
		domain_check: r('domains'),
		domain_pricing: r('domains'),
		domain_register_quote: w('domains'),
		domain_register: f('domains', 'confirm_spend', 'domain_register_quote', ['domain', 'contact', 'auto_renew', 'privacy']),
		domain_status: r('domains'),
		domain_connect: w('domains'),
		domain_connect_status: r('domains'),
		paired_markets: r('launch'),
		paired_coins: r('launch'),
		paired_coin: r('launch'),
		paired_launch_quote: w('launch'),
		paired_launch: f('launch', 'confirm_launch', 'paired_launch_quote', [
			'agent_id', 'markets', 'weights', 'name', 'symbol', 'description', 'image_url', 'socials', 'dev_buy',
		]),
		launch_lanes: r('launch'),
		launch_status: r('launch'),
		uniswap_launch_quote: w('launch'),
		uniswap_launch: f('launch', 'confirm_launch', 'uniswap_launch_quote', [
			'agent_id', 'name', 'symbol', 'description', 'image_url', 'socials', 'fee_tier', 'start_market_cap_eth', 'lock', 'fee_recipient',
		]),
		paired_fees: r('launch'),
		paired_claim_fees: w('launch'),
		agent_card_cancel: own('cards', 'confirm_cancel', 'agent_card_get'),
		agent_card_withdraw: own('cards', 'confirm_withdraw', 'agent_card_balance'),
		agent_card_connect: r('cards'),
		agent_card_connect_link: w('cards'),
		// Agent lifecycle, runs and automations (api/_mcp/tools/agent-lifecycle.js).
		// Deletes are financial-tier because they cannot be undone. Swap and
		// transfer automations gate themselves: connector keys are refused, the
		// bearer needs wallet:write, and the call needs confirm_spend after the
		// terms are shown.
		get_agent: r('agents'),
		update_agent: w('agents'),
		delete_agent: f('agents', 'confirm_delete', 'get_agent', ['agent_id']),
		start_agent: w('agents'),
		stop_agent: w('agents'),
		upload_agent_avatar: w('agents'),
		create_agent_run: w('runs'),
		update_agent_run: w('runs'),
		cancel_agent_run: w('runs'),
		get_agent_run_steps: r('runs'),
		automation_list: r('runs'),
		automation_get: r('runs'),
		automation_create: w('runs'),
		automation_update: w('runs'),
		automation_delete: f('runs', 'confirm_delete', 'automation_get', ['automation_id']),
		automation_trigger: w('runs'),
		// Agent mail (api/_mcp/tools/mail.js). The service binds each quote to
		// the exact draft it priced, so create, send and reply verify their own
		// quote_id; the policy layer enforces enablement and the confirm flag.
		agent_mail_get_address: r('mail'),
		agent_mail_quote: w('mail'),
		agent_mail_create: own('mail', 'confirm_spend', 'agent_mail_quote'),
		agent_mail_send: own('mail', 'confirm_send', 'agent_mail_quote'),
		agent_mail_reply: own('mail', 'confirm_send', 'agent_mail_quote'),
		agent_mail_list: r('mail'),
		agent_mail_read: r('mail'),
		agent_mail_search: r('mail'),
		agent_mail_delete: w('mail'),
		inbox_list: r('mail'),
		inbox_read: r('mail'),
		inbox_wait_for_code: r('mail'),
	},

	// /api/mcp-agent
	'threews-agent': {
		...GETTING_STARTED,
		...READ_RESOURCE,
		wallet_status: r('wallet'),
		// Account linking (api/_lib/account-link/external-wallets.js): reading
		// what is linked is a wallet read; attaching a payout wallet is a wallet
		// write that moves nothing, and a replacement waits on the owner's
		// approval server-side.
		get_linked_accounts: r('wallet'),
		set_external_wallet: w('wallet'),
		provision_wallet: w('wallet'),
		find_services: r('x402'),
		pay_quote: r('x402'),
		pay_and_call: f('x402', 'confirm_payment', 'pay_quote', ['resource_url']),
		monetize_endpoint: w('x402'),
		// Named commerce tools (order 521, api/_mcpagent/named-services-tools.js),
		// generated from packages/x402-mcp/src/tools.json. Each financial tool is
		// gated on its OWN _quote preview tool, so a quote_id from one service's
		// quote can never unlock a different service's payment.
		weather_forecast_quote: r('x402'),
		weather_forecast: f('x402', 'confirm_payment', 'weather_forecast_quote'),
		weather_go_no_go_quote: r('x402'),
		weather_go_no_go: f('x402', 'confirm_payment', 'weather_go_no_go_quote'),
		carbon_now_quote: r('x402'),
		carbon_now: f('x402', 'confirm_payment', 'carbon_now_quote'),
		carbon_best_window_quote: r('x402'),
		carbon_best_window: f('x402', 'confirm_payment', 'carbon_best_window_quote'),
		domain_rdap_check_quote: r('x402'),
		domain_rdap_check: f('x402', 'confirm_payment', 'domain_rdap_check_quote'),
		domain_rdap_check_bulk_quote: r('x402'),
		domain_rdap_check_bulk: f('x402', 'confirm_payment', 'domain_rdap_check_bulk_quote'),
		research_search_quote: r('x402'),
		research_search: f('x402', 'confirm_payment', 'research_search_quote'),
		research_paper_quote: r('x402'),
		research_paper: f('x402', 'confirm_payment', 'research_paper_quote'),
		research_bibliography_quote: r('x402'),
		research_bibliography: f('x402', 'confirm_payment', 'research_bibliography_quote'),
		book_search_quote: r('x402'),
		book_search: f('x402', 'confirm_payment', 'book_search_quote'),
		book_read_quote: r('x402'),
		book_read: f('x402', 'confirm_payment', 'book_read_quote'),
		news_wire_search_quote: r('x402'),
		news_wire_search: f('x402', 'confirm_payment', 'news_wire_search_quote'),
		news_wire_poll_quote: r('x402'),
		news_wire_poll: f('x402', 'confirm_payment', 'news_wire_poll_quote'),
		transit_plan_quote: r('x402'),
		transit_plan: f('x402', 'confirm_payment', 'transit_plan_quote'),
		transit_delays_quote: r('x402'),
		transit_delays: f('x402', 'confirm_payment', 'transit_delays_quote'),
		places_search_quote: r('x402'),
		places_search: f('x402', 'confirm_payment', 'places_search_quote'),
		places_detail_quote: r('x402'),
		places_detail: f('x402', 'confirm_payment', 'places_detail_quote'),
		// Solana trading (api/_mcpagent/trading-tools.js over the shared registry
		// api/_lib/trading-tools/registry.js). swap_execute verifies its own signed,
		// single-use quote_id and re-prices it before signing.
		swap_quote: r('trading'),
		swap_simulate: r('trading'),
		swap_execute: own('trading', 'confirm_swap', 'swap_quote'),
		token_search: r('trading'),
		get_price: r('trading'),
		get_indicators: r('trading'),
		get_market_signals: r('trading'),
		get_news_feed: r('trading'),
		arbitrage_prices: r('trading'),
		arbitrage_quote: r('trading'),
		browse_marketplace: r('marketplace'),
		browse_public_agents: r('marketplace'),
		get_listing: r('marketplace'),
		get_marketplace_history: r('marketplace'),
		preview_marketplace_action: r('marketplace'),
		create_marketplace_listing: own('marketplace', 'confirm_listing', 'preview_marketplace_action'),
		delist_marketplace_listing: own('marketplace', 'confirm_delist', 'preview_marketplace_action'),
		place_bid: own('marketplace', 'confirm_bid', 'preview_marketplace_action'),
		buy_now: own('marketplace', 'confirm_payment', 'preview_marketplace_action'),
		get_my_bids: r('marketplace'),
		get_received_bids: r('marketplace'),
		accept_marketplace_bid: own('marketplace', 'confirm_accept', 'preview_marketplace_action'),
		reject_marketplace_bid: w('marketplace'),
		withdraw_marketplace_bid: own('marketplace', 'confirm_withdraw', 'preview_marketplace_action'),
		get_agent_transfer: r('marketplace'),
		resume_agent_transfer: w('marketplace'),
		// Prediction markets (api/_mcpagent/predictions-tools.js). The engine
		// issues and checks its own preview ids.
		predictions_events: r('predictions'),
		predictions_event: r('predictions'),
		predictions_positions: r('predictions'),
		predictions_open_preview: r('predictions'),
		predictions_open: own('predictions', 'confirm_trade', 'predictions_open_preview'),
		predictions_close_preview: r('predictions'),
		predictions_close: own('predictions', 'confirm_trade', 'predictions_close_preview'),
		predictions_redeem_preview: r('predictions'),
		predictions_redeem: own('predictions', 'confirm_trade', 'predictions_redeem_preview'),
		predictions_watch: w('predictions'),
		// Perpetual futures (api/_mcpagent/perps-tools.js). The perps service
		// issues and checks its own preview ids and refuses a moved quote.
		perps_markets: r('perps'),
		perps_market_data: r('perps'),
		perps_account: r('perps'),
		perps_positions: r('perps'),
		perps_order_preview: r('perps'),
		perps_action_preview: r('perps'),
		perps_order_execute: own('perps', 'confirm_trade', 'perps_order_preview'),
		perps_collateral_deposit: own('perps', 'confirm_trade', 'perps_action_preview'),
		perps_collateral_withdraw: own('perps', 'confirm_trade', 'perps_action_preview'),
		perps_order_cancel: own('perps', 'confirm_trade', 'perps_action_preview'),
		perps_flatten: own('perps', 'confirm_trade', 'perps_action_preview'),
		perps_limits: w('perps'),
		// Papertrade synthetic perps on HyperEVM (api/_mcpagent/papertrade-tools.js).
		// Reads only: they price and report, nothing signs or trades.
		papertrade_markets: r('perps'),
		papertrade_quote: r('perps'),
		papertrade_account: r('perps'),
		papertrade_protocol: r('perps'),
		// Resting orders and DCA on any SPL token (api/_mcpagent/orders-tools.js).
		// The create tools verify their own signed, single-use preview id, bound to
		// the agent and to the create tool it was issued for.
		order_preview: r('trading'),
		limit_order_create: own('trading', 'confirm_order', 'order_preview'),
		stop_order_create: own('trading', 'confirm_order', 'order_preview'),
		trailing_order_create: own('trading', 'confirm_order', 'order_preview'),
		ladder_order_create: own('trading', 'confirm_order', 'order_preview'),
		oco_order_create: own('trading', 'confirm_order', 'order_preview'),
		limit_order_list: r('trading'),
		limit_order_cancel: w('trading'),
		limit_order_history: r('trading'),
		order_book: r('trading'),
		dca_preview: r('trading'),
		dca_create: own('trading', 'confirm_dca', 'dca_preview'),
		dca_list: r('trading'),
		dca_cancel: w('trading'),
		// Portfolio (api/_mcpagent/portfolio-tools.js): valued holdings, the
		// hourly snapshot history and FIFO P&L. Reads only.
		get_portfolio: r('wallet'),
		get_balance_history: r('wallet'),
		get_pnl: r('wallet'),
		// Launch sniper, signal subscriptions and alert rules
		// (api/_mcpagent/sniper-alert-tools.js). Arming the sniper commits SOL, so
		// it binds the previewed agent, network and sizing.
		sniper_status: r('trading'),
		sniper_activate_preview: r('trading'),
		sniper_activate: f('trading', 'confirm_spend', 'sniper_activate_preview', ['agent_id', 'network', 'per_trade_sol', 'daily_budget_sol', 'stop_loss_pct', 'take_profit_pct', 'trigger', 'max_concurrent_positions']),
		sniper_deactivate: w('trading'),
		sniper_subscribe: w('trading'),
		alert_rule_create: w('intelligence'),
		alert_rule_list: r('intelligence'),
		alert_rule_delete: f('intelligence', 'confirm_delete', 'alert_rule_list', ['rule_id']),
		// Trader duels and challenges (api/_mcpagent/duels-tools.js). Free-play.
		duel_challenge: w('predictions'),
		duel_accept: w('predictions'),
		duel_details: r('predictions'),
		duel_markets: r('predictions'),
		// Event Markets (api/_mcpagent/event-markets-tools.js). Free-play points;
		// event_market_pick refuses without confirm: true.
		event_markets_list: r('predictions'),
		event_market: r('predictions'),
		event_market_pick: w('predictions'),
		// Agents as forecasters (api/_mcpagent/event-market-forecast-tools.js).
		// event_market_agent_pick refuses without confirm: true and checks the owner.
		event_market_analyze: r('predictions'),
		event_market_forecasters: r('predictions'),
		event_market_agent_pick: w('predictions'),
		// Agent commerce (api/_mcpagent/commerce-tools.js). The library consumes
		// each preview id itself (single use, bound to the agent, 10 minutes),
		// so the policy layer enforces only the confirm flag. spending_setup is a
		// proposal: the owner approves it on three.ws with a step-up check.
		invoice_create: w('commerce'),
		invoice_details: r('commerce'),
		invoice_list: r('commerce'),
		invoice_verify: r('commerce'),
		invoice_cancel: w('commerce'),
		agent_send_preview: r('commerce'),
		agent_send: own('commerce', 'confirm_send', 'agent_send_preview'),
		offer_list: r('commerce'),
		agent_sell: w('commerce'),
		agent_buy: r('commerce'),
		agent_buy_confirm: own('commerce', 'confirm_payment', 'agent_buy'),
		spending_check: r('commerce'),
		spending_setup: w('commerce'),
	},

	// /api/mcp-3d
	'threews-3d-studio': {
		...GETTING_STARTED,
		...READ_RESOURCE,
		...MODEL_TOOLS,
		text_to_3d: w('assets'),
		image_to_3d: w('assets'),
		generation_status: r('assets'),
		capture_scene: w('assets'),
		preview_3d: r('assets'),
		remove_background: w('assets'),
		remesh_model: w('assets'),
		stylize_model: w('assets'),
		segment_model: w('assets'),
		retexture_model: w('assets'),
		retexture_region: w('assets'),
		auto_rig_model: w('assets'),
		pose_model: r('assets'),
		direct_prompt: w('assets'),
		generate_material: w('assets'),
		cad_generate: w('assets'),
		cad_rebuild: w('assets'),
		save_avatar: w('assets'),
		export_ar: r('assets'),
		verify_provenance: r('assets'),
		anchor_provenance: w('assets'),
		grade_sim_readiness: r('assets'),
		validate_spatial_response: r('utility'),
		create_agent_persona: w('agents'),
		get_agent_persona: r('agents'),
		persona_say: w('agents'),
		persona_identity: r('wallet'),
		persona_payment_preview: r('wallet'),
		persona_tip: f('wallet', 'confirm_send', 'persona_payment_preview', ['persona_id', 'to', 'usdc']),
		persona_send: f('wallet', 'confirm_send', 'persona_payment_preview', ['persona_id', 'to', 'usdc']),
		x402_preflight: r('x402'),
	},

	// /api/mcp-studio (free, keyless)
	'threews-3d-studio-free': {
		search_docs: r('utility'),
		forge_free: w('assets'),
		text_to_avatar: w('assets'),
		mesh_forge: w('assets'),
		rig_mesh: w('assets'),
		forge_avatar: w('assets'),
		refine_model: w('assets'),
		check_job: w('assets'),
		get_job: w('assets'),
		look_at_model: r('assets'),
		search_catalog: r('assets'),
		get_catalog_item: r('assets'),
		get_item_source: r('assets'),
		create_agent_persona: w('agents'),
		get_agent_persona: r('agents'),
		persona_say: w('agents'),
	},

	// /api/mcp-bazaar
	'threews-x402-bazaar': {
		...GETTING_STARTED,
		...READ_RESOURCE,
		search_services: r('x402'),
		browse_services: r('x402'),
		get_service: r('x402'),
		bazaar_service_details: r('x402'),
	},

	// /api/ibm-mcp
	'ibm-x402-mcp-remote': {
		...GETTING_STARTED,
		ibm_granite_getting_started: r('utility'),
		ibm_granite_chat: r('chat'),
		ibm_granite_code: r('chat'),
		ibm_granite_embed: r('chat'),
		ibm_granite_analyze: r('chat'),
		ibm_granite_forecast: r('chat'),
	},

	// /api/pump-fun-mcp
	'threews-pumpfun': {
		...PUMP_MARKET,
		sns_reverseLookup: r('utility'),
		get_coin_intel: r('intelligence'),
		get_oracle_conviction: r('intelligence'),
		pumpfun_upload_metadata: w('launch'),
	},

	// ── stdio packages (npx -y @three-ws/<name>) ──────────────────────────────

	'activity-mcp': {
		get_feed_events: r('intelligence'),
		get_holder_leaderboard: r('intelligence'),
		get_tier_info: r('intelligence'),
		get_trending_agents: r('intelligence'),
		get_trending_coins: r('intelligence'),
	},
	'agenc-mcp': {
		get_agent: r('agents'),
		get_task: r('marketplace'),
		link_agent: r('agents'),
		list_tasks: r('marketplace'),
		query_x402_services: r('x402'),
	},
	'agentcore-payments-mcp': {
		create_payment_session: w('x402'),
		quote_session_payment: r('x402'),
		pay_with_session: f('x402', 'confirm_payment', 'quote_session_payment', ['url', 'method']),
		check_payment_session: r('x402'),
		list_payment_sessions: r('x402'),
		cancel_payment_session: f('x402', 'confirm_delete', 'check_payment_session', ['session_id']),
	},
	'agora-mcp': {
		agora_board: r('marketplace'),
		agora_pulse: r('marketplace'),
		agora_citizens: r('marketplace'),
		agora_passport: r('marketplace'),
		agora_professions: r('marketplace'),
		agora_quote_register: r('marketplace'),
		agora_register: f('marketplace', 'confirm_spend', 'agora_quote_register', ['handle', 'erc8004AgentId', 'mplCoreAsset', 'stakeLamports', 'cluster']),
		agora_claim_task: w('marketplace'),
		agora_complete_task: w('marketplace'),
		agora_quote_task: r('marketplace'),
		agora_post_task: f('marketplace', 'confirm_spend', 'agora_quote_task', ['description', 'rewardAmount', 'rewardMint', 'maxWorkers', 'cluster']),
	},
	'alerts-mcp': {
		create_alert_rule: w('intelligence'),
		update_alert_rule: w('intelligence'),
		delete_alert_rule: f('intelligence', 'confirm_delete', 'list_alert_rules'),
		get_alert_history: r('intelligence'),
		list_alert_rules: r('intelligence'),
	},
	'alibaba-cloud-mcp': {
		qwen_chat: r('chat'),
		qwen_embed: r('chat'),
		qwen_list_models: r('chat'),
	},
	'assistant-mcp': {
		build_assistant_widget: r('integrations'),
		list_assistant_options: r('integrations'),
	},
	'audio-mcp': {
		audio_to_face: r('assets'),
		motion_capture_clip: r('assets'),
		motion_capture_clips: r('assets'),
		speech_to_text: r('utility'),
		text_to_speech: r('utility'),
	},
	'autopilot-mcp': {
		adjust_proposal: w('runs'),
		compute_trust: r('runs'),
		dismiss_proposal: w('runs'),
		dryrun_proposal: r('runs'),
		execute_proposal: f('runs', 'confirm_transfer', 'dryrun_proposal', ['agentId', 'proposalId']),
		generate_proposals: w('runs'),
		get_autopilot_config: r('runs'),
		list_autopilot_activity: r('runs'),
		list_proposals: r('runs'),
		set_autopilot_config: w('runs'),
		undo_action: w('runs'),
	},
	'avatar-agent-mcp': {
		inspect_glb: r('assets'),
		validate_glb: r('assets'),
		optimize_glb: r('assets'),
		thumbnail_glb: r('assets'),
		viewer_url: r('assets'),
		list_avatars: r('assets'),
		list_animations: r('assets'),
		spawn_avatar: w('assets'),
		dress_avatar: w('assets'),
		render_avatar: r('assets'),
		generate_avatar: w('assets'),
		speak: w('assets'),
		wallet_create: w('wallet'),
		wallet_balance: r('wallet'),
		wallet_send_preview: r('wallet'),
		wallet_send: f('wallet', 'confirm_transfer', 'wallet_send_preview', ['to', 'sol']),
		pump_snapshot: r('intelligence'),
		pump_buy_quote: r('trading'),
		pump_buy: f('trading', 'confirm_swap', 'pump_buy_quote', ['target', 'buySol', 'slippageBps', 'jitoBundle']),
		pump_launch_preview: r('launch'),
		pump_launch: f('launch', 'confirm_launch', 'pump_launch_preview', ['name', 'symbol', 'rentSol', 'devBuySol', 'jitoTipSol']),
		pump_collect_preview: r('launch'),
		pump_collect_fees: f('launch', 'confirm_withdraw', 'pump_collect_preview', ['destination']),
		ens_sns_resolve: r('utility'),
	},
	'billing-mcp': {
		export_billing_history: r('billing'),
		get_billing_summary: r('billing'),
		get_fee_info: r('billing'),
		get_receipt: r('billing'),
		query_usage: r('billing'),
	},
	'blender-mcp': {
		blender_convert: w('assets'),
		blender_forge_import: w('assets'),
		blender_info: r('assets'),
		blender_optimize: w('assets'),
		blender_render: w('assets'),
		blender_run_python: f('assets', 'confirm_run', 'blender_info'),
		blender_scene_info: r('assets'),
	},
	'brain-mcp': {
		chat: r('chat'),
		list_providers: r('chat'),
	},
	'clash-mcp': {
		enlist_faction: w('utility'),
		get_clash_leaderboard: r('utility'),
		get_clash_state: r('utility'),
		rally_faction: w('utility'),
	},
	'concierge-mcp': {
		concierge_ask: r('integrations'),
		concierge_avatars: r('integrations'),
		concierge_embed: r('integrations'),
	},
	'copy-mcp': {
		cancel_subscription: f('trading', 'confirm_delete', 'list_subscriptions'),
		create_subscription: w('trading'),
		get_earnings: r('trading'),
		get_executions: r('trading'),
		list_subscriptions: r('trading'),
		record_execution: w('trading'),
		update_subscription: w('trading'),
	},
	'herald-mcp': {
		announce: w('mail'),
		announce_result: w('mail'),
		check_rail: r('mail'),
	},
	'home-mcp': {
		home_overview: r('integrations'),
		list_entities: r('integrations'),
		list_macros: r('integrations'),
		call_service: f('integrations', 'confirm_run', 'list_entities'),
		preview_macro: r('integrations'),
		run_macro: f('integrations', 'confirm_run', 'preview_macro', ['phrase']),
	},
	'ibm-watsonx-mcp': {
		watsonx_chat: r('chat'),
		watsonx_embed: r('chat'),
		watsonx_forecast: r('chat'),
		watsonx_generate: r('chat'),
		watsonx_list_models: r('chat'),
		watsonx_tokenize: r('chat'),
	},
	'ibm-x402-mcp': {
		ibm_granite_getting_started: r('utility'),
		ibm_granite_chat: r('chat'),
		ibm_granite_code: r('chat'),
		ibm_granite_embed: r('chat'),
		ibm_granite_analyze: r('chat'),
		ibm_granite_forecast: r('chat'),
	},
	'intel-mcp': {
		copy_smart_wallets: r('intelligence'),
		kol_leaderboard: r('intelligence'),
		kol_trades: r('intelligence'),
		signal_feed: r('intelligence'),
		smart_money_coin: r('intelligence'),
		wallet_intel: r('intelligence'),
	},
	'knock-mcp': {
		knock_act: w('mail'),
		knock_directory: r('mail'),
		knock_inbox: r('mail'),
		knock_quote: r('mail'),
		knock_receipt: r('mail'),
		knock_send: w('mail'),
	},
	'kol-mcp': {
		get_wallet_portfolio: r('intelligence'),
		get_wallet_trades: r('intelligence'),
	},
	'loom-mcp': {
		get_creation: r('assets'),
		get_loom_feed: r('assets'),
		submit_creation: w('assets'),
	},
	'marketplace-mcp': {
		agent_categories: r('marketplace'),
		agent_detail: r('marketplace'),
		browse_agents: r('marketplace'),
		browse_skills: r('marketplace'),
		skill_categories: r('marketplace'),
	},
	'metaplex-agent-mcp': {
		preview_agent_mint: r('agents'),
		mint_onchain_agent: f('agents', 'confirm_spend', 'preview_agent_mint', ['network', 'name']),
		prepare_agent_mint: r('agents'),
		send_signed_transaction: f('agents', 'confirm_send', 'prepare_agent_mint'),
		preview_agent_identity: r('agents'),
		register_agent_identity: f('agents', 'confirm_spend', 'preview_agent_identity', ['asset', 'name', 'network']),
		get_onchain_agent: r('agents'),
		agent_wallet: r('wallet'),
		build_registration: r('agents'),
		list_onchain_agents: r('agents'),
		three_status: r('agents'),
	},
	'naming-mcp': {
		sns_resolve: r('utility'),
		sns_reverse: r('utility'),
		threews_availability: r('utility'),
	},
	'notifications-mcp': {
		delete_notification: f('account', 'confirm_delete', 'list_notifications'),
		get_preferences: r('account'),
		list_notifications: r('account'),
		mark_read: w('account'),
		register_push_device: w('account'),
		set_preferences: w('account'),
		unregister_push_device: f('account', 'confirm_delete', 'get_preferences'),
	},
	'portfolio-mcp': {
		get_portfolio_asset: r('wallet'),
		get_portfolio_history: r('wallet'),
		get_portfolio_summary: r('wallet'),
		get_trades_feed: r('intelligence'),
		get_wallet_balances: r('wallet'),
		preview_transfer: r('wallet'),
		send_transfer: f('wallet', 'confirm_transfer', 'preview_transfer', ['recipient', 'amount', 'mint']),
	},
	'provenance-mcp': {
		append_agent_action: w('agents'),
		list_agent_actions: r('agents'),
		query_action: r('agents'),
	},
	'pumpfun-mcp': {
		...PUMP_MARKET,
		pumpfun_token_3d: r('assets'),
	},
	'scene-mcp': {
		build_world: w('assets'),
		compose_scene: w('assets'),
		export_scene: w('assets'),
		get_scene: r('assets'),
		list_scenes: r('assets'),
	},
	'signals-mcp': {
		get_mirror_leaderboard: r('trading'),
		get_subscriptions: r('trading'),
		list_signal_feeds: r('trading'),
		set_subscription_status: w('trading'),
		subscribe_signal: f('trading', 'confirm_spend', 'list_signal_feeds'),
	},
	'solana-memo-media-mcp': {
		decode_solana_memo_data_uri: r('utility'),
		extract_solana_memo_media: r('utility'),
		find_solana_memo_media: r('utility'),
		get_solana_memo_media_status: r('utility'),
	},
	'three-token-mcp': {
		three_balance: r('wallet'),
		three_price: r('wallet'),
		three_burn: f('wallet', 'confirm_spend', 'three_price', ['usd']),
	},
	'threews-avatar-mcp': {
		avatar: r('assets'),
		avatar_embed_code: r('integrations'),
		get_avatar: r('assets'),
		render_avatar: r('assets'),
	},
	'tutor-mcp': {
		close_session: w('chat'),
		load_session: r('chat'),
	},
	'vanity-mcp': {
		vanity_appraise: r('marketplace'),
		vanity_board: r('marketplace'),
		vanity_config: r('marketplace'),
		vanity_gallery: r('marketplace'),
		vanity_leaderboard: r('marketplace'),
		vanity_open: r('marketplace'),
		vanity_quote: r('marketplace'),
		vanity_stats: r('marketplace'),
	},
	'vision-mcp': {
		analyze_image: r('utility'),
		describe_image: r('utility'),
		get_vision_status: r('utility'),
	},
	'x402-mcp': {
		x402_wallet: r('wallet'),
		find_services: r('x402'),
		inspect_endpoint: r('x402'),
		pay_and_call: f('x402', 'confirm_payment', 'inspect_endpoint', ['url', 'method']),
		spending_report: r('x402'),
		// Named commerce tools (order 521, packages/x402-mcp/src/tools/named-services.js).
		// The stdio package enforces its own confirm gate inline (config.js
		// REQUIRE_CONFIRM via lib/pay-core.js), not this table's preview/confirm
		// flow, so each is listed read/write only for the skill document and the
		// settings page; its financial tier is unused by the stdio runtime.
		weather_forecast: w('x402'),
		weather_go_no_go: w('x402'),
		carbon_now: w('x402'),
		carbon_best_window: w('x402'),
		domain_rdap_check: w('x402'),
		domain_rdap_check_bulk: w('x402'),
		research_search: w('x402'),
		research_paper: w('x402'),
		research_bibliography: w('x402'),
		book_search: w('x402'),
		book_read: w('x402'),
		news_wire_search: w('x402'),
		news_wire_poll: w('x402'),
		transit_plan: w('x402'),
		transit_delays: w('x402'),
		places_search: w('x402'),
		places_detail: w('x402'),
	},
};

/** Human names for each server id, for the skill document and the settings page. */
export const SERVERS = {
	'three.ws': { title: 'three.ws', endpoint: '/api/mcp', transport: 'remote' },
	'threews-agent': { title: 'Agent Wallet', endpoint: '/api/mcp-agent', transport: 'remote' },
	'threews-3d-studio': { title: '3D Studio', endpoint: '/api/mcp-3d', transport: 'remote' },
	'threews-3d-studio-free': { title: '3D Studio (free)', endpoint: '/api/mcp-studio', transport: 'remote' },
	'threews-x402-bazaar': { title: 'x402 Bazaar', endpoint: '/api/mcp-bazaar', transport: 'remote' },
	'ibm-x402-mcp-remote': { title: 'IBM Granite', endpoint: '/api/ibm-mcp', transport: 'remote' },
	'threews-pumpfun': { title: 'pump.fun data', endpoint: '/api/pump-fun-mcp', transport: 'remote' },
	...Object.fromEntries(
		Object.keys(POLICY)
			.filter((id) => id.endsWith('-mcp'))
			.map((id) => [id, { title: `@three-ws/${id}`, endpoint: `npx -y @three-ws/${id}`, transport: 'stdio' }]),
	),
};