Skip to Content
HomeBuild toolsCall tools from MCP clients

Call tools from MCP clients

Outcomes

Configure your clients to call tools from your .

You will Learn

  • How to configure your clients depending on the transport type.
  • How to set the secrets for your server in your client’s configuration file.

Using the arcade configure command

For popular clients, you can use the arcade configure command to configure your MCP client to call your . This will automatically add the MCP server to your client’s configuration file. By default, it will use the stdio transport.

Terminal
arcade configure cursor

You can customize a lot of the configuration passing options to arcade configure. For example, to change the transport type to http, you can pass the --transport (or -t) option:

Terminal
arcade configure cursor --transport http

stdio specific configuration

If you are using the stdio transport, arcade configure will assume the entrypoint (the script that contains the MCPApp instance and calls app.run()) to your server is server.py and will set the working directory to the root of your . You can override this with the --entrypoint (or -e) option:

Note that the --entrypoint determines only the filename of the entrypoint script, not the path to the script.

When using the stdio transport, arcade configure will automatically load the secrets from the .env file in the root of your project into the appropriate configuration file for your client.

Terminal
arcade configure cursor --entrypoint my_server.py

http specific configuration

If you are using the streamable HTTP transport, arcade configure will assume the server is running on the default port 8000 and that the is running locally (in localhost). You can override this with the --host (or -h) and --port (or -p) options:

Run from a different port:

Terminal
arcade configure cursor -t http --port 8000

If you want to configure an server running on the Arcade Cloud, you can use the --host option:

Terminal
arcade configure cursor -t http --host arcade

Other configuration options

If you have modified the default configuration of your client, you can pass the --config (or -c) option to arcade configure to use your custom configuration file:

Terminal
arcade configure cursor --config /path/to/your/config.json

By default, arcade configure will use the current directory as the name of the server. You can override this with the --name (or -n) option:

Terminal
arcade configure cursor --name my_server

Manually configuring your MCP client

If your client is not supported by the arcade configure command, you can manually add the to your client’s configuration file.

Each client has a different way of configuring MCP servers. This section covers the most common ways of configuring MCP servers adopted by the most popular MCP clients. However, you may find inconsistencies such as the need to specify the ’s type as its transport, or as “local” and “remote”. Some MCP clients will use “env” to pass environment variables, while others may use “environment” or “inputs”. Use this guide as a conceptual reference, but always refer to your MCP client’s documentation for the most up-to-date information.

When configuring your client using the stdio transport, you need to ensure that the is called using the right version of python and within the correct working directory. For example, let’s pretend this is your setup:

  • Your virtual environment is located at /path/to/your/project/.venv
  • Your is located at /path/to/your/project
  • The entrypoint to your server is server.py
  • One of your requires the MY_SECRET_KEY environment variable to be set.
  • Your secrets are stored in the /path/to/your/project/.env file

Then, your client’s configuration file should look like this:

JSON
{ "mcpServers": { "my_server": { "command": "/path/to/your/project/.venv/bin/python", "args": ["/path/to/your/project/server.py", "stdio"], "env": { "MY_SECRET_KEY": "my-secret-value" } } } }

This will ensure that the command used by the client to start the is the correct version of python and that the environment variables are set correctly.

Last updated on