@nahisaho/katashiro-mcp-server

@nahisaho/katashiro-mcp-server

MCP server for information collection, text analysis, and content generation, enabling AI agents to scrape web pages, analyze text, and generate reports or presentations.

Category
Visit Server

README

KATASHIRO

VS Code Agent Mode 向け情報収集・分析・生成システム

npm version License: MIT

概要

KATASHIROは、VS Code Agent Mode向けの情報収集・分析・コンテンツ生成システムです。Model Context Protocol (MCP) に対応し、AIエージェントがWeb情報を収集・分析し、レポートやプレゼンテーションを自動生成できます。

特徴

  • 🌐 情報収集: Webスクレイピング、API連携、RSSフィード、Web検索
  • 📊 テキスト分析: エンティティ抽出、トピック分析、品質評価
  • 📝 コンテンツ生成: レポート、要約、プレゼンテーション、引用
  • 🧠 知識グラフ: グラフ管理、クエリ、可視化
  • 🔄 フィードバック学習: パターン検出、適応型推薦
  • 🔌 MCP対応: VS Code Agent Modeとシームレス連携
  • 🔍 透明性機能: AI/人間貢献追跡、バージョン管理、共同作業 (v0.2.0)
  • ⚙️ ワークフロー自動化: パイプライン、品質ゲート、スタイルガイド (v0.2.0)
  • 🤖 エージェントオーケストレーション: タスク分解、並列実行、ツール管理 (v0.4.0)
  • 🔒 セキュリティ: リスク評価、監査ログ、サンドボックス実行 (v0.4.0)

インストール

# オールインワンパッケージ(推奨)
npm install @nahisaho/katashiro

# MCPサーバー
npm install @nahisaho/katashiro-mcp-server

# 個別パッケージ
npm install @nahisaho/katashiro-core
npm install @nahisaho/katashiro-collector
npm install @nahisaho/katashiro-analyzer
npm install @nahisaho/katashiro-generator
npm install @nahisaho/katashiro-knowledge
npm install @nahisaho/katashiro-feedback

# v0.4.0 新規パッケージ
npm install @nahisaho/katashiro-orchestrator
npm install @nahisaho/katashiro-sandbox
npm install @nahisaho/katashiro-workspace
npm install @nahisaho/katashiro-security

クイックスタート

CLIとして使用

# Web検索
npx katashiro search "検索クエリ"

# Webスクレイピング
npx katashiro scrape https://example.com

# テキスト分析
npx katashiro analyze "分析するテキスト"

# エンティティ抽出
npx katashiro extract "株式会社テストの山田太郎さん"

# 要約
npx katashiro summarize "長いテキスト..." --length 200

MCPサーバーとして使用

VS Code settings.json:

{
  "mcp.servers": {
    "katashiro": {
      "command": "npx",
      "args": ["@nahisaho/katashiro-mcp-server"]
    }
  }
}

ライブラリとして使用

// オールインワンパッケージから
import { WebScraper, TextAnalyzer, ReportGenerator } from '@nahisaho/katashiro';

// または個別パッケージから
import { WebScraper } from '@nahisaho/katashiro-collector';
import { TextAnalyzer } from '@nahisaho/katashiro-analyzer';
import { ReportGenerator } from '@nahisaho/katashiro-generator';

// Webページをスクレイピング
const scraper = new WebScraper();
const page = await scraper.scrape('https://example.com');

// テキスト分析
const analyzer = new TextAnalyzer();
const analysis = await analyzer.analyze(page.value.text);

// レポート生成
const generator = new ReportGenerator();
const report = await generator.generate({
  title: '調査レポート',
  sections: [{ heading: '分析結果', content: analysis.summary }]
});

エージェントオーケストレーション(v0.4.0)

import {
  TaskDecomposer,
  MultiAgentOrchestrator,
  ToolRegistry,
} from '@nahisaho/katashiro-orchestrator';

// タスク分解
const decomposer = new TaskDecomposer();
const planResult = await decomposer.decompose('AIトレンドを調査して分析レポートを作成');
// => リサーチ → 分析 → レポート生成のサブタスクに分解

// マルチエージェント並列実行
const orchestrator = new MultiAgentOrchestrator({
  taskDecomposer: decomposer,
  config: { maxConcurrentAgents: 5 },
});
const result = await orchestrator.execute('複雑な調査タスク');
console.log(`${result.metadata.agentsUsed}エージェントが実行`);

// ツール登録とAction-Observationパターン
const registry = new ToolRegistry();
registry.register({
  name: 'web_search',
  description: 'Web検索',
  category: 'research',
  defaultRiskLevel: 'low',
  defaultTimeout: 30,
  paramsSchema: { type: 'object', required: ['query'] },
  resultSchema: { type: 'array' },
  execute: async (params) => { /* 検索ロジック */ },
});

