Logo

Model Context Protocol (MCP) is an open standard that enables frontier LLMs to produce more relevant responses by safely interacting with external tools and resources where data lives. For more details, go to MCP Concepts.

AgentSphere MCP Server Intro

AgentSphere provides an official MCP server that you can use in your MCP client.

Configurations

To configure this server in Cursor, Efflux, or other MCP-compatible clients, add the following configuration to your MCP config file:

JSON
{ "mcpServers": { "agentsphere": { "command": "uvx", "args": ["agentsphere-mcp-server"], "env": { "AGENTSPHERE_API_KEY": "your_api_key_here" } } } }

Notes:

  • Replace your_api_key_here with your actual AgentSphere API key.

  • Make sure your internet connection is stable and uv (a modern Python dependency and project manager) is installed.

Tools

The AgentSphere MCP server includes the following three tools:

Tool NameFunction DescriptionParametersReturn Value
exec_commandExecutes Linux system commands within the sandbox- cmd (string): The command to executeObject containing stdout, stderr, and success
get_preview_linkRetrieves the access URL of a web service in sandbox- port (int): The port number of the preview linkObject containing the accessible URL
upload_files_to_sandboxUploads local files/folders to a specified path in sandbox- local_path (string): Absolute local path
- target_path (string, optional): Target sandbox directory (default: /user_uploaded_files/)
List of successfully uploaded files or error info

Work with Cursor

The following example demonstrates how to connect to AgentSphere MCP server in your Cursor desktop and then generate a live chart for your desired data.

Let's say, you have a file named product.csv in your disk and it contains the following data:

IDNameCategoryPriceStock
1Wireless MouseElectronics29.99150
2Bluetooth KeyboardElectronics49.9980
3USB-C CableElectronics12.99200
4LED Desk LampHome24.9960
5Stainless Steel Water BottleKitchen19.99100
6Ceramic MugKitchen9.99120
7Noise-Cancelling HeadphonesElectronics89.9950
8Portable ChargerElectronics34.9990
9Yoga MatSports29.9970
10Running ShoesSports59.9940
11BackpackAccessories39.9985
12SunglassesAccessories14.99110
13Wireless EarbudsElectronics69.9965
14Non-Stick Frying PanKitchen29.9955
15Desk OrganizerOffice15.99130
16Notebook SetOffice8.99200
17Smart WatchElectronics129.9930
18Coffee MakerKitchen79.9945
19Travel PillowAccessories19.9975
20Fitness TrackerElectronics49.9995
  1. In your Cursor client, select Cursor Settings > Tools & Integrations > New MCP Server.

    Cursor Chat

  2. Copy and paste the following JSON, and replace your_api_key_here with the API key you get from AgentSphere.

    JSON
    { "mcpServers": { "agentsphere": { "command": "uvx", "args": ["agentsphere-mcp-server"], "env": { "AGENTSPHERE_API_KEY": "your_api_key_here", } } } }
  3. Launch a new chat in your Cursor client, add the product.csv file as context, and call AgentSphere MCP server in the chat to visualize the data inside the table using streamlit in a sandbox.

    You will get an open URL like https://<portNumber-UID>.agentsphere.run and the following is an example of the output.

    Streamlit Output

Tip: You can try out AgentSphere MCP server in Raycast, Efflux, Gemini CLI and more MCP clients.