MCP.so
登录

Add API key to .env file MCP Server

@heureux831

基本信息

分类

开发工具

许可证

Apache-2.0

传输方式

stdio

作者

heureux831

关于 Add API key to .env file MCP Server

A simplest MCP system implemented in Python, including a client and several servers.

Add API key to .env file MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-demo-heureux831": {
      "command": "uv",
      "args": [
        "venv"
      ]
    }
  }
}

Add API key to .env file MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Add API key to .env file?

A minimal MCP (Model Context Protocol) project that demonstrates how to set up an MCP server with an API key stored in a .env file. It uses DeepSeek as the LLM backend and includes sample Python and Node.js servers for task lists, weather, and stock data. Aimed at developers learning MCP.

How to use Add API key to .env file?

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.

Key features of Add API key to .env file

  • 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.

Use cases of Add API key to .env file

  • Learn how MCP servers and clients interact.
  • Prototype a multi‑server MCP application.
  • Test DeepSeek or other OpenAI‑compatible LLMs with MCP.
  • Quickstart template for custom MCP server development.

常见问题

1

What API key is required?

A DeepSeek API key (or any OpenAI‑compatible API) must be added to the `.env` file as `OPENAI_API_KEY`.

2

How do I switch to a different LLM service?

Change the `OPENAI_BASE_URL` and `OPENAI_MODEL` in `.env` to match the desired service.

3

What servers are provided?

The project includes `tasklist.py`, `weather.py`, and `stock.js` as example MCP servers.

4

How do I run the project?

Activate the virtual environment, then run `uv run client.py server.json` from the `client` directory.

5

Where does the data live?

Task data is stored in `tasks.csv` in the project root. Other server data comes from external APIs (not specified).

评论

开发工具 分类下的更多 MCP 服务器