セキュリティ&サンドボックス(v0.4.0)

import { SecurityAnalyzer, ActionLogger } from '@nahisaho/katashiro-security';
import { LocalExecutor } from '@nahisaho/katashiro-sandbox';
import { LocalWorkspace } from '@nahisaho/katashiro-workspace';

// セキュリティ分析
const security = new SecurityAnalyzer({
  denyPatterns: ['*.env', '**/secrets/**'],
  allowPatterns: ['*.md', '*.txt'],
});
const analysis = security.analyze({
  type: 'file_read',
  target: '/project/.env',
});
console.log(`リスクレベル: ${analysis.riskLevel}`); // => 'high'

// 監査ログ
const logger = new ActionLogger();
logger.log({
  actionType: 'command_execute',
  target: 'npm install',
  timestamp: new Date().toISOString(),
  result: 'success',
  riskLevel: 'medium',
});
const summary = logger.getSummary();
console.log(`総アクション: ${summary.totalActions}`);

// サンドボックス実行
const executor = new LocalExecutor();
const execResult = await executor.execute({
  code: 'print("Hello")',
  language: 'python',
  timeout: 5000,
});

// ワークスペース操作
const workspace = new LocalWorkspace('/project');
const files = await workspace.list('/src');
const content = await workspace.read('/src/index.ts');

透明性機能(v0.2.0)

import { 
  CollaborationTracker, 
  ContributionAnalyzer, 
  VersioningManager,
  TransparencyReport 
} from '@nahisaho/katashiro';

// 共同作業セッション追跡
const tracker = new CollaborationTracker();
const session = tracker.startSession('doc-001', 'Research Document', {
  name: 'Author',
  type: 'human',
});

// AI/人間の貢献分析
const contribAnalyzer = new ContributionAnalyzer();
const analysis = await contribAnalyzer.analyze(content);
console.log(`AI ratio: ${analysis.aiRatio * 100}%`);

// バージョン管理
const versionMgr = new VersioningManager();
versionMgr.initializeHistory({ documentId: 'doc-001' });
versionMgr.saveVersion(content, 'Initial version');

// 透明性レポート
const transparencyReport = new TransparencyReport();
const report = transparencyReport.generate({
  title: 'Research Document',
  sessions: [session],
  analyses: [analysis],
  operations: tracker.getOperationLog(session.id),
});

ワークフロー自動化(v0.2.0)

import { 
  WorkflowEngine, 
  QualityGate, 
  StyleGuideEnforcer,
  PipelineOrchestrator 
} from '@nahisaho/katashiro';

// ワークフローエンジン
const engine = new WorkflowEngine();
engine.loadDefinition({
  id: 'research-workflow',
  name: 'Research Pipeline',
  version: '1.0.0',
  steps: [
    { id: 'analyze', name: 'Analyze', type: 'analyze', execute: async (input) => { ... } },
    { id: 'generate', name: 'Generate', type: 'generate', dependsOn: ['analyze'], execute: async (input) => { ... } },
  ],
});
const result = await engine.execute({ content: 'input text' });

// 品質ゲート
const qualityGate = new QualityGate();
const qualityResult = await qualityGate.evaluate(content);
console.log(`Score: ${qualityResult.overallScore}/100`);

// スタイルガイド
const styleEnforcer = new StyleGuideEnforcer();
const styleResult = styleEnforcer.validate(content);
console.log(`Passed: ${styleResult.passed}`);

パッケージ

パッケージ 説明
@nahisaho/katashiro オールインワン(推奨)
@nahisaho/katashiro-core コアライブラリ
@nahisaho/katashiro-collector 情報収集
@nahisaho/katashiro-analyzer テキスト分析
@nahisaho/katashiro-generator コンテンツ生成
@nahisaho/katashiro-knowledge 知識グラフ
@nahisaho/katashiro-feedback フィードバック
@nahisaho/katashiro-mcp-server MCPサーバー
@nahisaho/katashiro-orchestrator エージェントオーケストレーション (v0.4.0)
@nahisaho/katashiro-sandbox サンドボックス実行 (v0.4.0)
@nahisaho/katashiro-workspace ワークスペース管理 (v0.4.0)
@nahisaho/katashiro-security セキュリティ分析 (v0.4.0)

ドキュメント

開発

# クローン
git clone https://github.com/nahisaho/katashiro.git
cd katashiro

# 依存関係インストール
npm install

# ビルド
npm run build

# テスト
npm test

テスト

Test Files  80 passed (80)
     Tests  1569 passed | 4 skipped (1573)

ライセンス

MIT License

作者

@nahisaho

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured