Skip to main content
Glama
SDias14

MCP Chat

by SDias14

MCP Chat

MCP Chat 是一款命令行界面应用程序,可通过 Google Gemini API 与 AI 模型进行交互式聊天。该应用程序支持文档检索、基于命令的提示,以及通过 MCP(Model Control Protocol)架构实现的可扩展工具集成。

前置要求

  • Python 3.9+

  • Google Gemini API 密钥

Related MCP server: MCP Chat

设置

步骤 1:配置环境变量

  1. 在项目根目录中创建或编辑 .env 文件,并确认以下变量已正确设置:

GEMINI_API_KEY=""  # Enter your Google Gemini API key
GEMINI_MODEL="gemini-3.6-flash"  # The Gemini model to use

你可以从 Google AI Studio 生成 API 密钥。

步骤 2:安装依赖

选项 1:使用 uv 进行设置(推荐)

uv 是一个快速的 Python 包安装器和解析器。

  1. 如果尚未安装 uv,请先安装:

pip install uv
  1. 创建并激活虚拟环境:

uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 安装依赖:

uv pip install -e .
  1. 运行项目

uv run main.py

选项 2:不使用 uv 进行设置

  1. 创建并激活虚拟环境:

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. 安装依赖:

pip install google-genai python-dotenv prompt-toolkit "mcp[cli]==1.8.0"
  1. 运行项目

python main.py

使用方法

基本交互

直接输入你的消息并按 Enter 键即可与模型聊天。

文档检索

使用 @ 符号后跟文档 ID,即可将文档内容包含在你的查询中:

> Tell me about @deposition.md

命令

使用 / 前缀来执行 MCP 服务器中定义的命令:

> /summarize deposition.md

按 Tab 键时,命令将自动补全。

开发

添加新文档

编辑 mcp_server.py 文件,向 docs 字典中添加新文档。

实现 MCP 功能

要完整实现 MCP 功能:

  1. 完成 mcp_server.py 中的 TODO

  2. mcp_client.py 中实现缺失的功能

代码检查与类型检查

目前未实现代码检查或类型检查。

Install Server
F
license - not found
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A command-line interface application for interactive chat with AI models via the Anthropic API. It supports document retrieval, command-based prompts, and extensible tool integrations through the MCP architecture.
  • F
    license
    Not graded
    quality
    D
    maintenance
    A command-line interface application enabling interactive chat with AI models via the Anthropic API. It supports document retrieval, command-based prompts, and extensible tool integrations through the MCP architecture.

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

  • Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.

View all MCP Connectors

Latest Blog Posts

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/SDias14/mcp-server-training-linkedin-learning'

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