Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
567186b
feat(api): api update
stainless-app[bot] Sep 16, 2025
b108f37
fix(ci): set permissions for DXT publish action
stainless-app[bot] Sep 17, 2025
5ed6664
chore(mcp): rename dxt to mcpb
stainless-app[bot] Sep 18, 2025
d014387
chore(internal): gitignore .mcpb files
stainless-app[bot] Sep 19, 2025
5d7e625
feat(mcp): add docs search tool
stainless-app[bot] Sep 19, 2025
a2eae84
chore(codegen): internal codegen update
stainless-app[bot] Sep 19, 2025
c6e597b
chore: do not install brew dependencies in ./scripts/bootstrap by def…
stainless-app[bot] Sep 20, 2025
3f70e41
feat(mcp): enable experimental docs search tool
stainless-app[bot] Sep 23, 2025
098b996
feat(mcp): add option for including docs tools
stainless-app[bot] Sep 24, 2025
5bb1334
feat(api): api update
stainless-app[bot] Sep 24, 2025
5195e23
perf: faster formatting
stainless-app[bot] Sep 26, 2025
4e3a331
chore(internal): remove deprecated `compilerOptions.baseUrl` from tsc…
stainless-app[bot] Sep 26, 2025
0d0a799
chore(internal): fix incremental formatting in some cases
stainless-app[bot] Sep 27, 2025
61242ef
chore(mcp): allow pointing `docs_search` tool at other URLs
stainless-app[bot] Sep 27, 2025
714b258
chore(internal): codegen related update
stainless-app[bot] Sep 27, 2025
412ef1d
chore(internal): ignore .eslintcache
stainless-app[bot] Sep 27, 2025
1dcba49
fix(mcp): fix cli argument parsing logic
stainless-app[bot] Sep 30, 2025
38db0c1
fix(mcp): resolve a linting issue in server code
stainless-app[bot] Sep 30, 2025
1bd889f
chore: update lockfile
stainless-app[bot] Sep 30, 2025
9bf0ae4
chore(internal): remove .eslintcache
stainless-app[bot] Oct 3, 2025
70d810c
feat(api): api update
stainless-app[bot] Oct 3, 2025
ba8b1ae
release: 1.7.0
stainless-app[bot] Oct 3, 2025
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
6 changes: 5 additions & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
publish:
name: publish
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -43,4 +45,6 @@ jobs:
- name: Upload MCP Server DXT GitHub release asset
run: |
gh release upload ${{ github.event.release.tag_name }} \
packages/mcp-server/post_for_me_api.dxt
packages/mcp-server/post_for_me_api.mcpb
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ jobs:
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.POST_FOR_ME_NPM_TOKEN || secrets.NPM_TOKEN }}

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ dist
dist-deno
/*.tgz
.idea/
.eslintcache
dist-bundle
*.dxt
*.mcpb
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.6.0"
".": "1.7.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/day-moon-development%2Fpost-for-me-128141f7efe71c23ed45cbe11880e650abc378d65cad1d1f1d1534bb43b84347.yml
openapi_spec_hash: 5a8da35f79513f602bab72ec0cf8ee9e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/day-moon-development%2Fpost-for-me-7be03abbf7f1e1c9fa36b3299590b9fd4008eb418656be347e7e688c90616c5f.yml
openapi_spec_hash: 9bebba0f071db50935e153bb9735e540
config_hash: 11f1fa08f11ac07d06bf1d8a633113d6
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Changelog

## 1.7.0 (2025-10-03)

Full Changelog: [v1.6.0...v1.7.0](https://github.com/DayMoonDevelopment/post-for-me-typescript/compare/v1.6.0...v1.7.0)

### Features

* **api:** api update ([70d810c](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/70d810cdae8a39c4980537245acffc91c4008c87))
* **api:** api update ([5bb1334](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/5bb1334ff4fa9fd2a4c42c4a8743e8797f454aa0))
* **api:** api update ([567186b](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/567186b3340ae2b29caad0ac32728ed3b12635a7))
* **mcp:** add docs search tool ([5d7e625](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/5d7e6254e4cf1a1b8d4ff2fce317a0f33f5756c7))
* **mcp:** add option for including docs tools ([098b996](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/098b9966ca39104ade6fdda8003729022336ae0f))
* **mcp:** enable experimental docs search tool ([3f70e41](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/3f70e41731e60a2e86ad8c60dadbe03d7fcdf430))


### Bug Fixes

* **ci:** set permissions for DXT publish action ([b108f37](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/b108f37b8b2571adf362e72428a4ab47f665a25d))
* **mcp:** fix cli argument parsing logic ([1dcba49](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/1dcba49a8f5a3b58d1e8df96e74ddf259d4737d5))
* **mcp:** resolve a linting issue in server code ([38db0c1](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/38db0c14b4c3321f6e48998523fd761a9b6f8218))


### Performance Improvements

* faster formatting ([5195e23](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/5195e23de72b9b40b184d97b4cc5369210900bd7))


### Chores

* **codegen:** internal codegen update ([a2eae84](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/a2eae846e22aaf9fe24d9e2645ab2e7300b414f1))
* do not install brew dependencies in ./scripts/bootstrap by default ([c6e597b](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/c6e597b69862b04d7fff08b0e717d18523c4a761))
* **internal:** codegen related update ([714b258](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/714b258bcb09ca37c011d955db03d79aa30cbbcd))
* **internal:** fix incremental formatting in some cases ([0d0a799](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/0d0a79982ff602ac70f3d75cb381f180f6905125))
* **internal:** gitignore .mcpb files ([d014387](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/d014387e3459d966ad6c77d70e0a37f7478ca933))
* **internal:** ignore .eslintcache ([412ef1d](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/412ef1df5980010e50ac5225d3718bc7f5854fca))
* **internal:** remove .eslintcache ([9bf0ae4](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/9bf0ae47ea97dd8cc83b6651e89d28c654227410))
* **internal:** remove deprecated `compilerOptions.baseUrl` from tsconfig.json ([4e3a331](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/4e3a331bb6e0d90d52910df2aec7dc3f6e18e502))
* **mcp:** allow pointing `docs_search` tool at other URLs ([61242ef](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/61242ef7124865eba3313157c83d10b5a77b0056))
* **mcp:** rename dxt to mcpb ([5ed6664](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/5ed6664513a311a73320050f6e8de00794366110))
* update lockfile ([1bd889f](https://github.com/DayMoonDevelopment/post-for-me-typescript/commit/1bd889f9305635d3cdb931b2a38023e35e6296fb))

## 1.6.0 (2025-09-12)

Full Changelog: [v1.5.3...v1.6.0](https://github.com/DayMoonDevelopment/post-for-me-typescript/compare/v1.5.3...v1.6.0)
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": "post-for-me",
"version": "1.6.0",
"version": "1.7.0",
"description": "The official TypeScript library for the Post For Me API",
"author": "Post For Me <postforme@daymoon.dev>",
"types": "dist/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/mcp-server/build
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ chmod +x dist/index.js
DIST_PATH=./dist PKG_IMPORT_PATH=post-for-me-mcp/ node ../../scripts/utils/postprocess-files.cjs

# mcp bundle
rm -rf dist-bundle post_for_me_api.dxt; mkdir dist-bundle
rm -rf dist-bundle post_for_me_api.mcpb; mkdir dist-bundle

# copy package.json
PKG_JSON_PATH=../../packages/mcp-server/package.json node ../../scripts/utils/make-dist-package-json.cjs > dist-bundle/package.json
Expand All @@ -48,9 +48,9 @@ cd ..
# pack bundle
cp manifest.json dist-bundle

npx dxt pack dist-bundle post_for_me_api.dxt
npx mcpb pack dist-bundle post_for_me_api.mcpb

npx dxt sign post_for_me_api.dxt --self-signed
npx mcpb sign post_for_me_api.mcpb --self-signed

# clean up
rm -rf dist-bundle
5 changes: 3 additions & 2 deletions packages/mcp-server/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dxt_version": "0.1",
"dxt_version": "0.2",
"name": "post-for-me-mcp",
"version": "1.5.3",
"description": "The official MCP Server for the Post For Me API",
Expand All @@ -15,7 +15,7 @@
"documentation": "https://api.postforme.dev/docs",
"server": {
"type": "node",
"entry_point": "${__dirname}/index.js",
"entry_point": "index.js",
"mcp_config": {
"command": "node",
"args": ["${__dirname}/index.js"],
Expand All @@ -32,6 +32,7 @@
"type": "string"
}
},
"tools": [],
"tools_generated": true,
"compatibility": {
"runtimes": {
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "post-for-me-mcp",
"version": "1.6.0",
"version": "1.7.0",
"description": "The official MCP Server for the Post For Me API",
"author": "Post For Me <postforme@daymoon.dev>",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -47,7 +47,7 @@
"mcp-server": "dist/index.js"
},
"devDependencies": {
"@anthropic-ai/dxt": "^0.2.6",
"@anthropic-ai/mcpb": "^1.1.0",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.3",
"@types/jest": "^29.4.0",
Expand Down
48 changes: 48 additions & 0 deletions packages/mcp-server/src/docs-search-tool.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

import { Metadata, asTextContentResult } from './tools/types';

import { Tool } from '@modelcontextprotocol/sdk/types.js';

export const metadata: Metadata = {
resource: 'all',
operation: 'read',
tags: [],
httpMethod: 'get',
};

export const tool: Tool = {
name: 'search_docs',
description:
'Search for documentation for how to use the client to interact with the API.\nThe tool will return an array of Markdown-formatted documentation pages.',
inputSchema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'The query to search for.',
},
language: {
type: 'string',
description: 'The language for the SDK to search for.',
enum: ['http', 'python', 'go', 'typescript', 'terraform', 'ruby', 'java', 'kotlin'],
},
},
required: ['query', 'language'],
},
annotations: {
readOnlyHint: true,
},
};

const docsSearchURL =
process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/post-for-me/docs/search';

export const handler = async (_: unknown, args: Record<string, unknown> | undefined) => {
const body = args as any;
const query = new URLSearchParams(body).toString();
const result = await fetch(`${docsSearchURL}?${query}`);
return asTextContentResult(await result.json());
};

export default { metadata, tool, handler };
24 changes: 17 additions & 7 deletions packages/mcp-server/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type McpOptions = {
includeDynamicTools?: boolean | undefined;
includeAllTools?: boolean | undefined;
includeCodeTools?: boolean | undefined;
includeDocsTools?: boolean | undefined;
filters?: Filter[] | undefined;
capabilities?: Partial<ClientCapabilities> | undefined;
};
Expand Down Expand Up @@ -55,13 +56,13 @@ export function parseCLIOptions(): CLIOptions {
.option('tools', {
type: 'string',
array: true,
choices: ['dynamic', 'all', 'code'],
choices: ['dynamic', 'all', 'code', 'docs'],
description: 'Use dynamic tools or all tools',
})
.option('no-tools', {
type: 'string',
array: true,
choices: ['dynamic', 'all', 'code'],
choices: ['dynamic', 'all', 'code', 'docs'],
description: 'Do not use any dynamic or all tools',
})
.option('tool', {
Expand Down Expand Up @@ -245,13 +246,15 @@ export function parseCLIOptions(): CLIOptions {
}
}

const shouldIncludeToolType = (toolType: 'dynamic' | 'all' | 'code') =>
explicitTools ? argv.tools?.includes(toolType) && !argv.noTools?.includes(toolType) : undefined;
const shouldIncludeToolType = (toolType: 'dynamic' | 'all' | 'code' | 'docs') =>
argv.noTools?.includes(toolType) ? false
: argv.tools?.includes(toolType) ? true
: undefined;

const explicitTools = Boolean(argv.tools || argv.noTools);
const includeDynamicTools = shouldIncludeToolType('dynamic');
const includeAllTools = shouldIncludeToolType('all');
const includeCodeTools = shouldIncludeToolType('code');
const includeDocsTools = shouldIncludeToolType('docs');

const transport = argv.transport as 'stdio' | 'http';

Expand All @@ -261,6 +264,7 @@ export function parseCLIOptions(): CLIOptions {
includeDynamicTools,
includeAllTools,
includeCodeTools,
includeDocsTools,
filters,
capabilities: clientCapabilities,
list: argv.list || false,
Expand All @@ -280,8 +284,8 @@ const coerceArray = <T extends z.ZodTypeAny>(zodType: T) =>
);

const QueryOptions = z.object({
tools: coerceArray(z.enum(['dynamic', 'all'])).describe('Use dynamic tools or all tools'),
no_tools: coerceArray(z.enum(['dynamic', 'all'])).describe('Do not use dynamic tools or all tools'),
tools: coerceArray(z.enum(['dynamic', 'all', 'docs'])).describe('Use dynamic tools or all tools'),
no_tools: coerceArray(z.enum(['dynamic', 'all', 'docs'])).describe('Do not use dynamic tools or all tools'),
tool: coerceArray(z.string()).describe('Include tools matching the specified names'),
resource: coerceArray(z.string()).describe('Include tools matching the specified resources'),
operation: coerceArray(z.enum(['read', 'write'])).describe(
Expand Down Expand Up @@ -376,11 +380,17 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M
: queryOptions.tools?.includes('all') ? true
: defaultOptions.includeAllTools;

let docsTools: boolean | undefined =
queryOptions.no_tools && queryOptions.no_tools?.includes('docs') ? false
: queryOptions.tools?.includes('docs') ? true
: defaultOptions.includeDocsTools;

return {
client: queryOptions.client ?? defaultOptions.client,
includeDynamicTools: dynamicTools,
includeAllTools: allTools,
includeCodeTools: undefined,
includeDocsTools: docsTools,
filters,
capabilities: clientCapabilities,
};
Expand Down
13 changes: 8 additions & 5 deletions packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from './compat';
import { dynamicTools } from './dynamic-tools';
import { codeTool } from './code-tool';
import docsSearchTool from './docs-search-tool';
import { McpOptions } from './options';

export { McpOptions } from './options';
Expand All @@ -33,7 +34,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'post_for_me_api',
version: '1.6.0',
version: '1.7.0',
},
{ capabilities: { tools: {}, logging: {} } },
);
Expand Down Expand Up @@ -147,24 +148,26 @@ export function initMcpServer(params: {
export async function selectTools(endpoints: Endpoint[], options?: McpOptions): Promise<Endpoint[]> {
const filteredEndpoints = query(options?.filters ?? [], endpoints);

let includedTools = filteredEndpoints;
let includedTools = filteredEndpoints.slice();

if (includedTools.length > 0) {
if (options?.includeDynamicTools) {
includedTools = dynamicTools(includedTools);
}
} else {
if (options?.includeAllTools) {
includedTools = endpoints;
includedTools = endpoints.slice();
} else if (options?.includeDynamicTools) {
includedTools = dynamicTools(endpoints);
} else if (options?.includeCodeTools) {
includedTools = [await codeTool()];
} else {
includedTools = endpoints;
includedTools = endpoints.slice();
}
}

if (options?.includeDocsTools ?? true) {
includedTools.push(docsSearchTool);
}
const capabilities = { ...defaultClientCapabilities, ...options?.capabilities };
return applyCompatibilityTransformations(includedTools, capabilities);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ export const tool: Tool = {
},
required: ['app_password', 'handle'],
},
instagram: {
type: 'object',
description: 'Additional data for connecting instagram accounts',
properties: {
connection_type: {
type: 'string',
description:
'The type of connection; instagram for using login with instagram, facebook for using login with facebook.',
enum: ['instagram', 'facebook'],
},
},
required: ['connection_type'],
},
linkedin: {
type: 'object',
description: 'Additional data for connecting linkedin accounts',
Expand Down
Loading