Add API key to .env file
About
A simplest MCP system implemented in Python, including a client and several servers.
Details
- Author
- heureux831
- GitHub stars
- 1
- Downloads
- 340
- Categories
- Developer Tools
Jump to
- Minimal MCP project for learning.
- Uses .env file for API key configuration.
- Supports multiple LLM services via environment variables.
- Includes Python and Node.js server examples.
- Client auto‑discovers servers from server.json.
- Easy setup with uv virtual environment.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Add API key to .env fileCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Create a .env file with OPENAI_API_KEY, OPENAI_BASE_URL, and OPENAI_MODEL (e.g., DeepSeek). Install dependencies with uv add mcp openai python-dotenv. Edit server.json to point to the server scripts (tasklist.py, weather.py, stock.js). Run the client with cd client && uv run client.py server.json.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"add api key to .env file": {
"mcp-demo-heureux831": {
"command": "uv",
"args": [
"venv"
]
}
}
}
}
McpServers
{
"mcp-demo-heureux831": {
"command": "uv",
"args": [
"venv"
]
}
}
Add API key to .env file
echo "OPENAI_API_KEY=your_api_key" >> .env
echo "OPENAI_BASE_URL="https://api.deepseek.com/v1"" >> .env
echo "OPENAI_MODEL="deepseek-chat" >> .env
编辑server.json文件来指定mcp-server
{
"servers": [
{
"command": "uv",
"args": ["run","../server/tasklist.py"],
"env": null
},
{
"command": "uv",
"args": ["run","../server/weather.py"],
"env": null
},
{
"command": "npx",
"args": ["-y","../server/stock.js"],
"env": null
}
]
}
运行mcp-demo
cd client
uv run client.py server.json
然后输入用户query即可
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





