Summarization FunctionsSummarization Functions

API Integration

Integrate this MCP server into your applications using our SDKs.

Installation

Install the Smithery and MCP SDKs using npm:

npm install @smithery/sdk @modelcontextprotocol/sdk

TypeScript SDK

Use Smithery's TypeScript SDK to connect to this MCP server:

typescript

import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"

const transport = new StdioClientTransport({
  "command": "npx",
  "args": [
    "-y",
    "mcp-summarization-functions"
  ],
  "env": {
    "PROVIDER": "ANTHROPIC",
    "API_KEY": "your-anthropic-key",
    "MODEL_ID": "claude-3-5-sonnet-20241022",
    "PROVIDER_BASE_URL": "",
    "MAX_TOKENS": 1024,
    "SUMMARIZATION_CHAR_THRESHOLD": 512,
    "SUMMARIZATION_CACHE_MAX_AGE": 3600000,
    "MCP_WORKING_DIR": "default_working_directory",
    "PATH": process.env.PATH
  }
})

// Create MCP client
import { Client } from "@modelcontextprotocol/sdk/client/index.js"

const client = new Client({
	name: "Test client",
	version: "1.0.0"
})
await client.connect(transport)

// Use the server tools with your LLM application
const tools = await client.listTools()
console.log(`Available tools: ${tools.map(t => t.name).join(", ")}`)

// Example: Call a tool
// const result = await client.callTool("tool_name", { param1: "value1" })

Configuration Schema

Full JSON Schema for server configuration:

json
{
  "type": "object",
  "required": [
    "provider",
    "apiKey"
  ],
  "properties": {
    "apiKey": {
      "type": "string",
      "description": "API key for the selected provider."
    },
    "modelId": {
      "type": "string",
      "description": "Specific model to use."
    },
    "provider": {
      "type": "string",
      "description": "AI provider to use. Supported values: ANTHROPIC, OPENAI, OPENAI-COMPATIBLE, GOOGLE."
    },
    "maxTokens": {
      "type": "number",
      "description": "Maximum tokens for model responses."
    },
    "mcpWorkingDir": {
      "type": "string",
      "description": "Fallback directory for trying to find files with relative paths from."
    },
    "providerBaseUrl": {
      "type": "string",
      "description": "Custom API endpoint for OpenAI-compatible providers."
    },
    "summarizationCacheMaxAge": {
      "type": "number",
      "description": "Cache duration in milliseconds."
    },
    "summarizationCharThreshold": {
      "type": "number",
      "description": "Character count threshold for when to summarize."
    }
  }
}