First a comment on historical accuracy. My notes on feudalism and the specifics I use in the Majestic Wilderlands are grounded in history but they are not historically accurate. The history of feudalism in Europe is several centuries long (7th to 15th century at least) and was adapted differently in the various regions of Europe. Using the work of N. Robin Crossby, the various authors of Ars Magica, Life in a Medieval Castle/City, and several other sources I picked out the details that I felt provided interesting circumstances for the NPCs, added verisimilitude, covered common PCs questions/actions, and above all approachable for 21st century gamers.
While I have a wealth of details is rarely comes into play all it once. Just people living in the diversity for the 21st century, the players in the year 4460 BCCC of the Majestic Wilderlands only experience a specific and narrow slice. And I deliberately try to keep it narrow so not to overwhelm the players at any one point. What the mass of details allows me to do is to make the next campaign different as I will be using the same setting again. It allow me even to reuse the same region and keep it fresh by focusing on a different slice of life than the previous campaign.
Onward with the notes. This is a general overview of the great feudal officers. It will be repeating information that I will cover in the specifics of the City-State but I feel doing this way will make it easier for you to adapt the information to your own campaign.
The great feudal lords of a realm have to manage dozens of subordinate vassals and estates. To do this they need the help of subordinates. Subordinates that may be nobles but are not feudal lords. Their focus is to help manage the duties and affairs of their sovereign. A typical way of breaking down the issues of a feudal lord are
The Chamber: The lord's personal household and affairs. This is usually run by the Chamberlain. The manager of a specific house is usually known as a stewards. A king would have a single Chamberlain with a number of Stewards under his authority. However for your campaign you could just go with Steward and gloss over the detail.
Things like your court wizard, perhaps even special agents would be found as part of the Chamber. If an individual serves the sovereign directly and perform an skilled job then that individual is likely part of the Chamber.
The Chancery: The lord's system of courts where his subject can have their disputes resolved. This is usually run by the Chancellor who administers the various courts under the lord's authority. The Chancellor is also serves as chief judge of intermediate court of appeals. The typical patterns of appeals is that a regular court renders a judgment, it is appealed to the chancellor, and if the parties are connected enough or the dispute is important enough it may be appealed to the great lord himself for a decision. Also the great lord will often have the Chancellor pick a limited number of cases to be heard directly. This is part of the annual cycle of duties that a great lord does to show he cares about the plight of his people. You could omit the Chancellor as judge from your campaign and make the NPC just a manager of those who want to appeal to the great lord.
Also note that over time feudal kings, and emperors tended to reserve any cases involving high justice i.e. death to themselves and limit the authority of lower level vassals to cases of low justices (fines, enslavement, or rarely prison). You may opt to decided your campaign is just emerging from a dark age in which case every feudal lord has the right of high justice. The exception being if two parties of equal rank (knight vs. knight, baron vs. baron) the case would be heard by highest lord they have in common. In this case the king's justice is limited to his personal subjects and the estates he personally controls. Note that merchants really don't like this situation and historically have pushed for greater royal control of justice. The churches are indifferent except they wish their rights to any gifts or bequests to be enforced. This also resulted in the churches supporting greater royal control up to a point.
Next is Exchequer or Treasury. It is run by the Exchequer Royal or Treasurer. It is in charge of collecting, storing, and managing the income due to the feudal lord. It is also in charge of minting coins if the feudal is an independent sovereign.
In medieval times, the sovereign's rights are not absolute particularly in the case of revenue. Typically the sovereign is limited to whatever personal income he has and what is customary for his vassal to give. What is customary for vassals depends on what their initial grants said. As the medieval economy improved and there was more coinage in circulation, a trick the sovereign would use is to accept cash payments in lieu of actual military service. However for extraordinary expenses the medieval sovereign had to rely on his vassal agreement to pay him extra money. In England this led to the development of Parliament. In contrast France the monarchy had a unbroken father-son succession for several generation. This is allowed the Kings of France accumulate large estates. Also they broke the power of regional nobles like Brittany Burgundy and other areas of France and gathered their rights to revenue along with their titles. This left French Parliaments weak and unable to check the French Kings through denying them tax revenue.
Also with the improved economy, merchants found it profitable to loan money to sovereigns. Outside of the churches, the various feudal lords had the largest sources of income in the economy. They could borrow and pay back vast sums and the merchants would profit on the interest. Although in our history this was altered and called damages owed to the merchant for not being able to use his money because of the Catholic Church prohibition against usury. The usury ban did not apply to the Jewish community who became an important source of loans to European sovereigns.
Depending on the nature of the feudal system Royal Agents, Secret police, etc. Are employed by the Chancery or Treasury or sometimes both. In the former they are out there to find out any unreported murders or other high justice crimes. Vassal lords had a habit of dealing out personal justice so this needed to be kept in check. Treasury agent are looking for people hiding income, stealing tax revenue, etc. Both types are not popular among the vassal lord who view their activities as encroaching on their own rights.
Next is the Royal Army, Royal Guard, etc. This is usually headed by an appointed Marshal. More often than not this position was vacate or did not exist because of the enormous potential threat it represented. Feudal states had limited standing armies but once formed they needed managing. The office is the skeleton staff handling paperwork, logistics and is fully manned in wartime.
By late medieval times, the improving economy and the conversion of feudal duty to cash payment allowed the King to hire mercenaries. In practice this mostly amounted to hiring people from his own realm but instead serving a required 90 days or a season, they got paid and served for as long or short their sovereign needed them to server.
Finally there is a hierarchy of administrators managing the King's estates and affairs in various regions of his realms. In England there were Sheriff in charge of an entire county, each county was divided into hundreds each with a Bailiff of the Hundred, and finally the manor itself with a bailiff. A point often missed is that that a sheriff does not have the authority to order a local lord around. He is the sovereign's representative. If he has a specific writ or decree in hand. Or there is a specific law or custom, then the sheriff can act as if he is the king himself. The same with the Bailiff of the Hundred on a smaller scale.
You can gloss over the Bailiff of the Hundred if you don't want to go into that level of details. Just have the manor, barons, and the local sheriff. The sheriff is the king's representative.
Understand while the position itself has limited authority the individual occupying the office of sheriff may have great importance socially or economically. In which case they may be able to do things anyway even tho they don't have any law saying they can do it.
Finally there are the marches. Marches as usually established on an expanding frontier of a realm. Or next to a contested area that wars have been fought over. England had a march on the Welsh frontier, Germany on their eastern frontier, Spain on their borders with the Muslims. Marches differs in that they have a standing army present to guard the frontier. A typical title for the king's representative in a march is Warden.
To summarize, the basics are that the sovereign needs people to manage his household, courts, treasury, military, and regions of his realm.
Next post is about how markets, towns, and cities relate to all this.