Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Testing | Setting Up and Configuration
Creating Custom AI Agents
course content

Kursinnehåll

Creating Custom AI Agents

Creating Custom AI Agents

1. Agentic AI Basics
2. Setting Up and Configuration

book
Testing

VIDEO

Now that your MCP server is up and running, it's time to test it. Both manually and through an AI interface like Claude Desktop. In this chapter, you'll learn how to connect to your server, send structured requests, and verify that the server responds correctly.

Before anything else, make sure your server script is running. In your terminal, navigate to the folder where the server file is located (e.g., excel_mcp_server.py) and run:

h

terminal.h

copy

You can test the server manually using the curl command-line tool. This simulates how Claude or another client would interact with your server.

h

curl.h

copy

Make sure data.xlsx is in the same directory as the script (or update the path accordingly). You should receive a JSON response like:

json

response.json

copy

If you see this, your server is working as expected. Claude Desktop uses the Model Context Protocol (MCP) to discover and call local tools. To add a custom MCP server, you must edit the Claude Desktop config file and implement the server’s JSON-RPC interface.

json

claude_desktop_config.json

copy

Once you've added your server to the Claude config file and restarted Claude Desktop, it will automatically try to launch the server and connect to it via MCP. If everything is working correctly, Claude will:

  • Start your Python script (via the "command" and "args" values in the config);

  • Send a tools/list request to discover what functions your server supports;

  • Show your tool under the "hammer" icon in the Claude chat window.

This lets Claude know what inputs your tool expects, so it can call it when the user makes a request. If Claude decides your tool matches the user's intent, it will send something like:

json

request.json

copy

Your server should handle the call and return a result. This allows the AI to interact with external applications.

question mark

What is the main purpose of adding your MCP server to the claude_desktop_config.json file?

Select the correct answer

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 3

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

course content

Kursinnehåll

Creating Custom AI Agents

Creating Custom AI Agents

1. Agentic AI Basics
2. Setting Up and Configuration

book
Testing

VIDEO

Now that your MCP server is up and running, it's time to test it. Both manually and through an AI interface like Claude Desktop. In this chapter, you'll learn how to connect to your server, send structured requests, and verify that the server responds correctly.

Before anything else, make sure your server script is running. In your terminal, navigate to the folder where the server file is located (e.g., excel_mcp_server.py) and run:

h

terminal.h

copy

You can test the server manually using the curl command-line tool. This simulates how Claude or another client would interact with your server.

h

curl.h

copy

Make sure data.xlsx is in the same directory as the script (or update the path accordingly). You should receive a JSON response like:

json

response.json

copy

If you see this, your server is working as expected. Claude Desktop uses the Model Context Protocol (MCP) to discover and call local tools. To add a custom MCP server, you must edit the Claude Desktop config file and implement the server’s JSON-RPC interface.

json

claude_desktop_config.json

copy

Once you've added your server to the Claude config file and restarted Claude Desktop, it will automatically try to launch the server and connect to it via MCP. If everything is working correctly, Claude will:

  • Start your Python script (via the "command" and "args" values in the config);

  • Send a tools/list request to discover what functions your server supports;

  • Show your tool under the "hammer" icon in the Claude chat window.

This lets Claude know what inputs your tool expects, so it can call it when the user makes a request. If Claude decides your tool matches the user's intent, it will send something like:

json

request.json

copy

Your server should handle the call and return a result. This allows the AI to interact with external applications.

question mark

What is the main purpose of adding your MCP server to the claude_desktop_config.json file?

Select the correct answer

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 3
Vi beklagar att något gick fel. Vad hände?
some-alt