The MCP Server page starts and stops the app's local Model Context Protocol server. MCP lets a compatible client, such as an AI assistant or automation tool, discover app-provided tools and request those tools through a local HTTP endpoint.

The server is built into the running app. It is not a separate command-line service, and it is not a public internet service. Start it only when you want an MCP client to connect.

What MCP can control

MCP exposes domain capabilities that the app explicitly publishes. It is not a general remote-control surface for the app window.

For ControlMyNikon, the first useful module is NikonMCP. NikonMCP is for Nikon camera state and camera actions such as capture, live view, connection control, and contrast autofocus.

Use NikonMCP for the Nikon-specific tool list and camera-state details.

Page controls

  • Start begins hosting the MCP endpoint.
  • Stop ends the MCP endpoint and releases the port.
  • Address sets the local address to listen on.
  • Port sets the TCP port.
  • Configured endpoint shows the URL to give to the MCP client.
  • Copy URL copies the configured endpoint.
  • Bearer token is the token clients must send with requests.
  • Copy token copies the token.
  • Regenerate token creates a new token and invalidates the old one after the server is restarted.
  • Modules lists the MCP modules declared by the app, such as NikonMCP.
  • Enabled or Disabled controls whether a module contributes tools to the server.
  • Log shows server start, stop, request, rejection, and tool-call messages.
  • Clear in the Log right-click menu clears the visible page log.

The default endpoint is:

http://127.0.0.1:50507/mcp

The server starts only when at least one module is enabled and the bearer token is not empty. Address, Port, Bearer token, and module settings are profile-backed. If the MCP Server is running when the profile is saved or the app closes, that profile can start it again next time.

Address and port

Use 127.0.0.1 when the MCP client runs on the same computer. This is the safest and most common setup.

Use a LAN IPv4 address assigned to this computer only when a trusted client on the same private network must connect. Wildcard, broadcast, non-local, and non-IPv4 bindings are rejected.

Do not expose the MCP endpoint through router port forwarding, public Wi-Fi, untrusted VPNs, or internet-facing firewall rules. MCP tools can request real app actions, so treat the endpoint and token like a local control key.

Connecting a client

Use a Streamable HTTP MCP client. Configure the client with:

  1. Endpoint URL: the Configured endpoint shown on the page.
  2. Authorization header: Authorization: Bearer your-token.

Most clients ask for the URL and a bearer token or custom header. If your client stores headers separately, use:

Header name: Authorization
Header value: Bearer your-token

Replace your-token with the token shown on the MCP Server page. Do not include quotation marks around the token.

Technical request shape

MCP clients normally send these requests for you. The details below are useful when configuring or debugging a client.

The endpoint accepts HTTP POST requests to /mcp. The request body is JSON-RPC. The client must include the bearer token when a token is configured.

Initialize request:

{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"local-client","version":"1.0"}}}

Initialized notification:

{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}

List tools:

{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}

Call a tool:

{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"nikon_hello","arguments":{}}}

The server returns structured tool results. Expected app rejections, such as a camera not being connected, are returned as normal tool results with ok set to false.

Server statuses

  • Stopped means the endpoint is not listening.
  • Started means the endpoint is listening at the configured address and port.
  • Ready to start MCP Server means the page is loaded and settings are available.
  • MCP host started means the server started successfully.
  • MCP host stopped means the server stopped normally.
  • No MCP runtime is registered means the app did not declare an MCP runtime for this page.
  • MCP host is disabled by profile means the saved profile has hosting turned off.
  • MCP host did not start because no declared MCP modules are enabled means all module cards are disabled.
  • MCP host failed to start means the address, port, or local environment prevented startup.

The Log area gives the exact message for failures and rejected requests.

Security notes

MCP Server uses plaintext local HTTP plus bearer-token authorization. The token protects the request path, but the connection is not encrypted. Use loopback for same-computer clients whenever possible. Use LAN binding only on networks and machines you trust.

Regenerate the token if it was shared with a client you no longer trust. After regenerating the token, stop and start the MCP Server so clients must use the new value.

Troubleshooting

If Start is disabled:

  • Enable at least one module.
  • Confirm Address is not empty.
  • Confirm Port is between 1 and 65535.
  • Confirm Bearer token is not empty.
  • Stop the server before changing Address, Port, or Bearer token.

If Start fails:

  • Another process may already be using the port.
  • The address may not be assigned to this computer.
  • Choose another port or address and try again.
  • Check the Log for the exact failure message.

If the client cannot connect:

  • Confirm the server shows Started.
  • Confirm the client URL exactly matches Configured endpoint.
  • Use 127.0.0.1 only for clients on the same computer.
  • For another LAN computer, use this computer's LAN IPv4 address and confirm firewall rules allow the connection.
  • Confirm the client supports Streamable HTTP MCP, not stdio-only MCP.

If the client receives 401 Unauthorized:

  • Add the Authorization header.
  • Confirm the header starts with Bearer .
  • Confirm the token is not blank.

If the client receives 403 Forbidden:

  • Confirm the token exactly matches the current Bearer token.
  • If you regenerated the token, update the client.
  • If the request includes an Origin header, confirm it comes from an allowed local origin.

If the client receives 405 Method Not Allowed:

  • The client is probably using HTTP GET.
  • Configure the client for Streamable HTTP tool calls that send POST /mcp.

If no Nikon tools appear:

  • Confirm the NikonMCP module card is Enabled.
  • Stop and Start the MCP Server after changing module enablement.
  • Confirm the client refreshed or reconnected after the server restarted.