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.

Signature
pharos_search(query: str, limit: int = 10) -> list[dict]
Parameters
  • query: strNatural-language search query.
  • limit: int (default 10)Maximum number of results to return.
Returns

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.

Signature
pharos_install(package_name: str) -> dict
Parameters
  • package_name: strExact package name from search results.
Returns

dict — install result with status, version, and path.

pharos_connect

Connect to an installed server with the approval flow. Negotiates capabilities.

Signature
pharos_connect(server_name: str, capabilities: list = None) -> dict
Parameters
  • server_name: strName of the installed server to connect to.
  • capabilities: list (default None)Optional list of capabilities to request. Defaults to all.
Returns

dict — connection handle with server info and available tools.

pharos_list_tools

List available tools on a connected server.

Signature
pharos_list_tools(server_name: str) -> list[dict]
Parameters
  • server_name: strName of a connected server.
Returns

list[dict] — list of tool definitions (name, description, input schema).

pharos_call_tool

Call a tool on a connected server and return the result.

Signature
pharos_call_tool(server_name: str, tool_name: str, arguments: dict = None) -> any
Parameters
  • server_name: strName of a connected server.
  • tool_name: strName of the tool to call.
  • arguments: dict (default None)Arguments to pass to the tool.
Returns

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.

agent-config.json
{
  "mcpServers": {
    "pharos": {
      "command": "npx",
      "args": ["@pharos/mcp-server"],
      "env": {
        "PHAROS_API_KEY": "your-api-key"
      }
    }
  }
}