Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.27.0"
".": "0.29.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-622b43986c45c1efbeb06dd933786980257f300b7a0edbb2d2a4f708afacce36.yml
openapi_spec_hash: ade837ffc4873d3b50a0fab3f061b397
config_hash: a3a8e3c71c17eabb21ab8173521181a4
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-fc4ab722e6762cc69d533f57bea0d70b00e44a30c4ad8144e14ff70a1170ec7c.yml
openapi_spec_hash: 2533ea676c195d5f7d30a67c201fd32d
config_hash: b32e7b67898ff493ca749cdd513ab870
240 changes: 240 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ client.parents.children.retrieve('c_456', { parent_id: 'p_123' });

This affects the following methods:

- `client.memories.update()`
- `client.memories.delete()`
- `client.memories.get()`

Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Types:

Methods:

- <code title="post /memories/update/{source}/{resource_id}">client.memories.<a href="./src/resources/memories.ts">update</a>(resourceID, { ...params }) -> MemoryStatus</code>
- <code title="get /memories/list">client.memories.<a href="./src/resources/memories.ts">list</a>({ ...params }) -> MemoriesCursorPage</code>
- <code title="delete /memories/delete/{source}/{resource_id}">client.memories.<a href="./src/resources/memories.ts">delete</a>(resourceID, { ...params }) -> MemoryDeleteResponse</code>
- <code title="post /memories/add">client.memories.<a href="./src/resources/memories.ts">add</a>({ ...params }) -> MemoryStatus</code>
Expand Down
37 changes: 37 additions & 0 deletions bin/migration-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,43 @@
"githubRepo": "https://github.com/hyperspell/node-sdk",
"clientClass": "Hyperspell",
"methods": [
{
"base": "memories",
"name": "update",
"params": [
{
"type": "param",
"key": "resource_id",
"location": "path"
},
{
"type": "params",
"maybeOverload": false
},
{
"type": "options"
}
],
"oldParams": [
{
"type": "param",
"key": "source",
"location": "path"
},
{
"type": "param",
"key": "resource_id",
"location": "path"
},
{
"type": "params",
"maybeOverload": false
},
{
"type": "options"
}
]
},
{
"base": "memories",
"name": "delete",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperspell",
"version": "0.27.0",
"version": "0.29.0",
"description": "The official TypeScript library for the Hyperspell API",
"author": "Hyperspell <hello@hyperspell.com>",
"types": "dist/index.d.ts",
Expand Down
66 changes: 66 additions & 0 deletions packages/mcp-server/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Dependencies
node_modules/
**/node_modules/

# Build outputs
dist/
**/dist/
build/
**/build/

# Git
.git/
.gitignore

# CI/CD
.github/
.gitlab-ci.yml
.travis.yml

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Documentation
*.md
docs/
LICENSE

# Testing
test/
tests/
__tests__/
*.test.js
*.spec.js
coverage/
.nyc_output/

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Environment
.env
.env.*

# Temporary files
*.tmp
*.temp
.cache/

# Examples and scripts
examples/
bin/

# Other packages (we only need mcp-server)
packages/*/
!packages/mcp-server/
77 changes: 77 additions & 0 deletions packages/mcp-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Dockerfile for Hyperspell MCP Server
#
# This Dockerfile builds a Docker image for the MCP Server.
#
# To build the image locally:
# docker build -f packages/mcp-server/Dockerfile -t hyperspell-mcp:local .
#
# To run the image:
# docker run -i hyperspell-mcp:local [OPTIONS]
#
# Common options:
# --tool=<name> Include specific tools
# --resource=<name> Include tools for specific resources
# --operation=read|write Filter by operation type
# --client=<type> Set client compatibility (e.g., claude, cursor)
# --transport=<type> Set transport type (stdio or http)
#
# For a full list of options:
# docker run -i hyperspell-mcp:local --help
#
# Note: The MCP server uses stdio transport by default. Docker's -i flag
# enables interactive mode, allowing the container to communicate over stdin/stdout.

# Build stage
FROM node:20-alpine AS builder

# Install bash for build script
RUN apk add --no-cache bash openssl

# Set working directory
WORKDIR /build

# Copy entire repository
COPY . .

# Install all dependencies and build everything
RUN yarn install --frozen-lockfile && \
yarn build

# Production stage

FROM denoland/deno:alpine
RUN apk add --no-cache npm

# Add non-root user
RUN addgroup -g 1001 -S nodejs && adduser -S nodejs -u 1001

# Set working directory
WORKDIR /app

# Copy the built mcp-server dist directory
COPY --from=builder /build/packages/mcp-server/dist ./

# Copy node_modules from mcp-server (includes all production deps)
COPY --from=builder /build/packages/mcp-server/node_modules ./node_modules

# Copy the built hyperspell into node_modules
COPY --from=builder /build/dist ./node_modules/hyperspell

# Change ownership to nodejs user
RUN chown -R nodejs:nodejs /app

# Switch to non-root user
USER nodejs

# The MCP server uses stdio transport by default
# No exposed ports needed for stdio communication

# This is needed for node to run on the deno:alpine image.
# See <https://github.com/denoland/deno_docker/issues/373>.
ENV LD_LIBRARY_PATH=/usr/lib:/usr/local/lib

# Set the entrypoint to the MCP server
ENTRYPOINT ["node", "index.js"]

# Allow passing arguments to the MCP server
CMD []
1 change: 1 addition & 0 deletions packages/mcp-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ The following tools are available in this MCP server.

### Resource `memories`:

- `update_memory` (`write`): This tool lets you update memory in Hyperspell.
- `add_memory` (`write`): This tool lets you add text, markdown, or JSON to the Hyperspell index so it can be searched later. It will return the `source` and `resource_id` that can be used to later retrieve the processed memory.
- `get_memory` (`read`): This tool lets you retrieve a memory that has been previously indexed.
- `search` (`write`): Search all memories indexed by Hyperspell. Set 'answer' to true to directly answer the query, or to 'false' to simply get all memories related to the query.
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dxt_version": "0.2",
"name": "hyperspell-mcp",
"version": "0.22.1",
"version": "0.27.0",
"description": "The official MCP Server for the Hyperspell API",
"author": {
"name": "Hyperspell",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperspell-mcp",
"version": "0.27.0",
"version": "0.29.0",
"description": "The official MCP Server for the Hyperspell API",
"author": "Hyperspell <hello@hyperspell.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'hyperspell_api',
version: '0.27.0',
version: '0.29.0',
},
{ capabilities: { tools: {}, logging: {} } },
);
Expand Down
2 changes: 2 additions & 0 deletions packages/mcp-server/src/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export { Metadata, Endpoint, HandlerFunction };
import list_connections from './connections/list-connections';
import list_integrations from './integrations/list-integrations';
import connect_integration from './integrations/connect-integration';
import update_memory from './memories/update-memory';
import add_memory from './memories/add-memory';
import get_memory from './memories/get-memory';
import search from './memories/search';
Expand All @@ -22,6 +23,7 @@ function addEndpoint(endpoint: Endpoint) {
addEndpoint(list_connections);
addEndpoint(list_integrations);
addEndpoint(connect_integration);
addEndpoint(update_memory);
addEndpoint(add_memory);
addEndpoint(get_memory);
addEndpoint(search);
Expand Down
Loading