-
Notifications
You must be signed in to change notification settings - Fork 212
MCP Server
MCP server is a tool that allows you to connect to external APIs and services, enabling your agent to perform actions beyond just generating text. For example, you can use an MCP server to access databases, call web services, or interact with other applications.
You can use the agent builder to discover and configure featured MCP servers, connect to existing MCP servers or build a new MCP server from scaffold.
Note
Using MCP servers may require either Node or Python environment. AI Toolkit will validate your environment to ensure that the required dependencies are installed.
After installing, please use the command npm install -g npx to install npx. If you prefer Python, we recommend using uv
AI Toolkit provides a list of featured MCP servers that you can use to connect to external APIs and services.
To configure an MCP server from featured selections, follow these steps:
- In the Tools section, select + MCP Server, and then select + Add server in the Quick Pick.
- Select Use Featured MCP Servers from the dropdown list.
- Choose an MCP server that meets your needs.
For servers that are ready to use, AI Toolkit will prompt you to select tools and add to your agent afterwards.
For servers that are marked with (Configuration Required):
-
You will be prompted to enter the required configurations in the
mcp.jsonfile.
-
Follow the guidelines to configure the server:
-
After finishing the configuration, go back to Agent Builder and select + MCP Server to locate the server you added from the list.
-
Select the server and proceed to add tools.
To use an existing MCP server, follow these steps:
- In the Tools section, select + MCP Server, and then select + Add server in the quick pick.
- Select Connect to an Existing MCP Server
- Select an option from the dropdown list to specify how you want to connect to the MCP server:
- Command (stdio): Run a local command that implements the MCP protocol
- HTTP (server-sent events): Connect to a remote server that implements the MCP protocol
- Select tools from the MCP server if there are multiple tools available.
- Enter your prompts and select Run to test the connection.

AI Toolkit also provides a scaffold to help you build a new MCP server. The scaffold includes a basic implementation of the MCP protocol, which you can customize to suit your needs.
To build a new MCP server, follow these steps:
- In the Tools section, select + MCP Server, and then select + Add server in the quick pick.
- Select Create a New MCP Server
- Select a programming language from the dropdown list: Python or TypeScript
- Select a folder to create the new MCP server project in.
- Enter a name for the MCP server project.
After you create the MCP server project, you can customize the implementation to suit your needs. The scaffold includes a basic implementation of the MCP protocol, which you can modify to add your own functionality.
You can also use the agent builder to test the MCP server. The agent builder will send the prompts to the MCP server and display the response.
Follow these steps to test the MCP server:
Note
To run the MCP Server in your local dev machine, you will need: Node.js or Python installed on your machine.
- Open VS Code Debug panel. Select
Debug in Agent Builderor pressF5to start debugging the MCP server. - Use AI Toolkit Agent Builder to test the server with the following prompt:
- System Prompt: You are a weather forecast professional that can tell weather information based on given location.
- The server will be automatically connected to Agent Builder.
- Select
Runto test the server with the prompt.
