Skip to main content

thinkthinking's mcp server

Project description

Think MCP Server

PyPI version Python Version License

Think MCP Server 是一个基于 MCP 协议的服务器实现,提供了丰富的功能,包括提示词管理、资源管理和工具调用等。

特性

  • 跨平台支持:完全兼容 macOS、Windows 和 Linux
  • 自动配置文件管理:首次运行时自动创建必要的配置文件和目录
  • 提示词模板系统:管理和使用多种提示词模板
  • 资源管理:集中管理和访问各类资源文件
  • 工具调用接口:提供丰富的工具调用能力
    • 内容分析工具:分析文件内容,提取关键信息
    • 文章分析工具:分析文章结构和内容
  • 环境变量管理:通过 .env 文件管理配置
  • 日志系统:详细的日志记录,便于调试和监控

安装

使用 pip 安装

pip install think-mcp-server

使用 uvx 直接运行

uvx think-mcp-server

从源码安装

git clone https://github.com/thinkthinking/think-mcp-server.git
cd think-mcp-server
pip install -e .

使用方法

配置

首次运行时,Think MCP Server 会自动创建必要的配置文件和目录:

  • ~/.think-mcp-server/config/.env: 环境变量配置
  • ~/.think-mcp-server/prompts/: 提示词目录
  • ~/.think-mcp-server/resources/: 资源目录

环境变量

主要环境变量包括:

# 基础路径配置
prompts_path=~/.think-mcp-server/prompts
resources_path=~/.think-mcp-server/resources

# 文章分析工具配置
article_base_path=~/src_code/nas/knowledge/Articles
max_tokens_limit=89600

# 内容分析工具配置
content_analyzer_prompt_path=~/.think-mcp-server/resources/tool_content_analyzer_prompt.md

运行服务器

think-mcp-server

在 Windsurf 中配置

在 Windsurf 的 servers_config.json 中添加以下配置:

{
    "mcpServers": {
        "think-mcp-server": {
            "command": "uvx",
            "args": [
                "think-mcp-server"
            ]
        }
    }
}

功能说明

提示词管理

服务器提供了以下提示词相关功能:

  • 列出所有可用提示词:handle_list_prompts
  • 获取特定提示词:handle_get_prompt
  • 支持动态参数替换

资源管理

服务器提供了以下资源相关功能:

  • 读取特定资源:handle_read_resource
  • 自动管理资源文件路径

工具调用

服务器提供了以下工具:

  • 内容分析工具:分析文件内容,提取关键信息
  • 文章分析工具:分析文章结构和内容

开发

安装开发依赖

pip install -e ".[dev]"

运行测试

pytest

构建和发布

项目使用 GitHub Actions 自动发布到 PyPI。当推送新的版本标签(如 v0.4.1)时,将自动触发构建和发布流程。

许可证

MIT

作者

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

think_mcp_server-0.5.0.tar.gz (72.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

think_mcp_server-0.5.0-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file think_mcp_server-0.5.0.tar.gz.

File metadata

  • Download URL: think_mcp_server-0.5.0.tar.gz
  • Upload date:
  • Size: 72.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for think_mcp_server-0.5.0.tar.gz
Algorithm Hash digest
SHA256 2f0e766ec661418bdd6fea2ba70ceaab47d6af8a84b8129e43f387b4183c59aa
MD5 c8be76f1e8076d14a88230b7159909c0
BLAKE2b-256 128793e2cdebb42115e863c60c8b793a3e96ca8dabe1c745467b5d93b0b318d7

See more details on using hashes here.

File details

Details for the file think_mcp_server-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for think_mcp_server-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9dd221dc41182729edcef495afbbad21c0e5bc791343c5bb5b3c926e03a8a85
MD5 a3bd4a8e36b338e29a4fe163fbaab8ad
BLAKE2b-256 f6186bc1d2213e2bf9068341be9b030468e9ab63d9333e3a71389b16b227b73e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page