Skip to content
Build with AI

MCP and connecting an agent

Connect any agent to your port by signing in, in one command, and see the tools it gets and what their answers look like.

The MCP endpoint is https://getport.app/mcp. You connect by signing in: the first time an agent or an app asks, it sends you to getport.app, you sign in and press Allow, and it is connected. No key. A key still works, for anything that cannot sign in; it is at the end.

One command finds the coding agents on your computer and adds Port_ to the ones you pick:

npx [email protected] https://getport.app/mcp --name port -g

The first time one of them needs your port, your browser opens to sign in.

  • Your own port, read only, the same as a key: every tool below except refresh, which you can tick on the Allow page if you want the app to ask for a fresh read of your wallets.
  • Nothing else. It cannot move funds, sign anything, add a wallet or change a setting, and it never sees your password or your session.
  • You see it and can end it. It is listed under Settings, API access, with a Disconnect button that stops it on its next call. We email you whenever an app is connected, and resetting your password disconnects every app along with every key.

The plugin adds the server and the skills to Claude Code or Codex in one install.

For a client that cannot sign in, make a key under Settings, API access, keep it in PORT_API_KEY, and give it the block for your client. None of them has the key typed in.

claude mcp add --transport http --scope user port https://getport.app/mcp --header "Authorization: Bearer $PORT_API_KEY"

Your shell fills in $PORT_API_KEY when the command runs, so Claude Code saves the key in its own settings. After you revoke or replace the key, run it again.

Every tool reads. There are 12 of them, one per question, and each answers with the same figures as its endpoint. port_refresh is only listed when you allowed refresh, on the Allow page or when you made the key; otherwise it does not exist.

ToolWhat it answersSame figures as
port_overviewwhat is my port worth, by wallet, and what is not countedGET /api/v1/port
port_holdingswhat do I hold, how much of it, and what is each row priced atGET /api/v1/holdings
port_positionswhat do I have in DeFiGET /api/v1/positions
port_perpswhat perps do I have openGET /api/v1/perps
port_predictionswhat prediction markets am I inGET /api/v1/predictions
port_nftswhat NFTs do I hold and what are their floorsGET /api/v1/nfts
port_pnlhow did my trades do, realised and unrealisedGET /api/v1/pnl
port_activitywhat moved in my wallets recentlyGET /api/v1/activity
port_briefingwhat does my briefing say todayGET /api/v1/briefing
port_alertswhich of my alerts have firedGET /api/v1/alerts
port_walletswhich wallets are on my accountGET /api/v1/wallets
port_refreshread my wallets again nowPOST /api/v1/refresh

Each tool answers with a short text block and the figures beside it.

  • The text leads with the caveat. On port_overview and port_holdings, whose answers can leave something out of a headline, the text starts with the sentence saying what, the same one Port_ prints under its own figures. Then comes one line of what came back, then how old it is where the answer has a read time. An agent reads the first sentence, and a figure without its caveat misleads by omission.
  • The figures are the endpoint’s data, as the tool’s structured content, with asOf and notCounted inside them, because some clients read only this part. port_overview sends chainsRead, a count, and chainsWithGaps, the chains that answered short or are still reading, in place of the full per-chain list, and port_holdings pages at 100 rows rather than 500. A tool takes the same arguments as its endpoint’s query parameters, with the same names.
  • A refusal inside a call is an MCP error result with a sentence in it rather than a figure: out of refreshes for the day, no briefing yet or none for that day, a cursor that is not one of ours, or a day that is not YYYY-MM-DD.
  • Everything else is refused before the MCP server sees the request, as plain HTTP with the same bodies the REST API uses: 401 for a missing, revoked or expired key, or a sign-in that was disconnected or has run out (its header says where to sign in again), 402 for a plan without the API (“Agents, MCP and the API are on Pro+ and above.”), 403 for a browser page on another site, and 429 past the minute, day or per-address limit. The errors section has each body.

The MCP server shares the API’s limits, across the whole account, REST and MCP together:

PlanRequests a minuteRequests a dayRefreshes a day
Pro+30025,0003
Ultra (not on sale yet)600100,0003

Free and Pro have no API. Every limit is per account, shared by every key, REST, MCP and every app you connect by signing in.

Every request to /mcp counts, not only tool calls, so the client’s initialize and tools/list spend from the same allowance. port_refresh spends the same refreshes a day as POST /api/v1/refresh, so a second door is not a second allowance.

The server is stateless: every call is one POST with a JSON reply, the key or sign-in is checked on every call, tools/list included, and a sign-in’s Allow is checked again each time, which is why Disconnect stops an app at once, and a deploy costs a client nothing. It answers one request per call, so a batch is refused, and a GET answers 405 rather than holding a stream open.