MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / configToAgent

Method configToAgent

server/src/agent-service.ts:162–177  ·  view source on GitHub ↗

* Convert AgentConfig + MemberProfile to Agent format

(config: AgentConfig, profile: MemberProfile)

Source from the content-addressed store, hash-verified

160 * Convert AgentConfig + MemberProfile to Agent format
161 */
162 private configToAgent(config: AgentConfig, profile: MemberProfile): Agent {
163 return {
164 name: config.name || profile.display_name,
165 url: config.url,
166 type: (config.type as AgentType) || "buying",
167 protocol: "mcp",
168 description: profile.description || "",
169 mcp_endpoint: config.url,
170 contact: {
171 name: profile.display_name,
172 email: profile.contact_email || "",
173 website: profile.contact_website || "",
174 },
175 added_date: profile.created_at.toISOString().split("T")[0],
176 };
177 }
178
179 /**
180 * Convert DiscoveredAgent to Agent format

Callers 2

listAgentsMethod · 0.95
getAgentByUrlMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected