Token导航 LogoToken导航TokenDH.com
Simple Agent And MCP Server logo
AI代理stdio官方级别未说明来源级核验

Simple Agent And MCP Server

MCP Server

一个用于管理AI模型上下文数据的简单实现,提供存储、获取和删除上下文的功能。

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
Python本地部署STDIO

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

linsun

提供方

linsun

最后核验

2026/5/17 20:23

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run server.py

详细介绍

模型上下文协议(MCP)服务器和代理

管理AI模型上下文数据的模型上下文协议服务器的简单实现。

设置

  1. 安装所需的依赖项:
uv venv
uv pip install -r requirements.txt
  1. 运行服务器:
uv run server.py

服务器将于启动 localhost:8080.

API终点

商店上下文

curl -X POST http://localhost:8080/mcp/context \
  -H "Content-Type: application/json" \
  -d '{
    "context_id": "example-context",
    "data": {
      "key": "value",
      "metadata": "example"
    }
  }'

获取上下文

curl -X GET http://localhost:8080/mcp/context/example-context

删除上下文

curl -X DELETE http://localhost:8080/mcp/context/example-context

列出所有工具

curl -X GET http://localhost:8080/mcp/tools

运行代理

OPENAI_API_KEY=$OPENAI_API_KEY uv run agent.py 

样本输出:

Connected to server
LLM decided to use: calculator
Reasoning: The user is asking for the sum of 5 and 3, which is a basic arithmetic operation suitable for the calculator tool.
Tool 'calculator' executed with result: {'status': 'success', 'result': 8}

Final result: {'status': 'success', 'result': 8}
LLM decided to use: calculator
Reasoning: The user requested to multiply two numbers, so a calculator tool is appropriate to perform this arithmetic operation.
Tool 'calculator' executed with result: {'status': 'success', 'result': 24}

Final result: {'status': 'success', 'result': 24}
Disconnected from server

目录标签

目录标签

Python本地部署STDIOAI模型管理上下文存储协议服务器

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP