unlost-mcp
MCP server (stdio) that exposes unlost machine APIs (GET /api/v1/chats, GET /api/v1/messages) to hosts such as Cursor, authenticated with an API Token from Settings → 集成.
Tools are read-only; summarization stays in the agent — there is no summarize tool.
Requirements
- Python 3.11+
- uv(推荐用
uvx/uv run) - 可达的 unlost 后端(
UNLOST_BASE_URL) - API Token(Settings → 集成)
1. Cursor MCP(推荐:本地 uv run)
未发布到 PyPI 时,用 monorepo 里的包直接跑:
{
"mcpServers": {
"unlost": {
"command": "uv",
"args": [
"--directory",
"/ABS/PATH/unlost/mcp",
"run",
"unlost-mcp"
],
"env": {
"UNLOST_BASE_URL": "http://127.0.0.1:8000",
"UNLOST_API_TOKEN": "ul_...."
}
}
}
}
发布到 PyPI 后(可选)
{
"mcpServers": {
"unlost": {
"command": "uvx",
"args": ["unlost-mcp"],
"env": {
"UNLOST_BASE_URL": "https://unlost.onelooker.cc",
"UNLOST_API_TOKEN": "ul_...."
}
}
}
}
固定版本示例:"args": ["unlost-mcp==0.1.0"]。
2. Local install / debug
cd mcp
uv sync
export UNLOST_BASE_URL=http://127.0.0.1:8000
export UNLOST_API_TOKEN=ul_....
uv run unlost-mcp
stdio:等待 MCP host;缺环境变量时 stderr 提示并以 code 1 退出。
等价入口:uv run python -m unlost_mcp。
3. Publish to PyPI(维护者)
cd mcp
uv build
uv publish
发版前 bump pyproject.toml 的 version,再 uv build && uv publish。
4. Tools
| Tool | Maps to |
|---|---|
list_chats(source?) |
GET /api/v1/chats |
fetch_messages(chat_id?, source?, date_from?, date_to?, after_id?, limit?) |
GET /api/v1/messages |
HTTP error bodies are returned as tool text (no extra wrapping).
5. Security
- Never commit
UNLOST_API_TOKEN/ PyPI token。 - Token 与 REST
/api/v1、Webhook 共用;在 Settings → 集成里吊销即可。
Metadata
Release files for unlost-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| unlost_mcp-0.1.0.tar.gz | 53.3 kB | Without provenance | Details for unlost_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unlost_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for unlost_mcp-0.1.0-py3-none-any.whl |
Total release size: 58.5 kB
Release files / unlost_mcp-0.1.0.tar.gz
| Download URL | unlost_mcp-0.1.0.tar.gz |
|---|---|
| Size | 53.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
941d856fc2e0c442086c84397366c3c9d9f738b611f3b541653eb5ae07c6db4f
|
|
BLAKE2b-256 checksum How to use checksums |
5c62d769bcf6a85ff463d0c0f42e149873a21e25d7b1ca7af5519a01ba487f8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Release files / unlost_mcp-0.1.0-py3-none-any.whl
| Download URL | unlost_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
479ceacf1dbf54c13d33d16b66cd63c205e95dd7cecb1e032c9c7e4393fb5a33
|
|
BLAKE2b-256 checksum How to use checksums |
d8c252a6459f51e8076b75a4ee0a873c0204eb44b6cbb2ea7b36b8cb9e052837
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Security for unlost-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.