nikitaLevin/mcp-server-autocreation
3.1
If you are the rightful owner of mcp-server-autocreation and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Model Context Protocol (MCP) server is a framework designed to facilitate communication between various AI models and client applications, enabling seamless integration and interaction.
Getting Started
Create or open folder where you want to create MCP server
Installing uv Package Manager
On MacOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Make sure to restart your terminal afterwards to ensure that the uv
command gets picked up.
Project Setup
- Create and initialize the project:
# Create a new directory for our project
uv init mcp-server
cd mcp-server
# Create virtual environment and activate it
uv venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
# Install dependencies
uv add "mcp[cli]" httpx
-
Copy code from mcp-server-creation.py
-
Create the server implementation file:
touch main.py
Running the Server
- Start the MCP server:
uv run main.py
- The server will start and be ready to accept connections
Connecting to Claude Desktop or Cursor ai ide
For claude desktop
- Install Claude Desktop from the official website
- Configure Claude Desktop to use your MCP server:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
:
For cursor ai
- Install cursor ai
- Open Cursor > Preferences > Cursor settings
- Go to MCP
- Click "Add new global mcp server"
{
"mcpServers": {
"mcp-server": {
"command": "uv", # It's better to use the absolute path to the uv command
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/YOUR/mcp-server",
"run",
"main.py"
]
}
}
}
- Restart Claude Desktop
Troubleshooting
If your server isn't being picked up by Claude Desktop:
- Check the configuration file path and permissions
- Verify the absolute path in the configuration is correct
- Ensure uv is properly installed and accessible
- Check Claude Desktop logs for any error messages