Back to MCP directory
publicPublicdnsLocal runtime

minimal-mcp-in-nix

基于Nix的Python MCP服务器项目,包含位置展示和时间获取功能

article

README

🚀 用 Python 实现的最小 MPC 服务器

本项目是使用 Python 实现的最小 MPC 服务器,同时针对 Nix 运行时进行了优化。它能为你提供一个简单的 MPC 演示,包含显示当前演示位置的 stub 位置,以及获取当前时间的工具。

🚀 快速开始

项目创建

本项目基于以下模板创建:

nix flake init --template "github:nulladmin1/nix-flake-templates#uv"

在此,特别感谢 nulladmin1 解决了让 Python 在 Nix 环境中运行的问题。

在 Claude 配置中添加项目

要在你的 Claude 配置中添加此项目,可使用以下配置:

"minimal-mcp-in-nix": {
  "command": "nix",
  "args": [
    "run",
    "github:mccartykim/minimal-mcp-in-nix",
  ]
}

💻 使用示例

基础用法

本项目是一个非常简单的 MPC 演示,它提供了一个 stub 位置(stub location),会显示你当前正在演示的位置,还有一个工具可以获取当前时间。虽然文档中未给出具体代码示例,但你可以按照上述配置将项目添加到 Claude 中进行体验。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client