Skip to main content
Glama

Terminal MCP Server

MCP SSE 服务器和 STDIO 服务器示例

介绍

欢迎来到AI 语言项目!在这个代码库中,您可以找到多个设置 MCP 服务器的示例。MCP(模型上下文协议)是一个 AI 模型框架,使模型能够存储数据、运行工具并使用提示执行特定任务。

可用的服务器示例

我们提供了四个示例,帮助您在不同的环境中设置 MCP 服务器。下表总结了每个配置:

例子服务器类型运输方式环境Docker教程链接
1终端服务器 (STDIO)标准输出当地的教程 1
2终端服务器 (STDIO)标准输出当地的是的教程 2
3终端服务器 (SSE)上交所当地的是的教程 3
4终端服务器 (SSE)上交所Google 云平台(网络)是的教程 3

如果您喜欢学习人工智能、编码和自动化,请点赞并订阅该频道——这确实有助于我们为您制作更多精彩内容!
订阅

什么是 MCP?

**MCP(模型上下文协议)**是一种允许 AI 模型执行以下操作的协议:

  • 存储数据(如文件或 API 响应)
  • 运行工具(AI可以执行的功能)
  • 使用提示(任务的预定义模板)

选项 1:不使用 Docker 进行设置(本地 Python)

此选项演示如何在不使用 Docker 的情况下使用 Python 在本地搭建 MCP 服务器。请观看视频教程:教程 1


选项 2:使用 Docker 设置

此选项演示如何使用 Docker 将 MCP 服务器容器化并在本地运行。请观看视频教程:教程 2


选项 3:使用 SSE 设置(本地,Docker)

此选项演示如何在本地环境中使用 Docker 通过 SSE 运行 MCP 服务器。请观看视频教程:教程 3


选项 4:在 Google Cloud Platform 上使用 SSE 进行设置

此选项详细介绍了如何使用 Docker 将 SSE 服务器部署到 Google Cloud Platform。请观看视频教程:教程 3


测试 MCP 服务器

服务器运行后,您可以使用 Claude 中的提示对其进行测试,例如:

  • Run the command ls in my workspace.
  • Execute echo Hello from Claude.

您应该直接从终端服务器看到输出🎉


总结

恭喜!您已成功构建一个可以执行终端命令的 MCP 服务器。您可以根据自己的喜好在本地或 Docker 中运行它。

后续步骤:

  • 添加安全检查以阻止潜在的危险命令。
  • 允许 Claude 读取和写入文件。
  • 将服务器连接到云系统或远程环境。

对于任何问题或改进,请随时贡献并在此存储库中打开问题或拉取请求!

🤝 贡献

目前,该项目不接受外部代码贡献

这是为了保持许可简单并避免任何共享版权。

非常欢迎您:✅ 报告错误或请求功能(通过 GitHub Issues)
✅ Fork 仓库并构建你自己的版本
✅ 建议文档改进

如果您想以其他方式合作,请随时展开讨论!

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

MCP 服务器允许像 Claude 这样的 AI 助手在用户的计算机上执行终端命令并返回输出,通过 AI 发挥终端的功能。

  1. 介绍
    1. 可用的服务器示例
  2. 什么是 MCP?
    1. 选项 1:不使用 Docker 进行设置(本地 Python)
      1. 选项 2:使用 Docker 设置
        1. 选项 3:使用 SSE 设置(本地,Docker)
          1. 选项 4:在 Google Cloud Platform 上使用 SSE 进行设置
            1. 测试 MCP 服务器
              1. 总结
                1. 后续步骤:
              2. 🤝 贡献

                Related MCP Servers

                • -
                  security
                  A
                  license
                  -
                  quality
                  An MCP server that enables Claude to interact with Port.io's AI agent, allowing users to trigger the agent with prompts and receive structured responses including status, output, and action items.
                  Last updated -
                  6
                  Python
                  MIT License
                  • Linux
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
                  Last updated -
                  179
                  Python
                  MIT License
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  A server that enables AI assistants to execute terminal commands and retrieve outputs via the Model Context Protocol (MCP).
                  Last updated -
                  3
                  6
                  Python
                  MIT License
                  • Apple
                  • Linux
                • -
                  security
                  A
                  license
                  -
                  quality
                  An enhanced MCP server that grants AI assistants the ability to execute terminal commands on a user's system with improved security controls, designed for use in controlled environments.
                  Last updated -
                  Python
                  MIT License
                  • Apple

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/theailanguage/terminal_server'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server