Files
Barabashka 53d666f0e0 Add docker-service stubs and ignore runtime artifacts.
This tracks compose and source files for mcp-stub/phoenix while excluding local runtime data and wheel artifacts.

Made-with: Cursor
2026-04-23 12:44:12 +03:00

40 lines
1.1 KiB
Markdown

# MCP Stub Service
Минимальный MCP server (Streamable HTTP) для локальной интеграции.
## Запуск
```bash
docker compose up --build
```
Сервис поднимется на `http://localhost:8081`.
MCP endpoint: `http://localhost:8081/mcp`.
## Инструменты MCP
- `search_news_sources(url: str)`
- `parse_article(url: str)`
- `extract_publication_date(article_text: str)`
- `rank_sources_by_date(items: list[dict])`
- `generate_summary(items: list[dict])`
Пример проверки через Python MCP client:
```bash
python - <<'PY'
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
async with streamablehttp_client(url="http://localhost:8081/mcp") as (read, write, *_):
async with ClientSession(read, write) as session:
await session.initialize()
result = await session.call_tool("search_news_sources", {"url": "https://example.com/news"})
print(result.structuredContent)
asyncio.run(main())
PY
```