Skip to content

Commit 11a9473

Browse files
committed
chore: mcp server update
1 parent c18c8b5 commit 11a9473

6 files changed

Lines changed: 151 additions & 15 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -964,6 +964,25 @@ Segments are used to organize and group contacts based on specific criteria.
964964

965965
- `segmentUuid`: Segment uuid parameter (required)
966966

967+
### reach_createANewProfileContactV1
968+
969+
Create a new contact in the email marketing system.
970+
971+
This endpoint allows you to create a new contact with basic information like name, email, and surname.
972+
973+
If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
974+
975+
- **Method**: `POST`
976+
- **Path**: `/api/reach/v1/profiles/{profileUuid}/contacts`
977+
978+
**Parameters**:
979+
980+
- `profileUuid`: Profile uuid parameter (required)
981+
- `email`: email parameter (required)
982+
- `name`: name parameter
983+
- `surname`: surname parameter
984+
- `note`: note parameter
985+
967986
### reach_listProfilesV1
968987

969988
This endpoint returns all profiles available to the client, including their basic information.

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hostinger-api-mcp",
3-
"version": "0.1.27",
3+
"version": "0.1.28",
44
"description": "MCP server for Hostinger API",
55
"repository": {
66
"type": "git",

server.js

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,6 +1784,46 @@ const TOOLS = [
17841784
}
17851785
]
17861786
},
1787+
{
1788+
"name": "reach_createANewProfileContactV1",
1789+
"description": "Create a new contact in the email marketing system.\n\nThis endpoint allows you to create a new contact with basic information like name, email, and surname.\n\nIf double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.",
1790+
"method": "POST",
1791+
"path": "/api/reach/v1/profiles/{profileUuid}/contacts",
1792+
"inputSchema": {
1793+
"type": "object",
1794+
"properties": {
1795+
"profileUuid": {
1796+
"type": "string",
1797+
"description": "Profile uuid parameter"
1798+
},
1799+
"email": {
1800+
"type": "string",
1801+
"description": "email parameter"
1802+
},
1803+
"name": {
1804+
"type": "string",
1805+
"description": "name parameter"
1806+
},
1807+
"surname": {
1808+
"type": "string",
1809+
"description": "surname parameter"
1810+
},
1811+
"note": {
1812+
"type": "string",
1813+
"description": "note parameter"
1814+
}
1815+
},
1816+
"required": [
1817+
"profileUuid",
1818+
"email"
1819+
]
1820+
},
1821+
"security": [
1822+
{
1823+
"apiToken": []
1824+
}
1825+
]
1826+
},
17871827
{
17881828
"name": "reach_listProfilesV1",
17891829
"description": "This endpoint returns all profiles available to the client, including their basic information.",
@@ -3580,7 +3620,7 @@ class MCPServer {
35803620
this.server = new Server(
35813621
{
35823622
name: "hostinger-api-mcp",
3583-
version: "0.1.27",
3623+
version: "0.1.28",
35843624
},
35853625
{
35863626
capabilities: {
@@ -3605,7 +3645,7 @@ class MCPServer {
36053645
});
36063646
}
36073647

3608-
headers['User-Agent'] = 'hostinger-mcp-server/0.1.27';
3648+
headers['User-Agent'] = 'hostinger-mcp-server/0.1.28';
36093649

36103650
return headers;
36113651
}
@@ -3850,7 +3890,9 @@ class MCPServer {
38503890

38513891
const requestHeaders = {
38523892
'X-Auth': authToken,
3853-
'X-Auth-Rest': authRestToken
3893+
'X-Auth-Rest': authRestToken,
3894+
'upload-length': stats.size.toString(),
3895+
'upload-offset': '0'
38543896
};
38553897

38563898
try {

server.ts

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,6 +1802,46 @@ const TOOLS: OpenApiTool[] = [
18021802
}
18031803
]
18041804
},
1805+
{
1806+
"name": "reach_createANewProfileContactV1",
1807+
"description": "Create a new contact in the email marketing system.\n\nThis endpoint allows you to create a new contact with basic information like name, email, and surname.\n\nIf double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.",
1808+
"method": "POST",
1809+
"path": "/api/reach/v1/profiles/{profileUuid}/contacts",
1810+
"inputSchema": {
1811+
"type": "object",
1812+
"properties": {
1813+
"profileUuid": {
1814+
"type": "string",
1815+
"description": "Profile uuid parameter"
1816+
},
1817+
"email": {
1818+
"type": "string",
1819+
"description": "email parameter"
1820+
},
1821+
"name": {
1822+
"type": "string",
1823+
"description": "name parameter"
1824+
},
1825+
"surname": {
1826+
"type": "string",
1827+
"description": "surname parameter"
1828+
},
1829+
"note": {
1830+
"type": "string",
1831+
"description": "note parameter"
1832+
}
1833+
},
1834+
"required": [
1835+
"profileUuid",
1836+
"email"
1837+
]
1838+
},
1839+
"security": [
1840+
{
1841+
"apiToken": []
1842+
}
1843+
]
1844+
},
18051845
{
18061846
"name": "reach_listProfilesV1",
18071847
"description": "This endpoint returns all profiles available to the client, including their basic information.",
@@ -3602,7 +3642,7 @@ class MCPServer {
36023642
this.server = new Server(
36033643
{
36043644
name: "hostinger-api-mcp",
3605-
version: "0.1.27",
3645+
version: "0.1.28",
36063646
},
36073647
{
36083648
capabilities: {
@@ -3627,7 +3667,7 @@ class MCPServer {
36273667
});
36283668
}
36293669

3630-
headers['User-Agent'] = 'hostinger-mcp-server/0.1.27';
3670+
headers['User-Agent'] = 'hostinger-mcp-server/0.1.28';
36313671

36323672
return headers;
36333673
}
@@ -3877,7 +3917,9 @@ class MCPServer {
38773917

38783918
const requestHeaders: Record<string, string> = {
38793919
'X-Auth': authToken,
3880-
'X-Auth-Rest': authRestToken
3920+
'X-Auth-Rest': authRestToken,
3921+
'upload-length': stats.size.toString(),
3922+
'upload-offset': '0'
38813923
};
38823924

38833925
try {

types.d.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,39 @@ Segments are used to organize and group contacts based on specific criteria.
11191119
response: any; // Response structure will depend on the API
11201120
};
11211121

1122+
/**
1123+
* Create a new contact in the email marketing system.
1124+
1125+
This endpoint allows you to create a new contact with basic information like name, email, and surname.
1126+
1127+
If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.
1128+
*/
1129+
"reach_createANewProfileContactV1": {
1130+
params: {
1131+
/**
1132+
* Profile uuid parameter
1133+
*/
1134+
profileUuid: string;
1135+
/**
1136+
* email parameter
1137+
*/
1138+
email: string;
1139+
/**
1140+
* name parameter
1141+
*/
1142+
name?: string;
1143+
/**
1144+
* surname parameter
1145+
*/
1146+
surname?: string;
1147+
/**
1148+
* note parameter
1149+
*/
1150+
note?: string;
1151+
};
1152+
response: any; // Response structure will depend on the API
1153+
};
1154+
11221155
/**
11231156
* This endpoint returns all profiles available to the client, including their basic information.
11241157
*/

0 commit comments

Comments
 (0)