what is Model Context Protocol for Raycast?
Model Context Protocol for Raycast is an extension that allows users to interact with Anthropic's Model Context Protocol directly within Raycast AI, enabling the use of various MCP servers.
how to use Model Context Protocol for Raycast?
To use the Model Context Protocol, install MCP servers and utilize the tools they expose in Quick AI or AI Chat. You can add servers via the UI or by modifying the configuration file directly.
key features of Model Context Protocol for Raycast?
- Easy integration of MCP servers into Raycast AI.
- Ability to add and manage servers through a user-friendly interface.
- Support for custom server development using JavaScript.
use cases of Model Context Protocol for Raycast?
- Enhancing productivity by integrating various tools into Raycast AI.
- Customizing workflows with tailored MCP servers.
- Utilizing AI tools for specific tasks through the Raycast interface.
FAQ from Model Context Protocol for Raycast?
- What programming language is supported for custom servers?
Only JavaScript is supported for writing custom MCP servers.
- Can I modify the configuration file directly?
Yes, you can modify the
mcp-config.json
file for easier server management.
- How do I add a new server?
You can add a new server via the UI or by directly editing the configuration file.
Model Context Protocol for Raycast
Interact with Anthropic's Model Context Protocol in Raycast AI!
Install MCP servers, and use the Tools they expose directly in Quick AI or AI Chat.
Documentation
Here's how to add Servers, and also how to use servers.
Adding a Server via UI
- Find a Server to download. Let's use the
filesystem
server as an example - In the Server documentation, find the code to add to the Claude desktop configuration. Only copy the inner section of the JSON, so that the top-level key is the name of the server. It should look something like this:
{
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/path/to/other/allowed/dir"
]
}
}
- Go into the Manage MCP Servers command, and press Cmd + N
- Paste the JSON in the textbox. Ensure to modify any fields that need changing, including API keys, or, in this case, the allowed directories. Submit the form.
- Your server is ready to go!
In the list of Servers, you should be able to see your new server, and the service that it uses. In our case, it would show "Uses npx"
Read on to learn how to add servers by directly modifying the config file or to code your own servers.
Or, skip to Using MCP Servers in Raycast AI at the bottom for information about using MCP in Raycast AI.
Modifying the Config File
All non-development servers are stored in a single configuration file named mcp-config.json
in the Extension's support directory. It follows a similar pattern to Claude's desktop app's MCP config file.
You can find it by going into the Manage MCP Servers command, and selecting the Show Config File in Finder Action. By default, it looks like this (without the comment):
{
"mcpServers": {
// Server JSON here
}
}
In the mcpServers
JSON, you can add all your servers. For example, here's what it would look like with sequential-thinking
and filesystem
.
{
"mcpServers": {
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
},
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/evan/Desktop"
]
}
}
}
Using the UI does the editing for you, but this can be easier for modifications.
Adding a Local/Development Server
You can also write code for your own custom server. Start by creating a new subfolder in the Servers Folder. You can find this folder by going to the Manage MCP Servers command, then using the Open Servers Folder action. Note that this is the folder that the mcp-config.json
is in.
In your new subfolder, you should write the correct MCP server code in an index.js
file. The Raycast MCP extension will automatically pick up on it the next time it runs.
For inspiration of what your Server should look like, see an example in the MCP GitHub, for the filesystem
extension.
Note that only JS is supported for now, so you should write it in JS. Ensure you have a package.json
in the folder. If you have not run npm install
, the extension will automatically do it for you.
Using MCP Servers in Raycast AI
As long as you have the correct servers installed, you can use any of your MCP tools just by invoking Raycast AI with the @mcp
prefix.
The extension will automatically show Raycast AI all the available Servers, and Raycast AI will choose and use the proper tool. No additional setup needed!