Agent MCP Reference
Tools, MCP Apps UI resources, and configuration for the Pharos MCP Server.
MCP Tools
The Pharos MCP Server exposes 5 tools. Any MCP-compatible agent can discover and call them.
pharos_search
Search the Pharos registry. Returns a list of matching packages ranked by relevance.
pharos_search(query: str, limit: int = 10) -> list[dict]query: str — Natural-language search query.limit: int (default 10) — Maximum number of results to return.
list[dict] — list of package metadata dicts (name, description, version, etc.).
pharos_install
Install an MCP server from the registry. Delegates to the pharos CLI binary when available.
pharos_install(package_name: str) -> dictpackage_name: str — Exact package name from search results.
dict — install result with status, version, and path.
pharos_connect
Connect to an installed server with the approval flow. Negotiates capabilities.
pharos_connect(server_name: str, capabilities: list = None) -> dictserver_name: str — Name of the installed server to connect to.capabilities: list (default None) — Optional list of capabilities to request. Defaults to all.
dict — connection handle with server info and available tools.
pharos_list_tools
List available tools on a connected server.
pharos_list_tools(server_name: str) -> list[dict]server_name: str — Name of a connected server.
list[dict] — list of tool definitions (name, description, input schema).
pharos_call_tool
Call a tool on a connected server and return the result.
pharos_call_tool(server_name: str, tool_name: str, arguments: dict = None) -> anyserver_name: str — Name of a connected server.tool_name: str — Name of the tool to call.arguments: dict (default None) — Arguments to pass to the tool.
any — the tool result, type depends on the tool called.
MCP Apps UI Resources
The server returns HTML resources with the text/html;profile=mcp-app content type. MCP Apps UI compatible clients render these inline in chat for interactive flows.
Approval UI
text/html;profile=mcp-app
Returns an HTML fragment with install approval buttons. Rendered inline in the chat by MCP Apps UI compatible clients.
OAuth UI
text/html;profile=mcp-app
Returns an HTML fragment that renders the OAuth flow. The user authorizes without leaving the chat.
Results UI
text/html;profile=mcp-app
Returns an HTML fragment with formatted search results. Lets the user pick from matches in-chat.
Configuration
Add the Pharos MCP server to your agent config. The exact file depends on the client (see the setup guide), but the server block is the same everywhere.
{
"mcpServers": {
"pharos": {
"command": "npx",
"args": ["@pharos/mcp-server"],
"env": {
"PHAROS_API_KEY": "your-api-key"
}
}
}
}