Token导航 LogoToken导航TokenDH.com
MCP smart workspace logo
数据服务未说明官方级别未说明来源级核验

MCP smart workspace

MCP Server

一个基于模型上下文协议(MCP)的智能工作区,集成了知识库服务器、本地文本处理服务器和命令行客户端,提供智能问答和文本分析功能。

工具数

5

提示词数

0

GitHub Stars

0

资源数

0
命令行工具Python文本处理问答系统

安装说明

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

作者 / 组织

restinbark

提供方

restinbark

最后核验

2026/5/17 20:19

快速接入

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

详细介绍

📌 1. 概述.

该项目演示了使用模型上下文协议(MCP)构建的最小但功能强大的智能工作区。

该项目被命名为smart_workspace,因为它代表了一个智能的、由MCP驱动的工作空间,该工作空间集成了多个服务器(知识库和本地实用程序),并通过统一的MCP客户端提供智能助手界面。它的行为就像一个小型的人工智能驱动的个人工作空间环境。

它包括:

  A Knowledge Base Server

  A Local Utility/Text Processing Server

  A Stdio-based MCP client

  A simple question–answer engine

  JSON-based storage

  command line interface (CLI) interface to interact with the system

📁 2.项目结构

       mcp_smart_workspace/
    │
    ├── client/
    │   └── workspace_client.py     # MCP client demo
            │
    ├── servers/
    │   ├── local_text_server/      # text utility server
    │   │   └── server.py
    │   │
        │   └── knowledge_base_server/  # Q/A knowledge base server
    │       ├── server.py
    │       ├── data.json           # knowledge base
    │       └── build_embedding.py  # (experimental, unused)
    │
    └── README.md

⚙️ 3.已实现的功能

  1. 本地实用程序MCP服务器(STDIO)
   Purpose: Runs simple text-processing tools.
   Tech: Python MCP SDK .
   Transport: STDIN/STDOUT (stdio).

   Features:

   Word & character count

   Sentence estimate

   Reading-time estimate

   Simple sentiment check

   Runs locally as a subprocess started by the client.
  1. 知识库服务器(HTTP API)
   Purpose: Stores and returns information from a JSON knowledge base.
   Tech: FastAPI + Uvicorn
   Transport: HTTP

   Features:

   Search the KB

   Get item by ID

   Add new entries

   Update entries

使用干净的REST端点加载和修改data.json。

✅ 3.JSON知识库

  Example entries:

 {
    "id": 1,
    "title": "What is MCP?",
    "content": "MCP is the Model Context Protocol..."
 }

我还添加了我的自定义条目,包括:

  Barkilign profile

  iCog Labs facts

  Internship facts

  Custom Q/A entries

✅ 4.工作MCP客户端(CLI)

  Client can:

  Connect to servers

  Perform analysis

  Query the Knowledge Base

  Display results cleanly

 Loop input until user types exit

输出示例:

  Workspace Client starting...

   Analyzing: Hello I am an mcp_smart_workspace develpoed by Barkilign!
   {
      "summary": {"words": 8, "chars": 53, "sentences": 0, "reading_time_min": 0.04},
      "sentiment": {"label": "neutral", "pos_score": 0, "neg_score": 0}
   }

✅ 5.多服务器架构

   The client successfully:

   Starts local STDIO server

   Connects to KB server

   Combines outputs

   Demonstrates MCP interoperability

🧪 4.如何运行系统

1.️⃣ 激活虚拟环境 .\\venv\\Scripts\\activate

2.️⃣ 运行知识库服务器 cd服务器/知识库服务器 uvicorn服务器:应用程序--重新加载--端口8001

3.️⃣ 运行MCP客户端 cd客户端 python workspace_client.py

📚 5.端到端有效的方法

     Client starts correctly

    Text analysis works

    Knowledge Base can be searched

    Exact Q/A retrieval works

    JSON KB entries load successfully

    Adding new KB entries works

    Client ↔ Server communication stable

✨ 6.尝试了什么(但今天不需要)

由于时间限制,这些已开始但未包括在内:

 OpenAI semantic embeddings

 Fuzzy semantic ranking

 LLM answer generation

 Vector search

 Full OpenAI integration
  1. 作者

Barkilign 开始 人工智能研究实习生–iCog 任务2

目录标签

目录标签

命令行工具Python文本处理问答系统智能工作区本地部署知识库

接入字段

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

未说明

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

none

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明none部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP