使用说明
# 黑曜石mcp服务器
黑曜石MCP服务器(云版)
这有什么作用:
- 接受来自代理商的API呼叫(例如Telegram、Scraper等)
- 将Markdown或图像文件写入黑曜石保险库
如何在Render上部署:
- 将此文件夹推送到GitHub(例如
obsidian-mcp-server) - 首选 https://render.com 然后单击“新建Web服务”
- 连接您的仓库
- 设置:
- 构建命令:
npm install - 启动命令:
npm start - 环境变量:
OBSIDIAN_VAULT_PATH=/data
- 构建命令:
- 点击部署
您的MCP终点将是:
https://your-render-app-name.onrender.com/mcp
请求示例:
POST/mcp
{
"action": "write",
"path": "photo-log/2025-07-07-summary.md",
"content": "---\ndate: 2025-07-07\ntags: [twitter]\n---\n\nSummary of the post here."
}
安装
先决条件
- Python 3.8或更高版本
- pip(Python包管理器)
克隆存储库
git clone https://github.com/darshd9941/obsidian-mcp-server.git
cd obsidian-mcp-server
再进行
pip install -r requirements.txt
环境设置
-
复制示例环境文件:
cp .env.example .env -
编辑.env并添加您的API密钥:
# Required for Claude vision features ANTHROPIC_API_KEY=your-api-key-here
用法
Web应用程序(如适用)
streamlit run app.py
CLI使用情况
python main.py --help
Python API
from module import MainClass
# Initialize the tool
tool = MainClass()
# Use the tool
result = tool.process("input")
print(result)
配置
- .env-环境变量(API键、设置)
- config.yaml-配置文件(如适用)
示例
有关详细的使用示例,请参阅examples/目录。
贡献
- 分叉存储库
- 创建要素分支
- 进行更改
- 提交拉取请求
许可证
有关详细信息,请参阅LICENSE文件。
