Configuration and Testing
Once your script is ready, the next step is to connect it to Claude. This step only needs to be done once, even if you later update your script with new features. To begin, open Claude Desktop and go to the Settings tab. There are several ways to get there:
- Click the hamburger menu in the top-left corner, then go to File > Settings
- Use the shortcut Ctrl + ,
- Or click your profile icon in the bottom-left corner and choose Settings
Once the Settings panel is open, scroll all the way down. You’ll see a Desktop App section with three tabs that are only available in the desktop version: General, Extensions, and Developer. To set up the MCP server connection, select the Developer tab. Inside the Developer tab, click Edit Config. This opens the folder where Claude's configuration files are stored, and highlights the file claude-desktop-config.json
. Inside of it you'll see something like this:
claude-desktop-config.json
This is just a simple JSON file. The "mcpServers"
key is where Claude looks for information about what servers it should connect to. Right now, it's empty. To add a server, insert a new key-value pair inside the curly brackets. The key can be any name you like and it will be used to label your server inside Claude. Then add an object {}
that will hold your server's setup.
claude-desktop-config.json
If you want to learn more about JSON format you can check outUnderstanding and Working with JSON Data article.
If you open Claude now, you'll get a warning. That's normal it means Claude found your server, but it’s missing required information. Specifically, Claude is looking for the "command"
key, which tells it how to run the server. To make Claude actually run your script, you need to provide the same command you'd use in your terminal. For Python scripts, that's usually python
.
The last step will be adding the "args"
key. This is a list of extra inputs Claude will use with the command — in most cases, it’s just the full path to your script:
file1
Make sure the path and filename are correct, or Claude won't be able to run your script. If you'd rather not write it all yourself, you can copy and paste this as a template.
Once the file is saved, reopen Claude and go back to the Developer tab. This time, your server should be marked as Running. You can now try out it by prompting something like.
Claude will ask for permission to use your MCP server. You can click Allow once to test it safely, or Allow always if it's your own server and you trust it. If everything is set up properly, Claude will call your tool and return the result — in this case, the current time.
Takk for tilbakemeldingene dine!
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 11.11
Configuration and Testing
Sveip for å vise menyen
Once your script is ready, the next step is to connect it to Claude. This step only needs to be done once, even if you later update your script with new features. To begin, open Claude Desktop and go to the Settings tab. There are several ways to get there:
- Click the hamburger menu in the top-left corner, then go to File > Settings
- Use the shortcut Ctrl + ,
- Or click your profile icon in the bottom-left corner and choose Settings
Once the Settings panel is open, scroll all the way down. You’ll see a Desktop App section with three tabs that are only available in the desktop version: General, Extensions, and Developer. To set up the MCP server connection, select the Developer tab. Inside the Developer tab, click Edit Config. This opens the folder where Claude's configuration files are stored, and highlights the file claude-desktop-config.json
. Inside of it you'll see something like this:
claude-desktop-config.json
This is just a simple JSON file. The "mcpServers"
key is where Claude looks for information about what servers it should connect to. Right now, it's empty. To add a server, insert a new key-value pair inside the curly brackets. The key can be any name you like and it will be used to label your server inside Claude. Then add an object {}
that will hold your server's setup.
claude-desktop-config.json
If you want to learn more about JSON format you can check outUnderstanding and Working with JSON Data article.
If you open Claude now, you'll get a warning. That's normal it means Claude found your server, but it’s missing required information. Specifically, Claude is looking for the "command"
key, which tells it how to run the server. To make Claude actually run your script, you need to provide the same command you'd use in your terminal. For Python scripts, that's usually python
.
The last step will be adding the "args"
key. This is a list of extra inputs Claude will use with the command — in most cases, it’s just the full path to your script:
file1
Make sure the path and filename are correct, or Claude won't be able to run your script. If you'd rather not write it all yourself, you can copy and paste this as a template.
Once the file is saved, reopen Claude and go back to the Developer tab. This time, your server should be marked as Running. You can now try out it by prompting something like.
Claude will ask for permission to use your MCP server. You can click Allow once to test it safely, or Allow always if it's your own server and you trust it. If everything is set up properly, Claude will call your tool and return the result — in this case, the current time.
Takk for tilbakemeldingene dine!