> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Connect SimpleFunctions tools to Claude Code, Cursor, Cline, and any MCP-compatible agent client.

SimpleFunctions is CLI-first and API-second. Use MCP only when the agent already runs inside an MCP-compatible client and should call SimpleFunctions tools through that adapter.

## Claude Code

```bash theme={null}
claude mcp add simplefunctions --url https://simplefunctions.dev/api/mcp/mcp
```

Then ask Claude Code to call SimpleFunctions tools for market search, world state, screen, inspect, query-gov, or query-econ.

## Remote transport

```http theme={null}
GET /api/mcp/{transport}
POST /api/mcp/{transport}
```

The transport exposes SimpleFunctions tools over MCP. Public tools work without user credentials. Account, portfolio, intent, and exchange-sensitive tools require auth.

## What agents can call

| Job                 | Tool family                                       |
| ------------------- | ------------------------------------------------- |
| Search markets      | query, scan, screen, new markets.                 |
| Read world state    | world snapshot, world delta, inspect.             |
| Pull source context | government, economic, traditional-market anchors. |
| Evaluate theses     | thesis context, signals, evaluations.             |
| Read account state  | authenticated theses, intents, portfolio.         |
| Route workflows     | intents and runtime tools when authorized.        |

## Tool discovery

```bash theme={null}
curl "https://simplefunctions.dev/api/tools"
```

Local CLI equivalent:

```bash theme={null}
sf describe --all --json
sf tools search "world delta" --json
```

Use the CLI manifest when the agent is running on the user's machine. Use
`/api/contracts/tools` for strict SDK/Agent canonical tools. Use `/api/tools`
when the agent is remote and needs the broad hosted HTTP compatibility
inventory. Use MCP last, only when the remote client requires MCP.

## Suggested first calls

```text theme={null}
world_state
query("Fed rate cut")
inspect_ticker("KXRATECUT-26DEC31")
query_econ("unemployment rate")
query_gov("SAVE Act")
```

Start with read-only tools. Require explicit authorization before using write, runtime, or trade tools.
