Skip to content

How to use MCP

View as Markdown

Connect your AI to Port OS with MCP (Model Context Protocol).

Prerequisites

  • A Port OS account.
  • An AI client that supports remote MCP servers and OAuth sign-in.
  • A connected device or a simulator light to test.

1. Add the MCP server

Open your AI client's MCP connector page. Enter this server URL:

MCP server URL
https://api.portoperatingsystem.com/mcp

Choose Streamable HTTP if the client asks for a transport.

If your AI client asks you to set up a client yourself, use dynamic client registration (DCR) or client ID metadata documents (CIMD). Both let your AI client register itself, with nothing to copy. If your client supports neither, register an OAuth client on the clients page and enter its details in your AI client.

2. Authorize your AI

Click your AI client's Connect button and sign in to your Port OS account.

Review the permissions and grant the access you want your agent to have. For example, you can let the agent list devices without letting it control them.

3. Test the connection

Ask your AI to list your connected devices. Then, if you granted control access, try:

Turn off the simulator light via @Port OS.

Use the name of your test light. Check that its state changes to off.

Congratulations!

Your AI is now connected to Port OS with MCP.

What your AI can do

Connection problems

ProblemWhat to check
Sign-in is requested againReconnect using the client's authorization flow. The previous access may have expired.
Access is deniedCheck the account and endpoint access rules.
No matching devicesCheck Your devices and see if the device is there. Connect the provider if the device is missing there too.
A command is rejectedCheck the device's declared messages and payload schema in the capability reference.
Device state is unavailableCheck that the device is online and plugged in, and that the provider connection is stable.

Next steps