mirror of
https://github.com/jlengrand/ghost-mcp.git
synced 2026-03-10 08:21:19 +00:00
✨ Support npx
This commit is contained in:
@@ -19,11 +19,9 @@ To use this with MCP clients, for instance, Claude Desktop, add the following to
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
"ghost-mcp-ts": {
|
"ghost-mcp": {
|
||||||
"command": "node",
|
"command": "npx",
|
||||||
"args": [
|
"args": ["-y", "@fanyangmeng/ghost-mcp"],
|
||||||
"ABSOLUTE_PATH_TO_GHOST_MCP_SERVER/build/server.js",
|
|
||||||
],
|
|
||||||
"env": {
|
"env": {
|
||||||
"GHOST_API_URL": "https://yourblog.com",
|
"GHOST_API_URL": "https://yourblog.com",
|
||||||
"GHOST_ADMIN_API_KEY": "your_admin_api_key",
|
"GHOST_ADMIN_API_KEY": "your_admin_api_key",
|
||||||
|
|||||||
14
package.json
14
package.json
@@ -1,13 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "@fanyangmeng/ghost-mcp",
|
"name": "@fanyangmeng/ghost-mcp",
|
||||||
"version": "0.0.1",
|
"version": "0.1.0",
|
||||||
"description": "MCP server for using the Ghost API",
|
"description": "MCP server for using the Ghost API",
|
||||||
"main": "index.js",
|
"main": "build/server.js",
|
||||||
|
"bin": {
|
||||||
|
"ghost-mcp": "build/server.js"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"build/"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"start": "node build/server.js",
|
"start": "node build/server.js",
|
||||||
|
"prepare": "npm run build",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "Fanyang Meng (https://mfydev.link)",
|
"author": "Fanyang Meng (https://mfydev.link)",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
||||||
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
||||||
import { ghostApiClient } from './ghostApi'; // Import the initialized Ghost API client
|
import { ghostApiClient } from './ghostApi'; // Import the initialized Ghost API client
|
||||||
|
|||||||
Reference in New Issue
Block a user